rearranged constructors

This commit is contained in:
Leijurv
2018-09-16 20:16:05 -07:00
parent 74dc8d4118
commit a589cb0d9e
9 changed files with 25 additions and 30 deletions
@@ -59,6 +59,12 @@ public abstract class Movement implements Helper, MovementHelper {
private Double cost;
public List<BlockPos> toBreakCached = null;
public List<BlockPos> toPlaceCached = null;
public List<BlockPos> toWalkIntoCached = null;
private Boolean calculatedWhileLoaded;
protected Movement(BetterBlockPos src, BetterBlockPos dest, BlockPos[] toBreak, BlockPos toPlace) {
this.src = src;
this.dest = dest;
@@ -290,8 +296,6 @@ public abstract class Movement implements Helper, MovementHelper {
return getDest().subtract(getSrc());
}
private Boolean calculatedWhileLoaded;
public void checkLoadedChunk() {
calculatedWhileLoaded = !(world().getChunk(getDest()) instanceof EmptyChunk);
}
@@ -300,10 +304,6 @@ public abstract class Movement implements Helper, MovementHelper {
return calculatedWhileLoaded;
}
public List<BlockPos> toBreakCached = null;
public List<BlockPos> toPlaceCached = null;
public List<BlockPos> toWalkIntoCached = null;
public List<BlockPos> toBreak() {
if (toBreakCached != null) {
return toBreakCached;