Code cleanup

This commit is contained in:
Unknown 2018-02-05 23:44:27 +01:00
parent e2b780eecd
commit 63a8cb02c3
4 changed files with 14 additions and 11 deletions

View file

@ -646,7 +646,7 @@ public class WarpDrive {
GameRegistry.registerItem(itemUpgrade, "itemUpgrade");
}
// TOOL ITEMS
// tool items
itemTuningFork = new ItemTuningFork();
GameRegistry.registerItem(itemTuningFork, "itemTuningFork");
@ -668,11 +668,14 @@ public class WarpDrive {
damageTeleportation = new DamageTeleportation();
damageWarm = new DamageWarm();
// entities
proxy.registerEntities();
proxy.registerRendering();
// chunk loading
ForgeChunkManager.setForcedChunkLoadingCallback(instance, ChunkLoadingHandler.INSTANCE);
// world generation
commonWorldGenerator = new CommonWorldGenerator();
GameRegistry.registerWorldGenerator(commonWorldGenerator, 0);

View file

@ -59,7 +59,7 @@ public abstract class TileEntityAbstractChunkLoading extends TileEntityAbstractE
isRefreshNeeded = true;
}
public synchronized void refreshLoading(final boolean force) {
private void refreshLoading(final boolean force) {
final boolean shouldChunkLoad = shouldChunkLoad();
if (shouldChunkLoad) {
if (ticket == null) {

View file

@ -140,16 +140,16 @@ public class TileEntityAirGeneratorTiered extends TileEntityAbstractEnergy {
}
@Override
public boolean energy_canInput(ForgeDirection from) {
public boolean energy_canInput(final ForgeDirection from) {
return true;
}
@Override
public String toString() {
return String.format("%s @ %s (%d %d %d)",
getClass().getSimpleName(),
worldObj == null ? "~NULL~" : worldObj.provider.getDimensionName(),
xCoord, yCoord, zCoord);
return String.format("%s @ %s (%d %d %d)",
getClass().getSimpleName(),
worldObj == null ? "~NULL~" : worldObj.provider.getDimensionName(),
xCoord, yCoord, zCoord);
}
public Object[] enable(Object[] arguments) {

View file

@ -172,10 +172,10 @@ public class TileEntityEnergyBank extends TileEntityAbstractEnergy {
@Override
public String toString() {
return String.format("%s @ %s (%d %d %d) %8d",
getClass().getSimpleName(),
worldObj == null ? "~NULL~" : worldObj.provider.getDimensionName(),
xCoord, yCoord, zCoord,
return String.format("%s @ %s (%d %d %d) %8d",
getClass().getSimpleName(),
worldObj == null ? "~NULL~" : worldObj.provider.getDimensionName(),
xCoord, yCoord, zCoord,
energy_getEnergyStored());
}
}