From dd8a333fe38a5fd41709cabfc03f1dd325ccfef8 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 1 Feb 2018 00:09:42 +0100 Subject: [PATCH] Code cleanup --- .../warpdrive/block/breathing/TileEntityAirGenerator.java | 6 +++--- .../java/cr0s/warpdrive/block/detection/BlockCamera.java | 2 +- .../cr0s/warpdrive/block/energy/TileEntityEnergyBank.java | 8 ++++---- src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java | 2 +- .../java/cr0s/warpdrive/data/EnumForceFieldShape.java | 1 - src/main/java/cr0s/warpdrive/event/LivingHandler.java | 3 ++- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/breathing/TileEntityAirGenerator.java b/src/main/java/cr0s/warpdrive/block/breathing/TileEntityAirGenerator.java index 182179d7..c507c9d8 100644 --- a/src/main/java/cr0s/warpdrive/block/breathing/TileEntityAirGenerator.java +++ b/src/main/java/cr0s/warpdrive/block/breathing/TileEntityAirGenerator.java @@ -125,9 +125,9 @@ public class TileEntityAirGenerator extends TileEntityAbstractEnergy { @Override public String toString() { return String.format("%s @ %s (%d %d %d)", - getClass().getSimpleName(), - worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), - xCoord, yCoord, zCoord); + getClass().getSimpleName(), + worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), + xCoord, yCoord, zCoord); } // Common OC/CC methods diff --git a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java index 356f7a6e..d915aade 100644 --- a/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java +++ b/src/main/java/cr0s/warpdrive/block/detection/BlockCamera.java @@ -49,7 +49,7 @@ public class BlockCamera extends BlockAbstractContainer { } @Override - public TileEntity createNewTileEntity(World parWorld, int i) { + public TileEntity createNewTileEntity(World world, int metadata) { return new TileEntityCamera(); } diff --git a/src/main/java/cr0s/warpdrive/block/energy/TileEntityEnergyBank.java b/src/main/java/cr0s/warpdrive/block/energy/TileEntityEnergyBank.java index 8cf22e94..db0fa987 100644 --- a/src/main/java/cr0s/warpdrive/block/energy/TileEntityEnergyBank.java +++ b/src/main/java/cr0s/warpdrive/block/energy/TileEntityEnergyBank.java @@ -174,9 +174,9 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy { @Override public String toString() { return String.format("%s @ %s (%d %d %d) %8d", - getClass().getSimpleName(), - worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), - xCoord, yCoord, zCoord, - energy_getEnergyStored()); + getClass().getSimpleName(), + worldObj == null ? "~NULL~" : worldObj.getWorldInfo().getWorldName(), + xCoord, yCoord, zCoord, + energy_getEnergyStored()); } } \ No newline at end of file diff --git a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java index 7e79e0dc..708f5550 100644 --- a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java +++ b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java @@ -463,7 +463,7 @@ public class WarpDriveConfig { WarpDrive.logger.info("Failed to get ore named " + ore); return new ItemStack(Blocks.fire); } - final ArrayList itemStacks = OreDictionary.getOres(ore); + final List itemStacks = OreDictionary.getOres(ore); if (itemStacks.isEmpty()) { WarpDrive.logger.info(String.format("Failed to get item from empty ore dictionary '%s'", ore)); return new ItemStack(Blocks.fire); diff --git a/src/main/java/cr0s/warpdrive/data/EnumForceFieldShape.java b/src/main/java/cr0s/warpdrive/data/EnumForceFieldShape.java index cfa09caa..2b1cdf87 100644 --- a/src/main/java/cr0s/warpdrive/data/EnumForceFieldShape.java +++ b/src/main/java/cr0s/warpdrive/data/EnumForceFieldShape.java @@ -1,6 +1,5 @@ package cr0s.warpdrive.data; - import cr0s.warpdrive.Commons; import cr0s.warpdrive.WarpDrive; import cr0s.warpdrive.api.IForceFieldShape; diff --git a/src/main/java/cr0s/warpdrive/event/LivingHandler.java b/src/main/java/cr0s/warpdrive/event/LivingHandler.java index 28745a55..0b63ae84 100644 --- a/src/main/java/cr0s/warpdrive/event/LivingHandler.java +++ b/src/main/java/cr0s/warpdrive/event/LivingHandler.java @@ -165,7 +165,8 @@ public class LivingHandler { if (worldTarget == null) { try { - worldTarget = MinecraftServer.getServer().worldServerForDimension(celestialObjectChild.dimensionId); + final MinecraftServer server = MinecraftServer.getServer(); + worldTarget = server.worldServerForDimension(celestialObjectChild.dimensionId); } catch (Exception exception) { WarpDrive.logger.error(String.format("%s: Failed to initialize dimension %d for %s", exception.getMessage(),