From bf574c7c8c6838a06f72a3b747a6e8fafe9ed19e Mon Sep 17 00:00:00 2001 From: Calclavia Date: Sat, 25 Jan 2014 11:34:01 +0800 Subject: [PATCH] Reverted to Java 6 for FTB --- build.gradle | 2 - .../archaic/blocks/BlockTurntable.java | 2 +- .../electrical/MultipartElectrical.java | 37 ++++++++++++------- .../electrical/generator/BlockGenerator.java | 2 +- .../mechanical/MultipartMechanical.java | 11 +++--- .../fluid/pipe/ItemPipeRenderer.java | 10 ++--- .../fluid/prefab/TileFluidNetwork.java | 2 +- .../mechanical/fluid/pump/BlockGrate.java | 2 +- .../mechanical/process/BlockGrinderWheel.java | 2 +- 9 files changed, 40 insertions(+), 30 deletions(-) diff --git a/build.gradle b/build.gradle index 570d854bb..5def8841c 100644 --- a/build.gradle +++ b/build.gradle @@ -21,8 +21,6 @@ buildProps.withReader { ext.config = new ConfigSlurper().parse prop } -sourceCompatibility = 1.7 -targetCompatibility = 1.7 version = "${config.version.mod.major}.${config.version.mod.minor}.${config.version.mod.revis}" group = "resonantinduction" archivesBaseName = "Resonant-Induction" diff --git a/src/main/java/resonantinduction/archaic/blocks/BlockTurntable.java b/src/main/java/resonantinduction/archaic/blocks/BlockTurntable.java index 3d861a1c2..2c8cc1ec1 100644 --- a/src/main/java/resonantinduction/archaic/blocks/BlockTurntable.java +++ b/src/main/java/resonantinduction/archaic/blocks/BlockTurntable.java @@ -26,7 +26,7 @@ public class BlockTurntable extends BlockRIRotatable super("turntable"); setTextureName(Reference.PREFIX + "turntable_side"); setTickRandomly(true); - rotationMask = 0b111111; + rotationMask = Byte.parseByte("111111", 2); } @Override diff --git a/src/main/java/resonantinduction/electrical/MultipartElectrical.java b/src/main/java/resonantinduction/electrical/MultipartElectrical.java index 113767068..51de257c9 100644 --- a/src/main/java/resonantinduction/electrical/MultipartElectrical.java +++ b/src/main/java/resonantinduction/electrical/MultipartElectrical.java @@ -6,6 +6,8 @@ import resonantinduction.electrical.wire.flat.PartFlatSwitchWire; import resonantinduction.electrical.wire.flat.PartFlatWire; import resonantinduction.electrical.wire.framed.PartFramedSwitchWire; import resonantinduction.electrical.wire.framed.PartFramedWire; +import resonantinduction.mechanical.fluid.pipe.PartPipe; +import resonantinduction.mechanical.gear.PartGear; import codechicken.multipart.MultiPartRegistry; import codechicken.multipart.MultiPartRegistry.IPartFactory; import codechicken.multipart.MultipartGenerator; @@ -28,20 +30,29 @@ public class MultipartElectrical implements IPartFactory @Override public TMultiPart createPart(String name, boolean client) { - switch (name) + if (name.equals("resonant_induction_wire")) { - case "resonant_induction_wire": - return new PartFramedWire(); - case "resonant_induction_switch_wire": - return new PartFramedSwitchWire(); - case "resonant_induction_flat_wire": - return new PartFlatWire(); - case "resonant_induction_flat_switch_wire": - return new PartFlatSwitchWire(); - case "resonant_induction_multimeter": - return new PartMultimeter(); - case "resonant_induction_transformer": - return new PartTransformer(); + return new PartFramedWire(); + } + else if (name.equals("resonant_induction_switch_wire")) + { + return new PartFramedSwitchWire(); + } + else if (name.equals("resonant_induction_flat_wire")) + { + return new PartFlatWire(); + } + else if (name.equals("resonant_induction_flat_switch_wire")) + { + return new PartFlatSwitchWire(); + } + else if (name.equals("resonant_induction_multimeter")) + { + return new PartMultimeter(); + } + else if (name.equals("resonant_induction_transformer")) + { + return new PartTransformer(); } return null; diff --git a/src/main/java/resonantinduction/electrical/generator/BlockGenerator.java b/src/main/java/resonantinduction/electrical/generator/BlockGenerator.java index 1fc0fa021..4c83aa66b 100644 --- a/src/main/java/resonantinduction/electrical/generator/BlockGenerator.java +++ b/src/main/java/resonantinduction/electrical/generator/BlockGenerator.java @@ -15,7 +15,7 @@ public class BlockGenerator extends BlockRIRotatable { super("generator"); setTextureName(Reference.PREFIX + "material_steel"); - rotationMask = 0b111111; + rotationMask = Byte.parseByte("111111", 2); } @Override diff --git a/src/main/java/resonantinduction/mechanical/MultipartMechanical.java b/src/main/java/resonantinduction/mechanical/MultipartMechanical.java index ee0341779..7257afdbb 100644 --- a/src/main/java/resonantinduction/mechanical/MultipartMechanical.java +++ b/src/main/java/resonantinduction/mechanical/MultipartMechanical.java @@ -23,12 +23,13 @@ public class MultipartMechanical implements IPartFactory @Override public TMultiPart createPart(String name, boolean client) { - switch (name) + if (name.equals("resonant_induction_gear")) { - case "resonant_induction_gear": - return new PartGear(); - case "resonant_induction_pipe": - return new PartPipe(); + return new PartGear(); + } + else if (name.equals("resonant_induction_pipe")) + { + return new PartPipe(); } return null; diff --git a/src/main/java/resonantinduction/mechanical/fluid/pipe/ItemPipeRenderer.java b/src/main/java/resonantinduction/mechanical/fluid/pipe/ItemPipeRenderer.java index a726ea3a7..815a23228 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/pipe/ItemPipeRenderer.java +++ b/src/main/java/resonantinduction/mechanical/fluid/pipe/ItemPipeRenderer.java @@ -33,26 +33,26 @@ public class ItemPipeRenderer implements IItemRenderer if (type == ItemRenderType.ENTITY) { GL11.glTranslatef(-.5F, -1F, -.5F); - RenderPipe.render(meta, (byte) 0b001100); + RenderPipe.render(meta, Byte.parseByte("001100", 2)); } else if (type == ItemRenderType.INVENTORY) { GL11.glTranslatef(0F, -1F, 0F); - RenderPipe.render(meta, (byte) 0b001100); + RenderPipe.render(meta, Byte.parseByte("001100", 2)); } else if (type == ItemRenderType.EQUIPPED) { GL11.glTranslatef(-1F, -1.2F, 0.5F); - RenderPipe.render(meta, (byte) 0b000011); + RenderPipe.render(meta, Byte.parseByte("000011", 2)); } else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) { GL11.glTranslatef(-2F, -1.5F, 0.2F); - RenderPipe.render(meta, (byte) 0b000011); + RenderPipe.render(meta, Byte.parseByte("000011", 2)); } else { - RenderPipe.render(item.getItemDamage(), (byte) 0b000011); + RenderPipe.render(item.getItemDamage(), Byte.parseByte("000011", 2)); } GL11.glPopMatrix(); diff --git a/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java b/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java index d02a6c6f7..d51aabf7b 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java +++ b/src/main/java/resonantinduction/mechanical/fluid/prefab/TileFluidNetwork.java @@ -52,7 +52,7 @@ public abstract class TileFluidNetwork extends TileAdvanced implements IFluidCon public static final int PACKET_TANK = Mechanical.contentRegistry.getNextPacketID(); /** Bitmask that handles connections for the renderer **/ - public byte renderSides = 0b0; + public byte renderSides = 0; @Override public void initiate() diff --git a/src/main/java/resonantinduction/mechanical/fluid/pump/BlockGrate.java b/src/main/java/resonantinduction/mechanical/fluid/pump/BlockGrate.java index a24d28a37..aaeb0aba7 100644 --- a/src/main/java/resonantinduction/mechanical/fluid/pump/BlockGrate.java +++ b/src/main/java/resonantinduction/mechanical/fluid/pump/BlockGrate.java @@ -21,7 +21,7 @@ public class BlockGrate extends BlockRIRotatable public BlockGrate() { super("grate"); - rotationMask = 0b111111; + rotationMask = Byte.parseByte("111111", 2); } @Override diff --git a/src/main/java/resonantinduction/mechanical/process/BlockGrinderWheel.java b/src/main/java/resonantinduction/mechanical/process/BlockGrinderWheel.java index e444c6b24..7659bf44b 100644 --- a/src/main/java/resonantinduction/mechanical/process/BlockGrinderWheel.java +++ b/src/main/java/resonantinduction/mechanical/process/BlockGrinderWheel.java @@ -27,7 +27,7 @@ public class BlockGrinderWheel extends BlockRIRotatable implements ITileEntityPr super("grindingWheel", Settings.getNextBlockID()); setTextureName(Reference.PREFIX + "material_steel_dark"); setBlockBounds(0.05f, 0.05f, 0.05f, 0.95f, 0.95f, 0.95f); - rotationMask = 0b111111; + rotationMask = Byte.parseByte("111111", 2); } @Override