Some refactoring
This commit is contained in:
parent
640c4e532a
commit
da3a1a351f
1 changed files with 6 additions and 6 deletions
|
@ -147,11 +147,7 @@ public class EntityJump extends Entity {
|
|||
}
|
||||
|
||||
if (!isJumping) {
|
||||
this.toSpace = (dir == -1 && (maxY + distance > 255) && worldObj.provider.dimensionId != WarpDrive.instance.spaceDimID);
|
||||
this.fromSpace = (dir == -2 && (minY - distance < 0) && worldObj.provider.dimensionId == WarpDrive.instance.spaceDimID);
|
||||
|
||||
System.out.println("[JE] Preparing to jump...");
|
||||
axisalignedbb = AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
|
||||
prepareToJump();
|
||||
|
||||
|
@ -265,9 +261,11 @@ public class EntityJump extends Entity {
|
|||
|
||||
public void prepareToJump() {
|
||||
LocalProfiler.start("EntityJump.prepareToJump");
|
||||
boolean betweenWorlds;
|
||||
|
||||
betweenWorlds = fromSpace || toSpace;
|
||||
toSpace = (dir == -1 && (maxY + distance > 255) && worldObj.provider.dimensionId != WarpDrive.instance.spaceDimID);
|
||||
fromSpace = (dir == -2 && (minY - distance < 0) && worldObj.provider.dimensionId == WarpDrive.instance.spaceDimID);
|
||||
|
||||
boolean betweenWorlds = fromSpace || toSpace;
|
||||
|
||||
if (toSpace) {
|
||||
targetWorld = DimensionManager.getWorld(WarpDrive.instance.spaceDimID);
|
||||
|
@ -277,6 +275,8 @@ public class EntityJump extends Entity {
|
|||
targetWorld = this.worldObj;
|
||||
}
|
||||
|
||||
axisalignedbb = AxisAlignedBB.getBoundingBox(minX, minY, minZ, maxX, maxY, maxZ);
|
||||
|
||||
lockWorlds();
|
||||
|
||||
saveEntities(axisalignedbb);
|
||||
|
|
Loading…
Reference in a new issue