- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
public DynamicLocation(Entity entity) { if (entity != null) { this.entity = new WeakReference<Entity>(entity); this.location = getEntityLocation(entity); } else { this.entity = null; this.location = null; } this.originalLocation = location; }
public DynamicLocation(Location location, Entity entity) { if (location != null) { this.location = location.clone(); } else if (entity != null) { this.location = getEntityLocation(entity); } else { this.location = null; } if (entity != null) { this.entity = new WeakReference<Entity>(entity); this.entityOffset = this.location.toVector().subtract(getEntityLocation(entity).toVector()); } else { this.entity = null; } this.originalLocation = this.location == null ? null : this.location.clone(); }
public void update() { if (location == null || (!updateLocation && !updateDirection)) { return; } Entity entityReference = entity == null ? null : entity.get(); if (entityReference != null) { Location currentLocation = getEntityLocation(entityReference); if (updateDirection) { setDirection(currentLocation.getDirection()); } if (updateLocation) { updateFrom(currentLocation); } } }