public StackMap.ItemEntry getStackEntry() { if (stack.isEmpty()) { return null; } if (stackItemEntry == null || stackItemEntry.side != getLastSide()) { stackItemEntry = new StackMap.ItemEntry(stack, getLastSide()); } return stackItemEntry; }
public BlockPos getDest() { if (myPath == null) { return null; } if (myPath.dest == null) { if (myPath.endPoint == null) { if (!hasDest) { return null; } myPath.dest = (new BlockPos(destX, destY, destZ).offset(EnumFacing.VALUES[getLastSide()])); } else { myPath.dest = (new BlockPos(myPath.endPoint.x(), myPath.endPoint.y(), myPath.endPoint.z())).offset(EnumFacing.VALUES[getLastSide()]); } } return myPath.dest; }