Code cleanup

This commit is contained in:
Unknown 2018-02-01 00:09:42 +01:00
parent 75df9fbb6a
commit dd8a333fe3
6 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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();
}

View file

@ -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());
}
}

View file

@ -463,7 +463,7 @@ public class WarpDriveConfig {
WarpDrive.logger.info("Failed to get ore named " + ore);
return new ItemStack(Blocks.fire);
}
final ArrayList<ItemStack> itemStacks = OreDictionary.getOres(ore);
final List<ItemStack> 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);

View file

@ -1,6 +1,5 @@
package cr0s.warpdrive.data;
import cr0s.warpdrive.Commons;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.api.IForceFieldShape;

View file

@ -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(),