From f95257da758052bbf6daf4f9c9a674106f65dce5 Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sun, 15 May 2016 23:53:15 -0400 Subject: [PATCH] Code cleanup --- src/main/java/cr0s/warpdrive/WarpDrive.java | 1 - .../block/movement/TileEntityLift.java | 18 ++++++++---------- .../cr0s/warpdrive/event/JumpSequencer.java | 4 ++-- ...ng.pdn => componentDiffractionGrating.pdn} | Bin ...ng.png => componentDiffractionGrating.png} | Bin 5 files changed, 10 insertions(+), 13 deletions(-) rename src/main/resources/assets/warpdrive/textures/items/{componentDiffrationGrating.pdn => componentDiffractionGrating.pdn} (100%) rename src/main/resources/assets/warpdrive/textures/items/{componentDiffrationGrating.png => componentDiffractionGrating.png} (100%) diff --git a/src/main/java/cr0s/warpdrive/WarpDrive.java b/src/main/java/cr0s/warpdrive/WarpDrive.java index eed153ed..b30b7412 100644 --- a/src/main/java/cr0s/warpdrive/WarpDrive.java +++ b/src/main/java/cr0s/warpdrive/WarpDrive.java @@ -499,7 +499,6 @@ public class WarpDrive implements LoadingCallback { @EventHandler public void onFMLServerStarting(FMLServerStartingEvent event) { - WarpDrive.logger.info("onFMLServerStarting"); event.registerServerCommand(new CommandGenerate()); event.registerServerCommand(new CommandSpace()); event.registerServerCommand(new CommandInvisible()); diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityLift.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityLift.java index 506bbab4..738132d1 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityLift.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityLift.java @@ -64,24 +64,22 @@ public class TileEntityLift extends TileEntityAbstractEnergy { mode = MODE_UP; } - isEnabled = computerEnabled && isPassableBlock(yCoord + 1) - && isPassableBlock(yCoord + 2) - && isPassableBlock(yCoord - 1) - && isPassableBlock(yCoord - 2); + isEnabled = computerEnabled + && isPassableBlock(yCoord + 1) + && isPassableBlock(yCoord + 2) + && isPassableBlock(yCoord - 1) + && isPassableBlock(yCoord - 2); - if (getEnergyStored() < WarpDriveConfig.LIFT_ENERGY_PER_ENTITY - || !isEnabled) { + if (getEnergyStored() < WarpDriveConfig.LIFT_ENERGY_PER_ENTITY || !isEnabled) { mode = MODE_INACTIVE; if (getBlockMetadata() != 0) { - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, - 0, 2); // disabled + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2); // disabled } return; } if (getBlockMetadata() != mode) { - worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, - mode, 2); // current mode + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, mode, 2); // current mode } // Launch a beam: search non-air blocks under lift diff --git a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java index 8c1c82ea..35029fe9 100644 --- a/src/main/java/cr0s/warpdrive/event/JumpSequencer.java +++ b/src/main/java/cr0s/warpdrive/event/JumpSequencer.java @@ -1024,8 +1024,8 @@ public class JumpSequencer extends AbstractSequencer { // compute explosion strength with a jitter, at least 1 TNT float strength = Math.max(4.0F, collisionStrength / nbExplosions - 2.0F + 2.0F * sourceWorld.rand.nextFloat()); - (atTarget ? targetWorld : sourceWorld).newExplosion((Entity) null, current.x, current.y, current.z, strength, atTarget, atTarget); - WarpDrive.logger.info("Ship collision caused explosion at " + current.x + ", " + current.y + ", " + current.z + " with strength " + strength); + (atTarget ? targetWorld : sourceWorld).newExplosion(null, current.x, current.y, current.z, strength, atTarget, atTarget); + WarpDrive.logger.info("Ship collision caused explosion at " + current.x + " " + current.y + " " + current.z + " with strength " + strength); } } diff --git a/src/main/resources/assets/warpdrive/textures/items/componentDiffrationGrating.pdn b/src/main/resources/assets/warpdrive/textures/items/componentDiffractionGrating.pdn similarity index 100% rename from src/main/resources/assets/warpdrive/textures/items/componentDiffrationGrating.pdn rename to src/main/resources/assets/warpdrive/textures/items/componentDiffractionGrating.pdn diff --git a/src/main/resources/assets/warpdrive/textures/items/componentDiffrationGrating.png b/src/main/resources/assets/warpdrive/textures/items/componentDiffractionGrating.png similarity index 100% rename from src/main/resources/assets/warpdrive/textures/items/componentDiffrationGrating.png rename to src/main/resources/assets/warpdrive/textures/items/componentDiffractionGrating.png