Code cleanup

This commit is contained in:
Unknown 2018-05-22 11:35:18 -04:00 committed by LemADEC
parent 5b2bd495da
commit 51d06eac37
12 changed files with 22 additions and 10 deletions

View file

@ -566,13 +566,14 @@ public class WarpDrive {
GameRegistry.registerBlock(blockWeaponController, ItemBlockAbstractBase.class, "blockWeaponController"); GameRegistry.registerBlock(blockWeaponController, ItemBlockAbstractBase.class, "blockWeaponController");
GameRegistry.registerTileEntity(TileEntityWeaponController.class, MODID + ":blockWeaponController"); GameRegistry.registerTileEntity(TileEntityWeaponController.class, MODID + ":blockWeaponController");
// COMPONENT ITEMS // component items
itemComponent = new ItemComponent(); itemComponent = new ItemComponent();
GameRegistry.registerItem(itemComponent, "itemComponent"); GameRegistry.registerItem(itemComponent, "itemComponent");
itemShipToken = new ItemShipToken(); itemShipToken = new ItemShipToken();
GameRegistry.registerItem(itemShipToken, "itemShipToken"); GameRegistry.registerItem(itemShipToken, "itemShipToken");
// warp armor
itemWarpArmor = new ItemArmor[4]; itemWarpArmor = new ItemArmor[4];
for (int armorPart = 0; armorPart < 4; armorPart++) { for (int armorPart = 0; armorPart < 4; armorPart++) {
itemWarpArmor[armorPart] = new ItemWarpArmor(armorMaterial, 3, armorPart); itemWarpArmor[armorPart] = new ItemWarpArmor(armorMaterial, 3, armorPart);

View file

@ -500,7 +500,8 @@ public class TileEntityShipScanner extends TileEntityAbstractInterfaced implemen
} }
if (!(block instanceof BlockShipCore)) { if (!(block instanceof BlockShipCore)) {
world.newExplosion(null, x, y, z, 1, false, false); world.newExplosion(null, x, y, z,
1, false, false);
reason.append(String.format("§cDeployment area occupied by %s.\nCan't deploy new ship at (%d %d %d)", reason.append(String.format("§cDeployment area occupied by %s.\nCan't deploy new ship at (%d %d %d)",
block.getLocalizedName(), block.getLocalizedName(),
x, y, z)); x, y, z));
@ -509,10 +510,12 @@ public class TileEntityShipScanner extends TileEntityAbstractInterfaced implemen
final TileEntity tileEntity = world.getTileEntity(x, y, z); final TileEntity tileEntity = world.getTileEntity(x, y, z);
if (!(tileEntity instanceof TileEntityShipCore)) { if (!(tileEntity instanceof TileEntityShipCore)) {
reason.append(String.format("§cDeployment area occupied with invalid tile entity %s.\nContact an admin for help at (%d %d %d)", reason.append(String.format("§cDeployment area occupied with invalid tile entity %s for ship core.\nContact an admin for help at (%d %d %d)",
block, x, y, z)); tileEntity,
x, y, z));
WarpDrive.logger.error(reason.toString()); WarpDrive.logger.error(reason.toString());
world.newExplosion(null, x, y, z, 1, false, false); world.newExplosion(null, x, y, z,
1, false, false);
return false; return false;
} }

View file

@ -144,7 +144,7 @@ public class CloakManager {
} }
} }
// call is inserted by ASM @SuppressWarnings("unused") // Core mod
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public static boolean onBlockChange(final int x, final int y, final int z, final Block block, final int metadata, final int flag) { public static boolean onBlockChange(final int x, final int y, final int z, final Block block, final int metadata, final int flag) {
if (block != Blocks.air) { if (block != Blocks.air) {
@ -161,7 +161,7 @@ public class CloakManager {
return Minecraft.getMinecraft().theWorld.setBlock(x, y, z, block, metadata, flag); return Minecraft.getMinecraft().theWorld.setBlock(x, y, z, block, metadata, flag);
} }
// call is inserted by ASM @SuppressWarnings("unused") // Core mod
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public static void onFillChunk(final Chunk chunk) { public static void onFillChunk(final Chunk chunk) {
if (cloaks == null) { if (cloaks == null) {

View file

@ -25,6 +25,7 @@ public class MessageBeamEffect implements IMessage, IMessageHandler<MessageBeamE
private float blue; private float blue;
private int age; private int age;
@SuppressWarnings("unused")
public MessageBeamEffect() { public MessageBeamEffect() {
// required on receiving side // required on receiving side
} }

View file

@ -23,6 +23,7 @@ public class MessageClientSync implements IMessage, IMessageHandler<MessageClien
private NBTTagCompound tagCompound; private NBTTagCompound tagCompound;
@SuppressWarnings("unused")
public MessageClientSync() { public MessageClientSync() {
// required on receiving side // required on receiving side
} }

View file

@ -18,6 +18,7 @@ public class MessageClientValidation implements IMessage, IMessageHandler<Messag
private String mapClass; private String mapClass;
@SuppressWarnings("unused")
public MessageClientValidation() { public MessageClientValidation() {
// required on receiving side // required on receiving side
} }

View file

@ -28,6 +28,7 @@ public class MessageCloak implements IMessage, IMessageHandler<MessageCloak, IMe
private byte tier; private byte tier;
private boolean decloak; private boolean decloak;
@SuppressWarnings("unused")
public MessageCloak() { public MessageCloak() {
// required on receiving side // required on receiving side
} }

View file

@ -42,6 +42,7 @@ public class MessageSpawnParticle implements IMessage, IMessageHandler<MessageSp
private float fadeGreen; private float fadeGreen;
private float fadeBlue; private float fadeBlue;
@SuppressWarnings("unused")
public MessageSpawnParticle() { public MessageSpawnParticle() {
// required on receiving side // required on receiving side
} }

View file

@ -20,6 +20,7 @@ public class MessageTargeting implements IMessage, IMessageHandler<MessageTarget
private float yaw; private float yaw;
private float pitch; private float pitch;
@SuppressWarnings("unused")
public MessageTargeting() { public MessageTargeting() {
// required on receiving side // required on receiving side
} }

View file

@ -45,6 +45,7 @@ public class MessageTransporterEffect implements IMessage, IMessageHandler<Messa
private int tickEnergizing; private int tickEnergizing;
private int tickCooldown; private int tickCooldown;
@SuppressWarnings("unused")
public MessageTransporterEffect() { public MessageTransporterEffect() {
// required on receiving side // required on receiving side
} }

View file

@ -21,6 +21,7 @@ public class MessageVideoChannel implements IMessage, IMessageHandler<MessageVid
private int z; private int z;
private int videoChannel; private int videoChannel;
@SuppressWarnings("unused")
public MessageVideoChannel() { public MessageVideoChannel() {
// required on receiving side // required on receiving side
} }

View file

@ -15,16 +15,16 @@ public class BiomeSpace extends BiomeGenBase {
@Override @Override
public float getSpawningChance() { public float getSpawningChance() {
return 0; return 0.0F;
} }
@Override @Override
public boolean canSpawnLightningBolt() { public boolean canSpawnLightningBolt() {
return false; return false;
} }
@Override @Override
public boolean getEnableSnow() { public boolean getEnableSnow() {
return false; return false;
} }
} }