From 6bbe69b6316ed1aef2c6ce69062063628633d0b6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 3 Mar 2018 11:31:09 +0100 Subject: [PATCH] Code cleanup --- src/main/java/cr0s/warpdrive/event/ChunkHandler.java | 2 +- src/main/java/cr0s/warpdrive/event/JumpSequencer.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/event/ChunkHandler.java b/src/main/java/cr0s/warpdrive/event/ChunkHandler.java index a92390fb..93f5d916 100644 --- a/src/main/java/cr0s/warpdrive/event/ChunkHandler.java +++ b/src/main/java/cr0s/warpdrive/event/ChunkHandler.java @@ -264,7 +264,7 @@ public class ChunkHandler { } /** - * Return null if chunk isn't already generated or loaded + * Return null if chunk isn't already generated or loaded */ private static ChunkData getChunkData(final boolean isRemote, final int dimensionId, final int x, final int y, final int z) { assert (y >= 0 && y <= 255); diff --git a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java index 813d0538..30e9c5eb 100644 --- a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java +++ b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java @@ -1399,8 +1399,8 @@ public class JumpSequencer extends AbstractSequencer { } private CheckMovementResult checkCollisionAndProtection(ITransformation transformation, final boolean fullCollisionDetails, final String context) { - CheckMovementResult result = new CheckMovementResult(); - VectorI offset = new VectorI((int)Math.signum(moveX), (int)Math.signum(moveY), (int)Math.signum(moveZ)); + final CheckMovementResult result = new CheckMovementResult(); + final VectorI offset = new VectorI((int) Math.signum(moveX), (int) Math.signum(moveY), (int) Math.signum(moveZ)); int x, y, z; ChunkCoordinates coordTarget; @@ -1446,8 +1446,9 @@ public class JumpSequencer extends AbstractSequencer { } } - if (blockSource != Blocks.air && CommonProxy.isBlockPlaceCanceled(null, coordCoreAtTarget.posX, coordCoreAtTarget.posY, coordCoreAtTarget.posZ, - targetWorld, coordTarget.posX, coordTarget.posY, coordTarget.posZ, blockSource, 0)) { + if ( blockSource != Blocks.air + && CommonProxy.isBlockPlaceCanceled(null, coordCoreAtTarget.posX, coordCoreAtTarget.posY, coordCoreAtTarget.posZ, + targetWorld, coordTarget.posX, coordTarget.posY, coordTarget.posZ, blockSource, 0) ) { result.add(x, y, z, coordTarget.posX, coordTarget.posY,