From eaf8a4874684e5c466e94c6dd47d477d647e09aa Mon Sep 17 00:00:00 2001 From: PlayerWithoutName Date: Sat, 3 Jun 2017 02:30:15 +0200 Subject: [PATCH 01/17] Fixed evaporator liquid rendering --- .../client/render/RenderResizableCuboid.java | 3 +- .../RenderThermalEvaporationController.java | 172 ++++++++---------- 2 files changed, 78 insertions(+), 97 deletions(-) diff --git a/src/main/java/mekanism/client/render/RenderResizableCuboid.java b/src/main/java/mekanism/client/render/RenderResizableCuboid.java index db994b332..b750223ec 100644 --- a/src/main/java/mekanism/client/render/RenderResizableCuboid.java +++ b/src/main/java/mekanism/client/render/RenderResizableCuboid.java @@ -161,7 +161,8 @@ public class RenderResizableCuboid { wr.begin(GL11.GL_QUADS, shadeTypes.vertexFormat); for (EnumFacing face : EnumFacing.values()) { - renderCuboidFace(wr, face, sprites, flips, textureStart, textureSize, size, textureOffset, shadeTypes, formula, faceFormula, world); + if(cube.shouldSideRender(face)) + renderCuboidFace(wr, face, sprites, flips, textureStart, textureSize, size, textureOffset, shadeTypes, formula, faceFormula, world); } tess.draw(); diff --git a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java index ef8cb2a97..3ecaa87cb 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java @@ -19,25 +19,26 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.lwjgl.opengl.GL11; +import java.util.Arrays; @SideOnly(Side.CLIENT) public class RenderThermalEvaporationController extends TileEntitySpecialRenderer { - private static Map> cachedCenterFluids = new HashMap>(); + private static HashMap cachedCenterFluids = new HashMap(); + private static final int LEVELS = 16; + private static final int ALL_LEVELS = LEVELS + 2; + private static final int RING_INDEX = ALL_LEVELS-2; + private static final int CONCAVE_INDEX = ALL_LEVELS-1; @Override public void renderTileEntityAt(TileEntityThermalEvaporationController tileEntity, double x, double y, double z, float partialTick, int destroyStage) { if(tileEntity.structured && tileEntity.inputTank.getFluid() != null) { - SalinationRenderData data = new SalinationRenderData(); - - data.height = tileEntity.height-2; - data.side = tileEntity.facing; bindTexture(MekanismRenderer.getBlocksTexture()); - if(data.height >= 1 && tileEntity.inputTank.getCapacity() > 0) + if(tileEntity.height-2 >= 1 && tileEntity.inputTank.getCapacity() > 0) { push(); @@ -45,11 +46,41 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere MekanismRenderer.glowOn(tileEntity.inputTank.getFluid().getFluid().getLuminosity()); - DisplayInteger[] displayList = getListAndRender(data, tileEntity.inputTank.getFluid().getFluid()); + DisplayInteger[] displayList = getListAndRender(tileEntity.inputTank.getFluid().getFluid()); - float tankFillPercentage = Math.min(((float)tileEntity.inputTank.getFluidAmount()/tileEntity.inputTank.getCapacity()), 1); + float levels = Math.min(((float)tileEntity.inputTank.getFluidAmount()/tileEntity.inputTank.getCapacity()), 1); - displayList[(int)(tankFillPercentage * ((float)getStages(data.height)-1))].render(); + levels *= (tileEntity.height-2); + + int partialLevels = (int)((levels-(int)levels)*16); + + switch (tileEntity.facing) + { + case SOUTH: + GlStateManager.translate(-1, 0, -1); + break; + case EAST: + GlStateManager.translate(-1, 0, 0); + break; + case WEST: + GlStateManager.translate(0, 0, -1); + break; + } + + GlStateManager.translate(0, 0.01, 0); + + if((int)levels>0) + { + displayList[CONCAVE_INDEX].render(); + GlStateManager.translate(0, 1, 0); + + for (int i = 1; i < (int)levels; i++) + { + displayList[RING_INDEX].render(); + GlStateManager.translate(0, 1, 0); + } + } + displayList[partialLevels].render(); MekanismRenderer.glowOff(); @@ -74,118 +105,67 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); } + + @SuppressWarnings("incomplete-switch") - private DisplayInteger[] getListAndRender(SalinationRenderData data, Fluid fluid) + private DisplayInteger[] getListAndRender(Fluid fluid) { - if(cachedCenterFluids.containsKey(data) && cachedCenterFluids.get(data).containsKey(fluid)) + if(cachedCenterFluids.containsKey(fluid)) { - return cachedCenterFluids.get(data).get(fluid); + return cachedCenterFluids.get(fluid); } - Model3D toReturn = new Model3D(); - toReturn.baseBlock = Blocks.WATER; - toReturn.setTexture(MekanismRenderer.getFluidTexture(fluid, FluidType.STILL)); + DisplayInteger[] displays = new DisplayInteger[ALL_LEVELS]; - final int stages = getStages(data.height); - DisplayInteger[] displays = new DisplayInteger[stages]; - - if(cachedCenterFluids.containsKey(data)) - { - cachedCenterFluids.get(data).put(fluid, displays); - } - else { - HashMap map = new HashMap(); - map.put(fluid, displays); - cachedCenterFluids.put(data, map); - } + Model3D model = new Model3D(); + model.baseBlock = fluid.getBlock(); + model.setTexture(MekanismRenderer.getFluidTexture(fluid, FluidType.STILL)); MekanismRenderer.colorFluid(fluid); - for(int i = 0; i < stages; i++) + if(fluid.getStill() == null) { - displays[i] = DisplayInteger.createAndStart(); - - if(fluid.getStill() != null) + DisplayInteger empty = DisplayInteger.createAndStart(); + DisplayInteger.endList(); + Arrays.fill(displays, 0, LEVELS, empty); + } + else + { + model.setSideRender(EnumFacing.DOWN, false); + for (int i = 0; i < LEVELS; i++) { - switch(data.side) - { - case NORTH: - toReturn.minX = 0 + .01; - toReturn.minY = 0 + .01; - toReturn.minZ = 0 + .01; - - toReturn.maxX = 2 - .01; - toReturn.maxY = ((float)i/(float)stages)*data.height - .01; - toReturn.maxZ = 2 - .01; - break; - case SOUTH: - toReturn.minX = -1 + .01; - toReturn.minY = 0 + .01; - toReturn.minZ = -1 + .01; - - toReturn.maxX = 1 - .01; - toReturn.maxY = ((float)i/(float)stages)*data.height - .01; - toReturn.maxZ = 1 - .01; - break; - case WEST: - toReturn.minX = 0 + .01; - toReturn.minY = 0 + .01; - toReturn.minZ = -1 + .01; - - toReturn.maxX = 2 - .01; - toReturn.maxY = ((float)i/(float)stages)*data.height - .01; - toReturn.maxZ = 1 - .01; - break; - case EAST: - toReturn.minX = -1 + .01; - toReturn.minY = 0 + .01; - toReturn.minZ = 0 + .01; - - toReturn.maxX = 1 - .01; - toReturn.maxY = ((float)i/(float)stages)*data.height - .01; - toReturn.maxZ = 2 - .01; - break; - } - - MekanismRenderer.renderObject(toReturn); + displays[i] = generateLevel(i, model); } - - displays[i].endList(); + model.setSideRender(EnumFacing.UP, false); + displays[RING_INDEX] = generateLevel(LEVELS-1, model); + model.setSideRender(EnumFacing.DOWN, true); + displays[CONCAVE_INDEX] = generateLevel(LEVELS-1, model); } MekanismRenderer.resetColor(); - return displays; } - private int getStages(int height) + private DisplayInteger generateLevel(int height, Model3D model) { - return height*(TankUpdateProtocol.FLUID_PER_TANK/10); - } + DisplayInteger displayInteger = DisplayInteger.createAndStart(); - public static class SalinationRenderData - { - public int height; - public EnumFacing side; + model.minX = 0 + .01; + model.minY = 0; + model.minZ = 0 + .01; + model.maxX = 2 - .01; + model.maxY = (float)height/(float)(LEVELS-1) + (height==0?.02:0); + model.maxZ = 2 - .01; - @Override - public int hashCode() - { - int code = 1; - code = 31 * code + height; - return code; - } + MekanismRenderer.renderObject(model); + DisplayInteger.endList(); - @Override - public boolean equals(Object data) - { - return data instanceof SalinationRenderData && ((SalinationRenderData)data).height == height && - ((SalinationRenderData)data).side == side; - } + return displayInteger; } public static void resetDisplayInts() { cachedCenterFluids.clear(); } -} + +} \ No newline at end of file From b6d77c595d39bcca24795dbff1d3f1408bdb3d1e Mon Sep 17 00:00:00 2001 From: PlayerWithoutName Date: Tue, 13 Jun 2017 18:49:37 +0200 Subject: [PATCH 02/17] Fixed fluid caching --- .../render/tileentity/RenderThermalEvaporationController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java index 3ecaa87cb..94e4f89d0 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java @@ -106,8 +106,6 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere } - - @SuppressWarnings("incomplete-switch") private DisplayInteger[] getListAndRender(Fluid fluid) { if(cachedCenterFluids.containsKey(fluid)) @@ -143,6 +141,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere } MekanismRenderer.resetColor(); + cachedCenterFluids.put(fluid, displays); return displays; } From 122d3d86e0fb68a92f9d63fca12b9a240e1944b2 Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Thu, 20 Jul 2017 14:11:48 +0200 Subject: [PATCH 03/17] Move CTM from internal code to CTM-mod. Currently WIP as not everything is working as before. --- build.gradle | 6 + build.properties | 1 + .../java/mekanism/client/ClientProxy.java | 10 +- .../java/mekanism/client/render/ctm/CTM.java | 349 ----------- .../render/ctm/CTMBlockRenderContext.java | 59 -- .../client/render/ctm/CTMConnections.java | 224 ------- .../mekanism/client/render/ctm/CTMData.java | 47 -- .../client/render/ctm/CTMModelFactory.java | 227 -------- .../client/render/ctm/CTMRegistry.java | 83 --- .../java/mekanism/client/render/ctm/Dir.java | 185 ------ .../mekanism/client/render/ctm/ICTMBlock.java | 15 - .../mekanism/client/render/ctm/ISubmap.java | 24 - .../mekanism/client/render/ctm/ModelCTM.java | 93 --- .../render/ctm/PropertyCTMRenderContext.java | 33 -- .../java/mekanism/client/render/ctm/Quad.java | 548 ------------------ .../mekanism/client/render/ctm/Submap.java | 125 ---- .../client/render/ctm/TextureCTM.java | 61 -- .../render/ctm/TextureSpriteCallback.java | 34 -- .../render/item/BakedCustomItemModel.java | 38 +- .../client/render/obj/GlowPanelModel.java | 38 +- .../client/render/obj/TransmitterModel.java | 33 +- .../mekanism/common/block/BlockBasic.java | 107 +--- .../mekanism/common/block/BlockMachine.java | 51 +- .../common/block/states/BlockStateBasic.java | 4 +- .../block/states/BlockStateMachine.java | 2 +- .../common/config/MekanismConfig.java | 1 - .../client/GeneratorsClientProxy.java | 5 - .../render/item/BakedGeneratorItemModel.java | 28 +- .../common/block/BlockGenerator.java | 54 +- .../generators/common/block/BlockReactor.java | 87 +-- .../block/states/BlockStateGenerator.java | 2 +- .../block/states/BlockStateReactor.java | 2 +- .../mekanism/blockstates/boiler_casing.json | 2 +- .../mekanism/blockstates/boiler_valve.json | 2 +- .../mekanism/blockstates/dynamic_tank.json | 2 +- .../mekanism/blockstates/dynamic_valve.json | 2 +- .../blockstates/electromagnetic_coil.json | 2 +- .../blockstates/induction_casing.json | 2 +- .../blockstates/induction_cell_advanced.json | 2 +- .../blockstates/induction_cell_basic.json | 2 +- .../blockstates/induction_cell_elite.json | 2 +- .../blockstates/induction_cell_ultimate.json | 2 +- .../mekanism/blockstates/induction_port.json | 2 +- .../induction_provider_advanced.json | 2 +- .../blockstates/induction_provider_basic.json | 2 +- .../blockstates/induction_provider_elite.json | 2 +- .../induction_provider_ultimate.json | 2 +- .../blockstates/structural_glass.json | 2 +- .../blockstates/superheating_element.json | 2 +- .../mekanism/blockstates/teleporter.json | 2 +- .../blockstates/teleporter_frame.json | 2 +- .../thermal_evaporation_block.json | 2 +- .../thermal_evaporation_controller.json | 4 +- .../thermal_evaporation_valve.json | 2 +- .../blocks/{ctm => }/boiler_casing-ctm.png | Bin .../blocks/{ctm => }/boiler_casing.png | Bin .../textures/blocks/boiler_casing.png.mcmeta | 10 + .../blocks/{ctm => }/boiler_valve-ctm.png | Bin .../blocks/{ctm => }/boiler_valve.png | Bin .../textures/blocks/boiler_valve.png.mcmeta | 10 + ...l_evaporation_controller_on-ctm.png.mcmeta | 5 - ...ermal_evaporation_controller_on.png.mcmeta | 5 - .../blocks/{ctm => }/dynamic_tank-ctm.png | Bin .../blocks/{ctm => }/dynamic_tank.png | Bin .../textures/blocks/dynamic_tank.png.mcmeta | 10 + .../blocks/{ctm => }/dynamic_valve-ctm.png | Bin .../blocks/{ctm => }/dynamic_valve.png | Bin .../textures/blocks/dynamic_valve.png.mcmeta | 10 + .../blocks/{ctm => }/induction_casing-ctm.png | Bin .../blocks/{ctm => }/induction_casing.png | Bin .../blocks/induction_casing.png.mcmeta | 10 + .../{ctm => }/induction_cell_advanced-ctm.png | Bin .../{ctm => }/induction_cell_advanced.png | Bin .../blocks/induction_cell_advanced.png.mcmeta | 10 + .../{ctm => }/induction_cell_basic-ctm.png | Bin .../blocks/{ctm => }/induction_cell_basic.png | Bin .../blocks/induction_cell_basic.png.mcmeta | 10 + .../{ctm => }/induction_cell_elite-ctm.png | Bin .../blocks/{ctm => }/induction_cell_elite.png | Bin .../blocks/induction_cell_elite.png.mcmeta | 10 + .../{ctm => }/induction_cell_ultimate-ctm.png | Bin .../{ctm => }/induction_cell_ultimate.png | Bin .../blocks/induction_cell_ultimate.png.mcmeta | 10 + .../blocks/{ctm => }/induction_port-ctm.png | Bin .../blocks/{ctm => }/induction_port.png | Bin .../textures/blocks/induction_port.png.mcmeta | 10 + .../{ctm => }/induction_port_output-ctm.png | Bin .../{ctm => }/induction_port_output.png | Bin .../blocks/induction_port_output.png.mcmeta | 10 + .../induction_provider_advanced-ctm.png | Bin .../{ctm => }/induction_provider_advanced.png | Bin .../induction_provider_advanced.png.mcmeta | 10 + .../induction_provider_basic-ctm.png | Bin .../{ctm => }/induction_provider_basic.png | Bin .../induction_provider_basic.png.mcmeta | 10 + .../induction_provider_elite-ctm.png | Bin .../{ctm => }/induction_provider_elite.png | Bin .../induction_provider_elite.png.mcmeta | 10 + .../induction_provider_ultimate-ctm.png | Bin .../{ctm => }/induction_provider_ultimate.png | Bin .../induction_provider_ultimate.png.mcmeta | 10 + .../blocks/{ctm => }/structural_glass-ctm.png | Bin .../blocks/{ctm => }/structural_glass.png | Bin .../blocks/structural_glass.png.mcmeta | 10 + .../{ctm => }/superheating_element-ctm.png | Bin .../blocks/{ctm => }/superheating_element.png | Bin .../blocks/superheating_element.png.mcmeta | 10 + .../{ctm => }/superheating_element_on-ctm.png | Bin .../{ctm => }/superheating_element_on.png | Bin .../blocks/superheating_element_on.png.mcmeta | 10 + .../blocks/{ctm => }/teleporter-ctm.png | Bin .../textures/blocks/{ctm => }/teleporter.png | Bin .../textures/blocks/teleporter.png.mcmeta | 10 + .../blocks/{ctm => }/teleporter_frame-ctm.png | Bin .../blocks/{ctm => }/teleporter_frame.png | Bin .../blocks/teleporter_frame.png.mcmeta | 10 + .../thermal_evaporation_block-ctm.png | Bin .../{ctm => }/thermal_evaporation_block.png | Bin .../thermal_evaporation_block.png.mcmeta | 10 + .../thermal_evaporation_controller-ctm.png | Bin .../thermal_evaporation_controller.png | Bin .../thermal_evaporation_controller.png.mcmeta | 10 + .../thermal_evaporation_controller_on-ctm.png | Bin .../thermal_evaporation_controller_on.png | Bin ...ermal_evaporation_controller_on.png.mcmeta | 13 + .../thermal_evaporation_valve-ctm.png | Bin .../{ctm => }/thermal_evaporation_valve.png | Bin .../thermal_evaporation_valve.png.mcmeta | 10 + .../blockstates/electromagnetic_coil.json | 2 +- .../blockstates/laser_focus_matrix.json | 2 +- .../blockstates/reactor_controller.json | 6 +- .../blockstates/reactor_frame.json | 2 +- .../blockstates/reactor_glass.json | 2 +- .../blockstates/reactor_logic_adapter.json | 2 +- .../blockstates/reactor_port.json | 2 +- .../blockstates/saturating_condenser.json | 2 +- .../blockstates/turbine_casing.json | 2 +- .../blockstates/turbine_valve.json | 2 +- .../blockstates/turbine_vent.json | 2 +- .../{ctm => }/electromagnetic_coil-ctm.png | Bin .../blocks/{ctm => }/electromagnetic_coil.png | Bin .../blocks/electromagnetic_coil.png.mcmeta | 10 + .../{ctm => }/laser_focus_matrix-ctm.png | Bin .../blocks/{ctm => }/laser_focus_matrix.png | Bin .../blocks/laser_focus_matrix.png.mcmeta | 10 + .../{ctm => }/reactor_controller-ctm.png | Bin .../blocks/{ctm => }/reactor_controller.png | Bin .../blocks/reactor_controller.png.mcmeta | 10 + .../{ctm => }/reactor_controller_on-ctm.png | Bin .../{ctm => }/reactor_controller_on.png | Bin .../blocks/reactor_controller_on.png.mcmeta | 10 + .../blocks/{ctm => }/reactor_frame-ctm.png | Bin .../blocks/{ctm => }/reactor_frame.png | Bin .../textures/blocks/reactor_frame.png.mcmeta | 10 + .../blocks/{ctm => }/reactor_glass-ctm.png | Bin .../blocks/{ctm => }/reactor_glass.png | Bin .../textures/blocks/reactor_glass.png.mcmeta | 10 + .../{ctm => }/reactor_logic_adapter-ctm.png | Bin .../{ctm => }/reactor_logic_adapter.png | Bin .../blocks/reactor_logic_adapter.png.mcmeta | 10 + .../{ctm => }/reactor_neutron_capture-ctm.png | Bin .../{ctm => }/reactor_neutron_capture.png | Bin .../blocks/reactor_neutron_capture.png.mcmeta | 10 + .../blocks/{ctm => }/reactor_port-ctm.png | Bin .../blocks/{ctm => }/reactor_port.png | Bin .../textures/blocks/reactor_port.png.mcmeta | 10 + .../{ctm => }/reactor_port_output-ctm.png | Bin .../blocks/{ctm => }/reactor_port_output.png | Bin .../blocks/reactor_port_output.png.mcmeta | 10 + .../{ctm => }/saturating_condenser-ctm.png | Bin .../blocks/{ctm => }/saturating_condenser.png | Bin .../blocks/saturating_condenser.png.mcmeta | 10 + .../blocks/{ctm => }/turbine_casing-ctm.png | Bin .../blocks/{ctm => }/turbine_casing.png | Bin .../textures/blocks/turbine_casing.png.mcmeta | 10 + .../blocks/{ctm => }/turbine_valve-ctm.png | Bin .../blocks/{ctm => }/turbine_valve.png | Bin .../textures/blocks/turbine_valve.png.mcmeta | 10 + .../blocks/{ctm => }/turbine_vent-ctm.png | Bin .../blocks/{ctm => }/turbine_vent.png | Bin .../textures/blocks/turbine_vent.png.mcmeta | 10 + 181 files changed, 562 insertions(+), 2479 deletions(-) delete mode 100644 src/main/java/mekanism/client/render/ctm/CTM.java delete mode 100644 src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java delete mode 100644 src/main/java/mekanism/client/render/ctm/CTMConnections.java delete mode 100644 src/main/java/mekanism/client/render/ctm/CTMData.java delete mode 100644 src/main/java/mekanism/client/render/ctm/CTMModelFactory.java delete mode 100644 src/main/java/mekanism/client/render/ctm/CTMRegistry.java delete mode 100644 src/main/java/mekanism/client/render/ctm/Dir.java delete mode 100644 src/main/java/mekanism/client/render/ctm/ICTMBlock.java delete mode 100644 src/main/java/mekanism/client/render/ctm/ISubmap.java delete mode 100644 src/main/java/mekanism/client/render/ctm/ModelCTM.java delete mode 100644 src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java delete mode 100644 src/main/java/mekanism/client/render/ctm/Quad.java delete mode 100644 src/main/java/mekanism/client/render/ctm/Submap.java delete mode 100644 src/main/java/mekanism/client/render/ctm/TextureCTM.java delete mode 100644 src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/boiler_casing-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/boiler_casing.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/boiler_valve-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/boiler_valve.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta delete mode 100644 src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta delete mode 100644 src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/dynamic_tank-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/dynamic_tank.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/dynamic_valve-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/dynamic_valve.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_casing-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_casing.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_advanced-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_advanced.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_basic-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_basic.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_elite-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_elite.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_ultimate-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_cell_ultimate.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_port-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_port.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_port_output-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_port_output.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_advanced-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_advanced.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_basic-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_basic.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_elite-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_elite.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_ultimate-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/induction_provider_ultimate.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/structural_glass-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/structural_glass.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/structural_glass.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/superheating_element-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/superheating_element.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/superheating_element.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/superheating_element_on-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/superheating_element_on.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/teleporter-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/teleporter.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/teleporter_frame-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/teleporter_frame.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_block-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_block.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_controller-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_controller.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_controller_on-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_controller_on.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_valve-ctm.png (100%) rename src/main/resources/assets/mekanism/textures/blocks/{ctm => }/thermal_evaporation_valve.png (100%) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/electromagnetic_coil-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/electromagnetic_coil.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/laser_focus_matrix-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/laser_focus_matrix.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_controller-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_controller.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_controller_on-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_controller_on.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_frame-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_frame.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_glass-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_glass.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_logic_adapter-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_logic_adapter.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_neutron_capture-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_neutron_capture.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_port-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_port.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_port_output-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/reactor_port_output.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/saturating_condenser-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/saturating_condenser.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_casing-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_casing.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_valve-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_valve.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_vent-ctm.png (100%) rename src/main/resources/assets/mekanismgenerators/textures/blocks/{ctm => }/turbine_vent.png (100%) create mode 100644 src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta diff --git a/build.gradle b/build.gradle index 029b88844..e2b5f35b7 100644 --- a/build.gradle +++ b/build.gradle @@ -57,6 +57,10 @@ repositories { name 'hwyla' url 'http://tehnut.info/maven' } + maven { + name 'tterrag' + url 'http://maven.tterrag.com/' + } } // Define properties file @@ -90,6 +94,8 @@ dependencies { compile "inventory-tweaks:InventoryTweaks:${config.invtweak_version}:api" compile "li.cil.oc:OpenComputers:MC${config.minecraft_version}-${config.opencomputers_version}:api" deobfCompile "mcp.mobius.waila:Hwyla:${config.hwyla_version}" + deobfProvided "team.chisel.ctm:CTM:MC${config.minecraft_version}-${config.ctm_version}:api" + runtime "team.chisel.ctm:CTM:MC${config.minecraft_version}-${config.ctm_version}" } processResources diff --git a/build.properties b/build.properties index db230f8a1..9de43b532 100644 --- a/build.properties +++ b/build.properties @@ -8,3 +8,4 @@ tesla_version=1.11-1.3.0.52 invtweak_version=1.62+beta.89 opencomputers_version=1.7.0.24 hwyla_version=1.8.13-B26_1.11 +ctm_version=0.2.0.8 diff --git a/src/main/java/mekanism/client/ClientProxy.java b/src/main/java/mekanism/client/ClientProxy.java index e86d353dc..409c11bb6 100644 --- a/src/main/java/mekanism/client/ClientProxy.java +++ b/src/main/java/mekanism/client/ClientProxy.java @@ -71,7 +71,6 @@ import mekanism.client.gui.GuiTransporterConfig; import mekanism.client.gui.GuiUpgradeManagement; import mekanism.client.render.MekanismRenderer; import mekanism.client.render.RenderTickHandler; -import mekanism.client.render.ctm.CTMRegistry; import mekanism.client.render.entity.RenderBalloon; import mekanism.client.render.entity.RenderFlame; import mekanism.client.render.entity.RenderObsidianTNTPrimed; @@ -279,7 +278,6 @@ public class ClientProxy extends CommonProxy client.machineEffects = Mekanism.configuration.get("client", "MachineEffects", true).getBoolean(); client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true, "If true, will reduce lagging between player sounds. Setting to false will reduce GC load").getBoolean(); - client.renderCTM = Mekanism.configuration.get("client", "CTMRenderer", true).getBoolean(); client.enableAmbientLighting = Mekanism.configuration.get("client", "EnableAmbientLighting", true).getBoolean(); client.ambientLightingLevel = Mekanism.configuration.get("client", "AmbientLightingLevel", 15).getInt(); client.opaqueTransmitters = Mekanism.configuration.get("client", "OpaqueTransmitterRender", false).getBoolean(); @@ -1070,8 +1068,7 @@ public class ClientProxy extends CommonProxy MekanismRenderer.init(); ModelLoaderRegistry.registerLoader(MekanismOBJLoader.INSTANCE); - - MinecraftForge.EVENT_BUS.register(new CTMRegistry()); + MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(MekanismOBJLoader.INSTANCE); @@ -1152,11 +1149,6 @@ public class ClientProxy extends CommonProxy return ItemCraftingFormula.MODEL; } }); - - CTMRegistry.registerCTMs("mekanism", "dynamic_tank", "structural_glass", "dynamic_valve", "teleporter", "teleporter_frame", "induction_casing", "induction_port", "induction_port_output", - "induction_cell_basic", "induction_cell_advanced", "induction_cell_elite", "induction_cell_ultimate", "induction_provider_basic", "induction_provider_advanced", "induction_provider_elite", - "induction_provider_ultimate", "thermal_evaporation_controller", "thermal_evaporation_controller_on", "thermal_evaporation_valve", "superheating_element", "superheating_element_on", - "boiler_casing", "boiler_valve", "thermal_evaporation_valve", "thermal_evaporation_block"); } @Override diff --git a/src/main/java/mekanism/client/render/ctm/CTM.java b/src/main/java/mekanism/client/render/ctm/CTM.java deleted file mode 100644 index 3e5197e84..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTM.java +++ /dev/null @@ -1,349 +0,0 @@ -package mekanism.client.render.ctm; - -import static mekanism.client.render.ctm.Dir.BOTTOM; -import static mekanism.client.render.ctm.Dir.BOTTOM_LEFT; -import static mekanism.client.render.ctm.Dir.BOTTOM_RIGHT; -import static mekanism.client.render.ctm.Dir.LEFT; -import static mekanism.client.render.ctm.Dir.RIGHT; -import static mekanism.client.render.ctm.Dir.TOP; -import static mekanism.client.render.ctm.Dir.TOP_LEFT; -import static mekanism.client.render.ctm.Dir.TOP_RIGHT; -import gnu.trove.map.TIntObjectMap; -import gnu.trove.map.hash.TIntObjectHashMap; - -import java.util.EnumMap; -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -import com.google.common.base.Optional; -import com.google.common.collect.Maps; - -// @formatter:off -/** - * The CTM renderer will draw the block's FACE using by assembling 4 quadrants from the 5 available block - * textures. The normal Texture.png is the blocks "unconnected" texture, and is used when CTM is disabled or the block - * has nothing to connect to. This texture has all of the outside corner quadrants The texture-ctm.png contains the - * rest of the quadrants. - *
- * ┌─────────────────┐ ┌────────────────────────────────┐ - * │ texture.png │ │ texture-ctm.png │ - * │ ╔══════╤══════╗ │ │ ──────┼────── ║ ─────┼───── ║ │ - * │ ║ │ ║ │ │ │ │ │║ │ ║ │ - * │ ║ 16 │ 17 ║ │ │ │ 0 │ 1 │║ 2 │ 3 ║ │ - * │ ╟──────┼──────╢ │ │ ┼──────┼──────┼╟──────┼──────╢ │ - * │ ║ │ ║ │ │ │ │ │║ │ ║ │ - * │ ║ 18 │ 19 ║ │ │ │ 4 │ 5 │║ 6 │ 7 ║ │ - * │ ╚══════╧══════╝ │ │ ──────┼────── ║ ─────┼───── ║ │ - * └─────────────────┘ │ ═══════╤═══════╝ ─────┼───── ╚ │ - * │ │ │ ││ │ │ │ - * │ │ 8 │ 9 ││ 10 │ 11 │ │ - * │ ┼──────┼──────┼┼──────┼──────┼ │ - * │ │ │ ││ │ │ │ - * │ │ 12 │ 13 ││ 14 │ 15 │ │ - * │ ═══════╧═══════╗ ─────┼───── ╔ │ - * └────────────────────────────────┘ - *
- * combining { 18, 13, 9, 16 }, we can generate a texture connected to the right! - *
- * ╔══════╤═══════ - * ║ │ │ - * ║ 16 │ 9 │ - * ╟──────┼──────┼ - * ║ │ │ - * ║ 18 │ 13 │ - * ╚══════╧═══════ - *
- * - * combining { 18, 13, 11, 2 }, we can generate a texture, in the shape of an L (connected to the right, and up - *
- * ║ ─────┼───── ╚ - * ║ │ │ - * ║ 2 │ 11 │ - * ╟──────┼──────┼ - * ║ │ │ - * ║ 18 │ 13 │ - * ╚══════╧═══════ - *
- * - * HAVE FUN! - * -CptRageToaster- - */ -public class CTM { - public static int REQUIRED_TEXTURES = 2; - public static int QUADS_PER_SIDE = 4; - - /** - * The Uvs for the specific "magic number" value - */ - public static final ISubmap[] uvs = new ISubmap[]{ - //Ctm texture - new Submap(4, 4, 0, 0), // 0 - new Submap(4, 4, 4, 0), // 1 - new Submap(4, 4, 8, 0), // 2 - new Submap(4, 4, 12, 0), // 3 - new Submap(4, 4, 0, 4), // 4 - new Submap(4, 4, 4, 4), // 5 - new Submap(4, 4, 8, 4), // 6 - new Submap(4, 4, 12, 4), // 7 - new Submap(4, 4, 0, 8), // 8 - new Submap(4, 4, 4, 8), // 9 - new Submap(4, 4, 8, 8), // 10 - new Submap(4, 4, 12, 8), // 11 - new Submap(4, 4, 0, 12), // 12 - new Submap(4, 4, 4, 12), // 13 - new Submap(4, 4, 8, 12), // 14 - new Submap(4, 4, 12, 12), // 15 - // Default texture - new Submap(8, 8, 0, 0), // 16 - new Submap(8, 8, 8, 0), // 17 - new Submap(8, 8, 0, 8), // 18 - new Submap(8, 8, 8, 8) // 19 - }; - - public static final ISubmap FULL_TEXTURE = new Submap(16, 16, 0, 0); - - // @formatter:on - - /** Some hardcoded offset values for the different corner indeces */ - protected static int[] submapOffsets = { 4, 5, 1, 0 }; - /** For use via the Chisel 2 config only, altering this could cause unintended behavior */ - public static boolean disableObscuredFaceCheckConfig = false; - - public Optional disableObscuredFaceCheck = Optional.absent(); - - protected TIntObjectMap submapMap = new TIntObjectHashMap(); - protected EnumMap connectionMap = Maps.newEnumMap(Dir.class); - protected int[] submapCache; - - protected CTM() - { - for (Dir dir : Dir.VALUES) - { - connectionMap.put(dir, false); - } - - // Mapping the different corner indeces to their respective dirs - submapMap.put(0, new Dir[] { BOTTOM, LEFT, BOTTOM_LEFT }); - submapMap.put(1, new Dir[] { BOTTOM, RIGHT, BOTTOM_RIGHT }); - submapMap.put(2, new Dir[] { TOP, RIGHT, TOP_RIGHT }); - submapMap.put(3, new Dir[] { TOP, LEFT, TOP_LEFT }); - } - - public static CTM getInstance() { - return new CTM(); - } - - /** - * @return The indeces of the typical 4x4 submap to use for the given face at the given location. - * - * Indeces are in counter-clockwise order starting at bottom left. - */ - public int[] createSubmapIndices(IBlockAccess world, BlockPos pos, EnumFacing side) { - submapCache = new int[] { 18, 19, 17, 16 }; - - if (world == null) { - return submapCache; - } - - buildConnectionMap(world, pos, side); - - // Map connections to submap indeces - for (int i = 0; i < 4; i++) { - fillSubmaps(i); - } - - return submapCache; - } - - public int[] createSubmapIndices(long data, EnumFacing side){ - submapCache = new int[] { 18, 19, 17, 16 }; - - buildConnectionMap(data, side); - - // Map connections to submap indeces - for (int i = 0; i < 4; i++) { - fillSubmaps(i); - } - - return submapCache; - } - - public int[] getSubmapIndices() { - return submapCache; - } - - public static boolean isDefaultTexture(int id) { - return (id == 16 || id == 17 || id == 18 || id == 19); - } - - /** - * Builds the connection map and stores it in this CTM instance. The {@link #connected(Dir)}, {@link #connectedAnd(Dir...)}, and {@link #connectedOr(Dir...)} methods can be used to access it. - */ - public void buildConnectionMap(IBlockAccess world, BlockPos pos, EnumFacing side) { - IBlockState state = world.getBlockState(pos); - for (Dir dir : Dir.VALUES) { - connectionMap.put(dir, dir.isConnected(this, world, pos, side, state)); - } - } - - public void buildConnectionMap(long data, EnumFacing side){ - for (Dir dir : Dir.VALUES){ - connectionMap.put(dir, false); - } - List connections = CTMConnections.decode(data); - for (CTMConnections loc : connections){ - if (loc.getDirForSide(side) != null){ - connectionMap.put(loc.getDirForSide(side), true); - } - } - } - - private void fillSubmaps(int idx) { - Dir[] dirs = submapMap.get(idx); - if (connectedOr(dirs[0], dirs[1])) { - if (connectedAnd(dirs)) { - // If all dirs are connected, we use the fully connected face, - // the base offset value. - submapCache[idx] = submapOffsets[idx]; - } else { - // This is a bit magic-y, but basically the array is ordered so - // the first dir requires an offset of 2, and the second dir - // requires an offset of 8, plus the initial offset for the - // corner. - submapCache[idx] = submapOffsets[idx] + (connected(dirs[0]) ? 2 : 0) + (connected(dirs[1]) ? 8 : 0); - } - } - } - - /** - * @param dir - * The direction to check connection in. - * @return True if the cached connectionMap holds a connection in this {@link Dir direction}. - */ - public boolean connected(Dir dir) { - return connectionMap.get(dir); - } - - /** - * @param dirs - * The directions to check connection in. - * @return True if the cached connectionMap holds a connection in all the given {@link Dir directions}. - */ - public boolean connectedAnd(Dir... dirs) { - for (Dir dir : dirs) { - if (!connected(dir)) { - return false; - } - } - return true; - } - - /** - * @param dirs - * The directions to check connection in. - * @return True if the cached connectionMap holds a connection in one of the given {@link Dir directions}. - */ - public boolean connectedOr(Dir... dirs) { - for (Dir dir : dirs) { - if (connected(dir)) { - return true; - } - } - return false; - } - - /** - * A simple check for if the given block can connect to the given direction on the given side. - * - * @param world - * @param current - * The position of your block. - * @param y - * The position of the block to check against. - * @param dir - * The {@link EnumFacing side} of the block to check for connection status. This is not the direction to check in. - * @return True if the given block can connect to the given location on the given side. - */ - public boolean isConnected(IBlockAccess world, BlockPos current, BlockPos connection, EnumFacing dir) { - - IBlockState state = world.getBlockState(current); - return isConnected(world, current, connection, dir, state); - } - - /** - * A simple check for if the given block can connect to the given direction on the given side. - * - * @param world - * @param current - * The position of your block. - * @param y - * The position of the block to check against. - * @param dir - * The {@link EnumFacing side} of the block to check for connection status. This is not the direction to check in. - * @param state - * The state to check against for connection. - * @return True if the given block can connect to the given location on the given side. - */ - public boolean isConnected(IBlockAccess world, BlockPos current, BlockPos connection, EnumFacing dir, IBlockState state) - { - BlockPos pos2 = connection.add(dir.getDirectionVec()); - - boolean disableObscured = disableObscuredFaceCheck.or(disableObscuredFaceCheckConfig); - - IBlockState obscuring = disableObscured ? null : getConnectedState(world, pos2, dir); - - boolean ret = canConnect(world, current, connection); - - // no block obscuring this face - if(obscuring == null) - { - return ret; - } - - // check that we aren't already connected outwards from this side - ret &= !obscuring.isFullCube() || !obscuring.equals(state); - - return ret; - } - - public static boolean canConnect(IBlockAccess world, BlockPos pos, BlockPos connection) - { - IBlockState state = world.getBlockState(pos); - IBlockState con = world.getBlockState(connection); - - if(!(state.getBlock() instanceof ICTMBlock)) - { - return false; - } - - CTMData data = ((ICTMBlock)state.getBlock()).getCTMData(state); - - // no block or a bad API user - if(con == null || data == null) - { - return false; - } - - boolean ret = false; - - if(con.getBlock() instanceof ICTMBlock && ((ICTMBlock)con.getBlock()).getCTMData(con) != null) - { - String state2 = ((IStringSerializable)con.getValue(((ICTMBlock)con.getBlock()).getTypeProperty())).getName(); - - ret = data.acceptableBlockStates.contains(state2); - } - - return ret; - } - - public static IBlockState getConnectedState(IBlockAccess world, BlockPos pos, EnumFacing side) - { - IBlockState state = world.getBlockState(pos); - return state; - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java b/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java deleted file mode 100644 index 26e437bee..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTMBlockRenderContext.java +++ /dev/null @@ -1,59 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.EnumMap; - -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -import org.apache.commons.lang3.ArrayUtils; - -import static mekanism.client.render.ctm.CTMConnections.*; - -public class CTMBlockRenderContext -{ - private static final CTMConnections[] CACHED_LOCATIONS = ArrayUtils.removeElements(CTMConnections.VALUES, UP_UP, DOWN_DOWN, EAST_EAST, WEST_WEST, NORTH_NORTH, SOUTH_SOUTH); - - private EnumMap ctmData = new EnumMap<>(EnumFacing.class); - - private long data; - - public CTMBlockRenderContext(IBlockAccess world, BlockPos pos) - { - for(EnumFacing face : EnumFacing.VALUES) - { - CTM ctm = createCTM(); - ctm.createSubmapIndices(world, pos, face); - ctmData.put(face, ctm); - } - - data = CTMConnections.getData(world, pos, CACHED_LOCATIONS); - } - - public CTMBlockRenderContext(long d) - { - data = d; - - for(EnumFacing face : EnumFacing.VALUES) - { - CTM ctm = createCTM(); - ctm.createSubmapIndices(data, face); - ctmData.put(face, ctm); - } - } - - protected CTM createCTM() - { - return CTM.getInstance(); - } - - public CTM getCTM(EnumFacing face) - { - return ctmData.get(face); - } - - public long serialize() - { - return data; - } -} diff --git a/src/main/java/mekanism/client/render/ctm/CTMConnections.java b/src/main/java/mekanism/client/render/ctm/CTMConnections.java deleted file mode 100644 index a2eb5b73b..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTMConnections.java +++ /dev/null @@ -1,224 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.ArrayList; -import java.util.List; - -import mekanism.api.MekanismAPI; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -/** - * Represents all the different spot for connection locations for a ctm block - */ -public enum CTMConnections -{ - UP(Dir.TOP), - DOWN(Dir.BOTTOM), - NORTH(EnumFacing.EAST, Dir.RIGHT), - SOUTH(EnumFacing.EAST, Dir.LEFT), - EAST(Dir.RIGHT), - WEST(Dir.LEFT), - - NORTH_EAST(EnumFacing.UP, Dir.TOP_RIGHT), - NORTH_WEST(EnumFacing.UP, Dir.TOP_LEFT), - SOUTH_EAST(EnumFacing.UP, Dir.BOTTOM_RIGHT), - SOUTH_WEST(EnumFacing.UP, Dir.BOTTOM_LEFT), - - NORTH_UP(EnumFacing.EAST, Dir.TOP_RIGHT), - NORTH_DOWN(EnumFacing.EAST, Dir.BOTTOM_RIGHT), - SOUTH_UP(EnumFacing.EAST, Dir.TOP_LEFT), - SOUTH_DOWN(EnumFacing.EAST, Dir.BOTTOM_LEFT), - - EAST_UP(Dir.TOP_RIGHT), - EAST_DOWN(Dir.BOTTOM_RIGHT), - WEST_UP(Dir.TOP_LEFT), - WEST_DOWN(Dir.BOTTOM_LEFT), - - NORTH_EAST_UP(EnumFacing.EAST, Dir.TOP_RIGHT, true), - NORTH_EAST_DOWN(EnumFacing.EAST, Dir.BOTTOM_RIGHT, true), - - SOUTH_EAST_UP(EnumFacing.EAST, Dir.TOP_LEFT, true), - SOUTH_EAST_DOWN(EnumFacing.EAST, Dir.BOTTOM_LEFT, true), - - SOUTH_WEST_UP(EnumFacing.WEST, Dir.TOP_LEFT, true), - SOUTH_WEST_DOWN(EnumFacing.WEST, Dir.BOTTOM_LEFT, true), - - NORTH_WEST_UP(EnumFacing.WEST, Dir.TOP_RIGHT, true), - NORTH_WEST_DOWN(EnumFacing.WEST, Dir.BOTTOM_RIGHT, true), - - UP_UP(EnumFacing.UP, null, true), - DOWN_DOWN(EnumFacing.DOWN, null, true), - NORTH_NORTH(EnumFacing.NORTH, null, true), - SOUTH_SOUTH(EnumFacing.SOUTH, null, true), - EAST_EAST(EnumFacing.EAST, null, true), - WEST_WEST(EnumFacing.WEST, null, true); - - public static final CTMConnections[] VALUES = values(); - - /** - * The enum facing directions needed to get to this connection location - */ - private EnumFacing normal; - private Dir dir; - private boolean offset; - - private CTMConnections(Dir dir) - { - this(EnumFacing.SOUTH, dir); - } - - private CTMConnections(Dir dir, boolean offset) - { - this(EnumFacing.SOUTH, dir, offset); - } - - private CTMConnections(EnumFacing normal, Dir dir) - { - this(normal, dir, false); - } - - private CTMConnections(EnumFacing normal, Dir dir, boolean offset) - { - this.normal = normal; - this.dir = dir; - this.offset = offset; - } - - public Dir getDirForSide(EnumFacing facing) - { - return dir == null ? null : dir;//TODO .relativize() - } - - public EnumFacing clipOrDestroy(EnumFacing direction) - { - EnumFacing[] dirs = dir == null ? new EnumFacing[] {normal, normal} : dir.getNormalizedDirs(direction); - - if(dirs[0] == direction) - { - return dirs.length > 1 ? dirs[1] : null; - } - else if(dirs.length > 1 && dirs[1] == direction) - { - return dirs[0]; - } - else { - return null; - } - } - - public BlockPos transform(BlockPos pos) - { - if(dir != null) - { - for(EnumFacing facing : dir.getNormalizedDirs(normal)) - { - pos = pos.offset(facing); - } - } - else { - pos = pos.offset(normal); - } - - if(offset) - { - pos = pos.offset(normal); - } - - return pos; - } - - public static CTMConnections fromFacing(EnumFacing facing) - { - switch(facing) - { - case NORTH: return NORTH; - case SOUTH: return SOUTH; - case EAST: return EAST; - case WEST: return WEST; - case UP: return UP; - case DOWN: return DOWN; - default: return NORTH; - } - } - - public static EnumFacing toFacing(CTMConnections loc) - { - switch(loc) - { - case NORTH: return EnumFacing.NORTH; - case SOUTH: return EnumFacing.SOUTH; - case EAST: return EnumFacing.EAST; - case WEST: return EnumFacing.WEST; - case UP: return EnumFacing.UP; - case DOWN: return EnumFacing.DOWN; - default: return EnumFacing.NORTH; - } - } - - public static List decode(long data) - { - List list = new ArrayList<>(); - - for(CTMConnections loc : values()) - { - if((1 & (data >> loc.ordinal())) != 0) - { - list.add(loc); - } - } - - return list; - } - - public long getMask() - { - return 1 << ordinal(); - } - - public static List getConnections(IBlockAccess world, BlockPos pos, CTMConnections[] values) - { - List locs = new ArrayList<>(); - - IBlockState state = world.getBlockState(pos); - - for(CTMConnections loc : values) - { - BlockPos second = loc.transform(pos); - - if(CTM.canConnect(world, pos, second)) - { - locs.add(loc); - } - } - - return locs; - } - - public static long getData(IBlockAccess world, BlockPos pos, CTMConnections[] values) - { - List locs = getConnections(world, pos, values); - - long data = 0; - - for(CTMConnections loc : locs) - { - data = data | loc.getMask(); - } - - if(MekanismAPI.debug) - { - String s = Long.toBinaryString(data); - - while(s.length() < 32) - { - s = "0" + s; - } - - System.out.println(pos + ": " + s); - } - - return data; - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/ctm/CTMData.java b/src/main/java/mekanism/client/render/ctm/CTMData.java deleted file mode 100644 index 3cb7015bc..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTMData.java +++ /dev/null @@ -1,47 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -public class CTMData -{ - public List acceptableBlockStates = new ArrayList(); - - public boolean renderConvexConnections = false; - - public CTMData(IStringSerializable... states) - { - for(IStringSerializable state : states) - { - acceptableBlockStates.add(state.getName()); - } - } - - public CTMData setRenderConvexConnections() - { - renderConvexConnections = true; - return this; - } - - @SideOnly(Side.CLIENT) - public boolean shouldRenderSide(IBlockAccess world, BlockPos pos, EnumFacing side) - { - IBlockState state = world.getBlockState(pos); - - if(state.getBlock() instanceof ICTMBlock) - { - IStringSerializable serializable = (IStringSerializable)state.getValue(((ICTMBlock)state.getBlock()).getTypeProperty()); - return !acceptableBlockStates.contains(serializable.getName()); - } - - return true; - } -} diff --git a/src/main/java/mekanism/client/render/ctm/CTMModelFactory.java b/src/main/java/mekanism/client/render/ctm/CTMModelFactory.java deleted file mode 100644 index f40600f46..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTMModelFactory.java +++ /dev/null @@ -1,227 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.vecmath.Matrix4f; -import javax.vecmath.Vector3f; - -import mekanism.common.block.states.BlockStateBasic; -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms; -import net.minecraft.client.renderer.block.model.ItemCameraTransforms.TransformType; -import net.minecraft.client.renderer.block.model.ItemOverrideList; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; -import net.minecraftforge.client.MinecraftForgeClient; -import net.minecraftforge.client.model.IPerspectiveAwareModel; -import net.minecraftforge.common.model.TRSRTransformation; -import net.minecraftforge.common.property.IExtendedBlockState; - -import org.apache.commons.lang3.tuple.Pair; - -import com.google.common.cache.Cache; -import com.google.common.cache.CacheBuilder; -import com.google.common.collect.FluentIterable; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ListMultimap; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.MultimapBuilder; -import com.google.common.collect.Table; -import com.google.common.collect.Tables; - -/** - * Model for all CTM blocks, credit to Chisel - */ -@SuppressWarnings("deprecation") -public class CTMModelFactory implements IPerspectiveAwareModel -{ - private ListMultimap genQuads = MultimapBuilder.enumKeys(BlockRenderLayer.class).arrayListValues().build(); - private Table> faceQuads = Tables.newCustomTable(Maps.newEnumMap(BlockRenderLayer.class), () -> Maps.newEnumMap(EnumFacing.class)); - - private ModelCTM model; - - private CTMOverride override = new CTMOverride(); - - public CTMModelFactory(ModelCTM m) - { - model = m; - } - - private static Cache ctmCache = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.MINUTES).maximumSize(500).build(); - - @Override - public List getQuads(IBlockState stateIn, EnumFacing side, long rand) - { - CTMModelFactory baked; - - if(stateIn != null && stateIn.getBlock() instanceof ICTMBlock && stateIn instanceof IExtendedBlockState) - { - IExtendedBlockState state = (IExtendedBlockState)stateIn; - IBlockState clean = state.getClean(); - CTMBlockRenderContext ctxList = state.getValue(BlockStateBasic.ctmProperty); - - try { - if(ctxList == null) - { - baked = ctmCache.get(Objects.hash(clean, -1), () -> createModel(state, model, null)); - } - else { - long serialized = ctxList.serialize(); - baked = ctmCache.get(Objects.hash(clean, serialized), () -> createModel(state, model, ctxList)); - } - } catch(Exception e) { - e.printStackTrace(); - return Lists.newArrayList(); - } - } - else { - baked = this; - } - - BlockRenderLayer layer = MinecraftForgeClient.getRenderLayer(); - return side == null ? baked.genQuads.get(layer) : layer == null ? baked.faceQuads.column(side).values().stream().flatMap(List::stream).collect(Collectors.toList()) : baked.faceQuads.get(layer, side); - } - - @Override - public boolean isAmbientOcclusion() - { - return true; - } - - @Override - public boolean isGui3d() - { - return true; - } - - @Override - public boolean isBuiltInRenderer() - { - return false; - } - - @Override - public TextureAtlasSprite getParticleTexture() - { - return model.getDefaultFace().getParticle(); - } - - @Override - public ItemCameraTransforms getItemCameraTransforms() - { - return ItemCameraTransforms.DEFAULT; - } - - private CTMModelFactory createModel(IBlockState state, ModelCTM model, CTMBlockRenderContext ctx) - { - CTMModelFactory ret = new CTMModelFactory(model); - IBakedModel baked = model.getModel(state); - int quadGoal = ctx == null ? 1 : CTM.QUADS_PER_SIDE; - List quads = Lists.newArrayList(); - - for(BlockRenderLayer layer : BlockRenderLayer.values()) - { - for(EnumFacing facing : EnumFacing.VALUES) - { - TextureCTM face = model.getFace(facing); - - if(ctx == null || layer == state.getBlock().getBlockLayer()) - { - ICTMBlock block = (ICTMBlock)state.getBlock(); - CTMData data = block.getCTMData(state); - - if(block.getOverrideTexture(state, facing) != null) - { - face = CTMRegistry.textureCache.get(block.getOverrideTexture(state, facing)); - } - - List temp = baked.getQuads(state, facing, 0); - addAllQuads(temp, face, ctx, state, quadGoal, quads); - ret.faceQuads.put(layer, facing, ImmutableList.copyOf(quads)); - - temp = FluentIterable.from(baked.getQuads(state, null, 0)).filter(q -> q.getFace() == facing).toList(); - addAllQuads(temp, face, ctx, state, quadGoal, quads); - ret.genQuads.putAll(layer, temp); - } - else { - ret.faceQuads.put(layer, facing, Lists.newArrayList()); - } - } - } - - return ret; - } - - private void addAllQuads(List from, TextureCTM tex, @Nullable CTMBlockRenderContext ctx, IBlockState state, int quadGoal, List to) - { - to.clear(); - - for(BakedQuad q : from) - { - to.addAll(tex.transformQuad(q, ctx == null ? null : ctx, quadGoal)); - } - } - - private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) - { - return new TRSRTransformation( - new Vector3f(tx / 16, ty / 16, tz / 16), - TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), - new Vector3f(s, s, s), - null); - } - - public static Map transforms = ImmutableMap.builder() - .put(TransformType.GUI, get(0, 0, 0, 30, 225, 0, 0.625f)) - .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) - .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) - .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45, 0, 0.4f)) - .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225, 0, 0.4f)) - .put(TransformType.GROUND, get(0, 2, 0, 0, 0, 0, 0.25f)) - .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1)) - .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1)) - .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) - .build(); - - @Override - public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) - { - return Pair.of(this, transforms.get(cameraTransformType).getMatrix()); - } - - @Override - public ItemOverrideList getOverrides() - { - return override; - } - - private class CTMOverride extends ItemOverrideList - { - public CTMOverride() - { - super(Lists.newArrayList()); - } - - @Override - public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) - { - Block block = ((ItemBlock)stack.getItem()).getBlock(); - return createModel(block.getDefaultState(), model, null); - } - } -} diff --git a/src/main/java/mekanism/client/render/ctm/CTMRegistry.java b/src/main/java/mekanism/client/render/ctm/CTMRegistry.java deleted file mode 100644 index a89da3afc..000000000 --- a/src/main/java/mekanism/client/render/ctm/CTMRegistry.java +++ /dev/null @@ -1,83 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.client.renderer.block.model.ModelRotation; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.event.ModelBakeEvent; -import net.minecraftforge.client.event.TextureStitchEvent; -import net.minecraftforge.client.model.Attributes; -import net.minecraftforge.client.model.IModel; -import net.minecraftforge.client.model.ModelLoaderRegistry; -import net.minecraftforge.common.model.TRSRTransformation; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - -import org.apache.commons.lang3.tuple.Pair; - -public class CTMRegistry -{ - private static List textures = new ArrayList(); - - private IBakedModel baseModel; - public static ResourceLocation baseResource = new ResourceLocation("mekanism:block/ctm_block"); - - public static List> ctmTypes = new ArrayList>(); - - public static Map textureCache = new HashMap(); - - @SubscribeEvent - public void onTextureStitch(TextureStitchEvent.Pre event) - { - for(TextureSpriteCallback callback : textures) - { - callback.stitch(event.getMap()); - } - } - - @SubscribeEvent - public void onModelBake(ModelBakeEvent event) throws Exception - { - IModel model = ModelLoaderRegistry.getModel(baseResource); - baseModel = model.bake(new TRSRTransformation(ModelRotation.X0_Y0), Attributes.DEFAULT_BAKED_FORMAT, r -> Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(r.toString())); - - for(Pair pair : ctmTypes) - { - ModelCTM chiselModel = new ModelCTM(baseModel, pair.getRight()); - chiselModel.load(); - event.getModelRegistry().putObject(new ModelResourceLocation(pair.getLeft() + ":" + pair.getRight()), new CTMModelFactory(chiselModel)); - } - } - - public static void registerCTMs(String domain, String... ctms) - { - for(String s : ctms) - { - ctmTypes.add(Pair.of(domain, s)); - textureCache.put(s, createTexture(domain, s)); - } - } - - public static void register(TextureSpriteCallback callback) - { - textures.add(callback); - } - - public static TextureCTM createTexture(String domain, String name) - { - TextureSpriteCallback[] callbacks = new TextureSpriteCallback[CTM.REQUIRED_TEXTURES]; - - callbacks[0] = new TextureSpriteCallback(new ResourceLocation(domain + ":blocks/ctm/" + name)); - callbacks[1] = new TextureSpriteCallback(new ResourceLocation(domain + ":blocks/ctm/" + name + "-ctm")); - - register(callbacks[0]); - register(callbacks[1]); - - return new TextureCTM(callbacks); - } -} diff --git a/src/main/java/mekanism/client/render/ctm/Dir.java b/src/main/java/mekanism/client/render/ctm/Dir.java deleted file mode 100644 index 111c73f64..000000000 --- a/src/main/java/mekanism/client/render/ctm/Dir.java +++ /dev/null @@ -1,185 +0,0 @@ -package mekanism.client.render.ctm; - -import static net.minecraft.util.EnumFacing.DOWN; -import static net.minecraft.util.EnumFacing.EAST; -import static net.minecraft.util.EnumFacing.NORTH; -import static net.minecraft.util.EnumFacing.SOUTH; -import static net.minecraft.util.EnumFacing.UP; -import static net.minecraft.util.EnumFacing.WEST; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumFacing.Axis; -import net.minecraft.util.EnumFacing.AxisDirection; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockAccess; - -/** - * Think of this class as a "Two dimensional EnumFacing, with diagonals". - *

- * It represents the eight different directions a face of a block can connect with CTM, and contains the logic for determining if a block is indeed connected in that direction. - *

- * Note that, for example, {@link #TOP_RIGHT} does not mean connected to the {@link #TOP} and {@link #RIGHT}, but connected in the diagonal direction represented by {@link #TOP_RIGHT}. This is used - * for inner corner rendering. - */ -public enum Dir { - // @formatter:off - TOP(UP), - TOP_RIGHT(UP, EAST), - RIGHT(EAST), - BOTTOM_RIGHT(DOWN, EAST), - BOTTOM(DOWN), - BOTTOM_LEFT(DOWN, WEST), - LEFT(WEST), - TOP_LEFT(UP, WEST); - // @formatter:on - - /** - * All values of this enum, used to prevent unnecessary allocation via {@link #values()}. - */ - public static final Dir[] VALUES = values(); - private static final EnumFacing NORMAL = SOUTH; - - private EnumFacing[] dirs; - - private Dir(EnumFacing... dirs) { - this.dirs = dirs; - } - - /** - * Finds if this block is connected for the given side in this Dir. - * - * @param inst - * The CTM instance to use for logic. - * @param world - * The world the block is in. - * @param pos - * The position of your block. - * @param side - * The side of the current face. - * @return True if the block is connected in the given Dir, false otherwise. - */ - public boolean isConnected(CTM ctm, IBlockAccess world, BlockPos pos, EnumFacing side) { - return ctm.isConnected(world, pos, getConnection(pos, side), side); - } - - /** - * Finds if this block is connected for the given side in this Dir. - * - * @param inst - * The CTM instance to use for logic. - * @param world - * The world the block is in. - * @param pos - * The position of your block. - * @param side - * The side of the current face. - * @param side - * The state to check for connection with. - * @return True if the block is connected in the given Dir, false otherwise. - */ - public boolean isConnected(CTM ctm, IBlockAccess world, BlockPos pos, EnumFacing side, IBlockState state) { - return ctm.isConnected(world, pos, getConnection(pos, side), side, state); - } - - private BlockPos getConnection(BlockPos pos, EnumFacing side) { - EnumFacing[] dirs = getNormalizedDirs(side); - BlockPos connection = pos; - for (EnumFacing dir : dirs) { - connection = connection.offset(dir); - } - return connection; - } - - public EnumFacing[] getNormalizedDirs(EnumFacing normal) { - if (normal == NORMAL) { - return dirs; - } else if (normal == NORMAL.getOpposite()) { - // If this is the opposite direction of the default normal, we - // need to mirror the dirs - // A mirror version does not affect y+ and y- so we ignore those - EnumFacing[] ret = new EnumFacing[dirs.length]; - for (int i = 0; i < ret.length; i++) { - ret[i] = dirs[i].getFrontOffsetY() != 0 ? dirs[i] : dirs[i].getOpposite(); - } - return ret; - } else { - EnumFacing axis = null; - // Next, we need different a different rotation axis depending - // on if this is up/down or not - if (normal.getFrontOffsetY() == 0) { - // If it is not up/down, pick either the left or right-hand - // rotation - axis = normal == NORMAL.rotateY() ? UP : DOWN; - } else { - // If it is up/down, pick either the up or down rotation. - axis = normal == UP ? NORMAL.rotateYCCW() : NORMAL.rotateY(); - } - EnumFacing[] ret = new EnumFacing[dirs.length]; - // Finally apply all the rotations - for (int i = 0; i < ret.length; i++) { - ret[i] = rotate(dirs[i], axis); - } - return ret; - } - } - - // God why - - private static final int[] FACING_LOOKUP = new int[EnumFacing.values().length]; - static { - FACING_LOOKUP[NORTH.ordinal()] = 1; - FACING_LOOKUP[EAST.ordinal()] = 2; - FACING_LOOKUP[SOUTH.ordinal()] = 3; - FACING_LOOKUP[WEST.ordinal()] = 4; - FACING_LOOKUP[UP.ordinal()] = 5; - FACING_LOOKUP[DOWN.ordinal()] = 6; - } - - private EnumFacing rotate(EnumFacing facing, EnumFacing axisFacing) { - Axis axis = axisFacing.getAxis(); - AxisDirection axisDir = axisFacing.getAxisDirection(); - - if (axisDir == AxisDirection.POSITIVE) { - return facing.rotateAround(axis); - } - - if (facing.getAxis() != axis) { - switch (axis) { - case X: - // I did some manual testing and this is what worked...I don't get it either - switch (FACING_LOOKUP[facing.ordinal()]) { - case 1: - return NORTH; - case 2: - case 4: - default: - return facing; // Invalid but ignored - case 3: - return SOUTH; - case 5: - return SOUTH; - case 6: - return NORTH; - } - case Y: - return facing.rotateYCCW(); - case Z: - switch (FACING_LOOKUP[facing.ordinal()]) { - case 2: - return EAST; - case 3: - default: - return facing; // invalid but ignored - case 4: - return WEST; - case 5: - return DOWN; - case 6: - return UP; - } - } - } - - return facing; - } -} \ No newline at end of file diff --git a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java b/src/main/java/mekanism/client/render/ctm/ICTMBlock.java deleted file mode 100644 index e7c9a7303..000000000 --- a/src/main/java/mekanism/client/render/ctm/ICTMBlock.java +++ /dev/null @@ -1,15 +0,0 @@ -package mekanism.client.render.ctm; - -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.IBlockState; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.IStringSerializable; - -public interface ICTMBlock -{ - public CTMData getCTMData(IBlockState state); - - public PropertyEnum getTypeProperty(); - - public String getOverrideTexture(IBlockState state, EnumFacing side); -} diff --git a/src/main/java/mekanism/client/render/ctm/ISubmap.java b/src/main/java/mekanism/client/render/ctm/ISubmap.java deleted file mode 100644 index f0d91d8b0..000000000 --- a/src/main/java/mekanism/client/render/ctm/ISubmap.java +++ /dev/null @@ -1,24 +0,0 @@ -package mekanism.client.render.ctm; - -import net.minecraft.client.renderer.texture.TextureAtlasSprite; - -public interface ISubmap { - - float getYOffset(); - - float getXOffset(); - - float getWidth(); - - float getHeight(); - - float getInterpolatedU(TextureAtlasSprite sprite, float u); - - float getInterpolatedV(TextureAtlasSprite sprite, float v); - - float[] toArray(); - - ISubmap normalize(); - - ISubmap relativize(); -} diff --git a/src/main/java/mekanism/client/render/ctm/ModelCTM.java b/src/main/java/mekanism/client/render/ctm/ModelCTM.java deleted file mode 100644 index 3c74030d0..000000000 --- a/src/main/java/mekanism/client/render/ctm/ModelCTM.java +++ /dev/null @@ -1,93 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.renderer.block.model.IBakedModel; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.vertex.VertexFormat; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.client.model.IModel; -import net.minecraftforge.common.model.IModelState; -import net.minecraftforge.common.model.TRSRTransformation; - -import com.google.common.base.Function; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; - -public class ModelCTM implements IModel -{ - private Map overrides = Maps.newHashMap(); - - private transient TextureCTM faceObj; - private transient Map overridesObj = new EnumMap<>(EnumFacing.class); - - private transient IBakedModel modelObj; - - private transient List textures = Lists.newArrayList(); - - public String modelName; - - public ModelCTM(IBakedModel model, String name) - { - modelObj = model; - modelName = name; - } - - @Override - public Collection getDependencies() - { - return new ArrayList(); - } - - @Override - public Collection getTextures() - { - return ImmutableList.copyOf(textures); - } - - @Override - public IBakedModel bake(IModelState state, VertexFormat format, Function bakedTextureGetter) - { - return null; - } - - @Override - public IModelState getDefaultState() - { - return TRSRTransformation.identity(); - } - - void load() - { - if(faceObj != null) - { - return; - } - - faceObj = CTMRegistry.textureCache.get(modelName); - textures.addAll(faceObj.getTextures()); - overridesObj.values().forEach(t -> textures.addAll(t.getTextures())); - } - - public TextureCTM getDefaultFace() - { - return faceObj; - } - - public TextureCTM getFace(EnumFacing facing) - { - return overridesObj.getOrDefault(facing, faceObj); - } - - public IBakedModel getModel(IBlockState state) - { - return modelObj; - } -} diff --git a/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java b/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java deleted file mode 100644 index 452a67813..000000000 --- a/src/main/java/mekanism/client/render/ctm/PropertyCTMRenderContext.java +++ /dev/null @@ -1,33 +0,0 @@ -package mekanism.client.render.ctm; - -import net.minecraftforge.common.property.IUnlistedProperty; - -/** - * Block Property for the render context list - */ -public class PropertyCTMRenderContext implements IUnlistedProperty -{ - @Override - public String getName() - { - return "connections"; - } - - @Override - public boolean isValid(CTMBlockRenderContext value) - { - return true; - } - - @Override - public Class getType() - { - return CTMBlockRenderContext.class; - } - - @Override - public String valueToString(CTMBlockRenderContext value) - { - return value.toString(); - } -} diff --git a/src/main/java/mekanism/client/render/ctm/Quad.java b/src/main/java/mekanism/client/render/ctm/Quad.java deleted file mode 100644 index 3a2c3b404..000000000 --- a/src/main/java/mekanism/client/render/ctm/Quad.java +++ /dev/null @@ -1,548 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.List; - -import javax.annotation.Nullable; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.renderer.vertex.VertexFormat; -import net.minecraft.client.renderer.vertex.VertexFormatElement; -import net.minecraft.client.renderer.vertex.VertexFormatElement.EnumUsage; -import net.minecraft.util.EnumFacing; -import net.minecraftforge.client.model.pipeline.IVertexConsumer; -import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad; - -import org.apache.commons.lang3.tuple.Pair; -import org.lwjgl.util.vector.Vector; -import org.lwjgl.util.vector.Vector2f; -import org.lwjgl.util.vector.Vector3f; - -import com.google.common.collect.ListMultimap; -import com.google.common.collect.Lists; -import com.google.common.collect.MultimapBuilder; - -public class Quad -{ - public static final ISubmap TOP_LEFT = new Submap(8, 8, 0, 0); - public static final ISubmap TOP_RIGHT = new Submap(8, 8, 8, 0); - public static final ISubmap BOTTOM_LEFT = new Submap(8, 8, 0, 8); - public static final ISubmap BOTTOM_RIGHT = new Submap(8, 8, 8, 8); - - public static class Vertex - { - Vector3f pos; - Vector2f uvs; - } - - private static final TextureAtlasSprite BASE = Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(TextureMap.LOCATION_MISSING_TEXTURE.toString()); - - public class UVs - { - private float minU, minV, maxU, maxV; - - private final TextureAtlasSprite sprite; - - private final Vector2f[] data; - - private UVs(Vector2f... data) - { - this(BASE, data); - } - - private UVs(TextureAtlasSprite sprite, Vector2f... data) - { - this.data = data; - this.sprite = sprite; - - float minU = Float.MAX_VALUE; - float minV = Float.MAX_VALUE; - float maxU = 0, maxV = 0; - - for (Vector2f v : data) - { - minU = Math.min(minU, v.x); - minV = Math.min(minV, v.y); - maxU = Math.max(maxU, v.x); - maxV = Math.max(maxV, v.y); - } - - this.minU = minU; - this.minV = minV; - this.maxU = maxU; - this.maxV = maxV; - } - - public UVs(float minU, float minV, float maxU, float maxV, TextureAtlasSprite sprite) - { - this.minU = minU; - this.minV = minV; - this.maxU = maxU; - this.maxV = maxV; - this.sprite = sprite; - this.data = vectorize(); - } - - public UVs transform(TextureAtlasSprite other, ISubmap submap) - { - UVs normal = normalize(); - submap = submap.normalize(); - - float width = normal.maxU - normal.minU; - float height = normal.maxV - normal.minV; - - float minU = submap.getXOffset(); - float minV = submap.getYOffset(); - minU += normal.minU * submap.getWidth(); - minV += normal.minV * submap.getHeight(); - - float maxU = minU + (width * submap.getWidth()); - float maxV = minV + (height * submap.getHeight()); - - // TODO this is horrid - return new UVs(other, - new Vector2f(data[0].x == this.minU ? minU : maxU, data[0].y == this.minV ? minV : maxV), - new Vector2f(data[1].x == this.minU ? minU : maxU, data[1].y == this.minV ? minV : maxV), - new Vector2f(data[2].x == this.minU ? minU : maxU, data[2].y == this.minV ? minV : maxV), - new Vector2f(data[3].x == this.minU ? minU : maxU, data[3].y == this.minV ? minV : maxV)) - .relativize(); - } - - public UVs normalizeQuadrant() - { - UVs normal = normalize(); - - int quadrant = normal.getQuadrant(); - float minUInterp = quadrant == 1 || quadrant == 2 ? 0.5f : 0; - float minVInterp = quadrant < 2 ? 0.5f : 0; - float maxUInterp = quadrant == 0 || quadrant == 3 ? 0.5f : 1; - float maxVInterp = quadrant > 1 ? 0.5f : 1; - - normal = new UVs(sprite, normalize(new Vector2f(minUInterp, minVInterp), new Vector2f(maxUInterp, maxVInterp), normal.vectorize())); - return normal.relativize(); - } - - public UVs normalize() - { - Vector2f min = new Vector2f(sprite.getMinU(), sprite.getMinV()); - Vector2f max = new Vector2f(sprite.getMaxU(), sprite.getMaxV()); - return new UVs(sprite, normalize(min, max, data)); - } - - public UVs relativize() - { - return relativize(sprite); - } - - public TextureAtlasSprite getSprite() - { - return sprite; - } - - public UVs relativize(TextureAtlasSprite sprite) - { - Vector2f min = new Vector2f(sprite.getMinU(), sprite.getMinV()); - Vector2f max = new Vector2f(sprite.getMaxU(), sprite.getMaxV()); - return new UVs(sprite, lerp(min, max, data)); - } - - public Vector2f[] vectorize() - { - return data == null ? new Vector2f[]{ new Vector2f(minU, minV), new Vector2f(minU, maxV), new Vector2f(maxU, maxV), new Vector2f(maxU, minV) } : data; - } - - private Vector2f[] normalize(Vector2f min, Vector2f max, Vector2f... vecs) - { - Vector2f[] ret = new Vector2f[vecs.length]; - - for(int i = 0; i < ret.length; i++) - { - ret[i] = normalize(min, max, vecs[i]); - } - - return ret; - } - - private Vector2f normalize(Vector2f min, Vector2f max, Vector2f vec) - { - return new Vector2f(Quad.normalize(min.x, max.x, vec.x), Quad.normalize(min.y, max.y, vec.y)); - } - - private Vector2f[] lerp(Vector2f min, Vector2f max, Vector2f... vecs) - { - Vector2f[] ret = new Vector2f[vecs.length]; - - for(int i = 0; i < ret.length; i++) - { - ret[i] = lerp(min, max, vecs[i]); - } - - return ret; - } - - private Vector2f lerp(Vector2f min, Vector2f max, Vector2f vec) - { - return new Vector2f(Quad.lerp(min.x, max.x, vec.x), Quad.lerp(min.y, max.y, vec.y)); - } - - public int getQuadrant() - { - if(maxU <= 0.5f) - { - if(maxV <= 0.5f) - { - return 3; - } - else { - return 0; - } - } - else { - if(maxV <= 0.5f) - { - return 2; - } - else { - return 1; - } - } - } - } - - private final Vector3f[] vertPos; - private final Vector2f[] vertUv; - - // Technically nonfinal, but treated as such except in constructor - private UVs uvsObj; - - private final Builder builder; - - private Quad(Vector3f[] verts, Vector2f[] uvs, Builder b) - { - vertPos = verts; - vertUv = uvs; - builder = b; - uvsObj = new UVs(uvs); - } - - private Quad(Vector3f[] verts, UVs uvs, Builder builder) - { - this(verts, uvs.vectorize(), builder); - uvsObj = new UVs(uvs.getSprite(), vertUv); - } - - public UVs getUVs() - { - return uvsObj; - } - - public Quad[] subdivide(int count) - { - List rects = Lists.newArrayList(); - - Pair firstDivide = divide(false); - Pair secondDivide = firstDivide.getLeft().divide(true); - rects.add(secondDivide.getLeft()); - - if(firstDivide.getRight() != null) - { - Pair thirdDivide = firstDivide.getRight().divide(true); - rects.add(thirdDivide.getLeft()); - rects.add(thirdDivide.getRight()); - } - else { - rects.add(null); - rects.add(null); - } - - rects.add(secondDivide.getRight()); - - return rects.toArray(new Quad[rects.size()]); - } - - @Nullable - private Pair divide(boolean vertical) - { - float min, max; - UVs uvs = uvsObj.normalize(); - - if(vertical) - { - min = uvs.minV; - max = uvs.maxV; - } - else { - min = uvs.minU; - max = uvs.maxU; - } - - if(min < 0.5 && max > 0.5) - { - UVs first = new UVs(vertical ? uvs.minU : 0.5f, vertical ? 0.5f : uvs.minV, uvs.maxU, uvs.maxV, uvs.getSprite()); - UVs second = new UVs(uvs.minU, uvs.minV, vertical ? uvs.maxU : 0.5f, vertical ? 0.5f : uvs.maxV, uvs.getSprite()); - - int firstIndex = 0; - - for(int i = 0; i < vertUv.length; i++) - { - if(vertUv[i].y == uvsObj.minV && vertUv[i].x == uvsObj.minU) - { - firstIndex = i; - break; - } - } - - float f = (0.5f - min) / (max - min); - - Vector3f[] firstQuad = new Vector3f[4]; - Vector3f[] secondQuad = new Vector3f[4]; - - for(int i = 0; i < 4; i++) - { - int idx = (firstIndex + i) % 4; - firstQuad[i] = new Vector3f(vertPos[idx]); - secondQuad[i] = new Vector3f(vertPos[idx]); - } - - int i1 = 0; - int i2 = vertical ? 1 : 3; - int j1 = vertical ? 3 : 1; - int j2 = 2; - - firstQuad[i1].x = lerp(firstQuad[i1].x, firstQuad[i2].x, f); - firstQuad[i1].y = lerp(firstQuad[i1].y, firstQuad[i2].y, f); - firstQuad[i1].z = lerp(firstQuad[i1].z, firstQuad[i2].z, f); - firstQuad[j1].x = lerp(firstQuad[j1].x, firstQuad[j2].x, f); - firstQuad[j1].y = lerp(firstQuad[j1].y, firstQuad[j2].y, f); - firstQuad[j1].z = lerp(firstQuad[j1].z, firstQuad[j2].z, f); - - secondQuad[i2].x = lerp(secondQuad[i1].x, secondQuad[i2].x, f); - secondQuad[i2].y = lerp(secondQuad[i1].y, secondQuad[i2].y, f); - secondQuad[i2].z = lerp(secondQuad[i1].z, secondQuad[i2].z, f); - secondQuad[j2].x = lerp(secondQuad[j1].x, secondQuad[j2].x, f); - secondQuad[j2].y = lerp(secondQuad[j1].y, secondQuad[j2].y, f); - secondQuad[j2].z = lerp(secondQuad[j1].z, secondQuad[j2].z, f); - - Quad q1 = new Quad(firstQuad, first.relativize(), builder); - Quad q2 = new Quad(secondQuad, second.relativize(), builder); - - return Pair.of(q1, q2); - } - else { - return Pair.of(this, null); - } - } - - static float lerp(float a, float b, float f) - { - float ret = (a * (1 - f)) + (b * f); - return ret; - } - - static float normalize(float min, float max, float x) - { - float ret = (x - min) / (max - min); - return ret; - } - - public Quad rotate(int amount) - { - Vector2f[] uvs = new Vector2f[4]; - - TextureAtlasSprite s = uvsObj.getSprite(); - - for(int i = 0; i < 4; i++) - { - Vector2f normalized = new Vector2f(normalize(s.getMinU(), s.getMaxU(), vertUv[i].x), normalize(s.getMinV(), s.getMaxV(), vertUv[i].y)); - Vector2f uv; - - switch(amount) - { - case 1: - uv = new Vector2f(normalized.y, 1 - normalized.x); - break; - case 2: - uv = new Vector2f(1 - normalized.x, 1 - normalized.y); - break; - case 3: - uv = new Vector2f(1 - normalized.y, normalized.x); - break; - default: - uv = new Vector2f(normalized.x, normalized.y); - break; - } - - uvs[i] = uv; - } - - for(int i = 0; i < uvs.length; i++) - { - uvs[i] = new Vector2f(lerp(s.getMinU(), s.getMaxU(), uvs[i].x), lerp(s.getMinV(), s.getMaxV(), uvs[i].y)); - } - - Quad ret = new Quad(vertPos, uvs, builder); - ret.uvsObj = new UVs(uvsObj.getSprite(), ret.vertUv); - - return ret; - } - - public Quad derotate() - { - int start = 0; - - for(int i = 0; i < 4; i++) - { - if(vertUv[i].x <= uvsObj.minU && vertUv[i].y <= uvsObj.minV) - { - start = i; - break; - } - } - - Vector2f[] uvs = new Vector2f[4]; - - for(int i = 0; i < 4; i++) - { - uvs[i] = vertUv[(i + start) % 4]; - } - - return new Quad(vertPos, uvs, builder); - } - - public BakedQuad rebake() - { - UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder(this.builder.vertexFormat); - builder.setQuadOrientation(this.builder.quadOrientation); - builder.setQuadTint(this.builder.quadTint); - builder.setApplyDiffuseLighting(this.builder.applyDiffuseLighting); - builder.setTexture(this.uvsObj.getSprite()); - - for(int v = 0; v < 4; v++) - { - for(int i = 0; i < this.builder.vertexFormat.getElementCount(); i++) - { - VertexFormatElement ele = this.builder.vertexFormat.getElement(i); - - switch(ele.getUsage()) - { - case UV: - Vector2f uv = vertUv[v]; - builder.put(i, uv.x, uv.y, 0, 1); - - break; - case POSITION: - Vector3f p = vertPos[v]; - builder.put(i, p.x, p.y, p.z, 1); - - break; - default: - builder.put(i, this.builder.vertexData.get(ele.getUsage()).get(v)); - } - } - } - - return builder.build(); - } - - public Quad transformUVs(TextureAtlasSprite sprite) - { - return transformUVs(sprite, CTM.FULL_TEXTURE.normalize()); - } - - public Quad transformUVs(TextureAtlasSprite sprite, ISubmap submap) - { - return new Quad(vertPos, uvsObj.transform(sprite, submap), builder); - } - - public Quad grow() - { - return new Quad(vertPos, uvsObj.normalizeQuadrant(), builder); - } - - public static Quad from(BakedQuad baked, VertexFormat fmt) - { - Builder b = new Builder(fmt); - baked.pipe(b); - return b.build().derotate(); // for now we will ignore rotated UVs - } - - public static class Builder implements IVertexConsumer - { - public Builder(VertexFormat fmt) - { - vertexFormat = fmt; - } - - private final VertexFormat vertexFormat; - - private int quadTint; - - private EnumFacing quadOrientation; - - private boolean applyDiffuseLighting; - - @Override - public void setTexture(TextureAtlasSprite sprite) - { - //TODO ignore for now - } - - @Override - public void setQuadTint(int tint) - { - quadTint = tint; - } - - @Override - public void setQuadOrientation(EnumFacing orientation) - { - quadOrientation = orientation; - } - - @Override - public VertexFormat getVertexFormat() - { - return vertexFormat; - } - - @Override - public void setApplyDiffuseLighting(boolean lighting) - { - applyDiffuseLighting = lighting; - } - - private ListMultimap vertexData = MultimapBuilder.enumKeys(EnumUsage.class).arrayListValues().build(); - - @Override - public void put(int element, float... data) - { - float[] copy = new float[data.length]; - System.arraycopy(data, 0, copy, 0, data.length); - VertexFormatElement ele = vertexFormat.getElement(element); - vertexData.put(ele.getUsage(), copy); - } - - public Quad build() - { - Vector3f[] verts = fromData(vertexData.get(EnumUsage.POSITION), 3); - Vector2f[] uvs = fromData(vertexData.get(EnumUsage.UV), 2); - - return new Quad(verts, uvs, this); - } - - @SuppressWarnings("unchecked") - private T[] fromData(List data, int size) - { - Vector[] ret = size == 2 ? new Vector2f[data.size()] : new Vector3f[data.size()]; - - for(int i = 0; i < data.size(); i++) - { - ret[i] = size == 2 ? new Vector2f(data.get(i)[0], data.get(i)[1]) : new Vector3f(data.get(i)[0], data.get(i)[1], data.get(i)[2]); - } - - return (T[])ret; - } - } -} diff --git a/src/main/java/mekanism/client/render/ctm/Submap.java b/src/main/java/mekanism/client/render/ctm/Submap.java deleted file mode 100644 index 57fca7bf4..000000000 --- a/src/main/java/mekanism/client/render/ctm/Submap.java +++ /dev/null @@ -1,125 +0,0 @@ -package mekanism.client.render.ctm; - -import net.minecraft.client.renderer.texture.TextureAtlasSprite; - -public class Submap implements ISubmap -{ - private final float width, height; - private final float xOffset, yOffset; - - private final SubmapNormalized normalized = new SubmapNormalized(this); - - public Submap(float w, float h, float x, float y) - { - width = w; - height = h; - xOffset = x; - yOffset = y; - } - - @Override - public float getXOffset() - { - return xOffset; - } - - @Override - public float getYOffset() - { - return yOffset; - } - - @Override - public float getWidth() - { - return width; - } - - @Override - public float getHeight() - { - return height; - } - - @Override - public float getInterpolatedU(TextureAtlasSprite sprite, float u) { - return sprite.getInterpolatedU(getXOffset() + u / getWidth()); - } - - @Override - public float getInterpolatedV(TextureAtlasSprite sprite, float v) { - return sprite.getInterpolatedV(getYOffset() + v / getWidth()); - } - - @Override - public float[] toArray() { - return new float[] { getXOffset(), getYOffset(), getXOffset() + getWidth(), getYOffset() + getHeight() }; - } - - @Override - public SubmapNormalized normalize() { - return normalized; - } - - @Override - public ISubmap relativize() { - return this; - } - - private static final float FACTOR = 16f; - - private static class SubmapNormalized implements ISubmap - { - private final ISubmap parent; - - public SubmapNormalized(ISubmap submap) - { - parent = submap; - } - - @Override - public float getXOffset() { - return parent.getXOffset() / FACTOR; - } - - @Override - public float getYOffset() { - return parent.getYOffset() / FACTOR; - } - - @Override - public float getWidth() { - return parent.getWidth() / FACTOR; - } - - @Override - public float getHeight() { - return parent.getHeight() / FACTOR; - } - - @Override - public ISubmap relativize() { - return parent; - } - - @Override - public ISubmap normalize() { - return this; - } - - @Override - public float getInterpolatedU(TextureAtlasSprite sprite, float u) { - return parent.getInterpolatedU(sprite, u); - } - - @Override - public float getInterpolatedV(TextureAtlasSprite sprite, float v) { - return parent.getInterpolatedV(sprite, v); - } - - @Override - public float[] toArray() { - return parent.toArray(); - } - } -} diff --git a/src/main/java/mekanism/client/render/ctm/TextureCTM.java b/src/main/java/mekanism/client/render/ctm/TextureCTM.java deleted file mode 100644 index 3a810aca8..000000000 --- a/src/main/java/mekanism/client/render/ctm/TextureCTM.java +++ /dev/null @@ -1,61 +0,0 @@ -package mekanism.client.render.ctm; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -import net.minecraft.client.renderer.block.model.BakedQuad; -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.ResourceLocation; - -public class TextureCTM -{ - public TextureSpriteCallback[] sprites; - - public TextureCTM(TextureSpriteCallback[] sprites) - { - this.sprites = sprites; - } - - public List transformQuad(BakedQuad bq, CTMBlockRenderContext context, int quadGoal) - { - Quad quad = Quad.from(bq, DefaultVertexFormats.ITEM); - - if(context == null) - { - return Collections.singletonList(quad.transformUVs(sprites[0].getSprite()).rebake()); - } - - Quad[] quads = quad.subdivide(4); - - int[] ctm = ((CTMBlockRenderContext)context).getCTM(bq.getFace()).getSubmapIndices(); - - for(int i = 0; i < quads.length; i++) - { - Quad q = quads[i]; - - if(q != null) - { - int ctmid = q.getUVs().normalize().getQuadrant(); - quads[i] = q.grow().transformUVs(sprites[ctm[ctmid] > 15 ? 0 : 1].getSprite(), CTM.uvs[ctm[ctmid]].normalize()); - } - } - - return Arrays.stream(quads).filter(Objects::nonNull).map(q -> q.rebake()).collect(Collectors.toList()); - } - - public TextureAtlasSprite getParticle() - { - return sprites[0].getSprite(); - } - - public Collection getTextures() - { - return Arrays.stream(sprites).map(TextureSpriteCallback::getLocation).collect(Collectors.toList()); - } -} diff --git a/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java b/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java deleted file mode 100644 index 2aa25af05..000000000 --- a/src/main/java/mekanism/client/render/ctm/TextureSpriteCallback.java +++ /dev/null @@ -1,34 +0,0 @@ -package mekanism.client.render.ctm; - -import net.minecraft.client.renderer.texture.TextureAtlasSprite; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.util.ResourceLocation; - -/** - * Callback when textures are stitched - */ -public class TextureSpriteCallback -{ - private ResourceLocation location; - private TextureAtlasSprite sprite; - - public TextureSpriteCallback(ResourceLocation loc) - { - location = loc; - } - - public void stitch(TextureMap map) - { - sprite = map.registerSprite(location); - } - - public TextureAtlasSprite getSprite() - { - return sprite; - } - - public ResourceLocation getLocation() - { - return location; - } -} diff --git a/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java b/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java index 0355aefea..80d7247c4 100644 --- a/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java +++ b/src/main/java/mekanism/client/render/item/BakedCustomItemModel.java @@ -2,9 +2,12 @@ package mekanism.client.render.item; import java.util.LinkedList; import java.util.List; +import java.util.Map; import javax.vecmath.Matrix4f; +import javax.vecmath.Vector3f; +import com.google.common.collect.ImmutableMap; import mekanism.api.energy.IEnergizedItem; import mekanism.client.model.ModelArmoredJetpack; import mekanism.client.model.ModelAtomicDisassembler; @@ -23,7 +26,6 @@ import mekanism.client.model.ModelSecurityDesk; import mekanism.client.model.ModelSeismicVibrator; import mekanism.client.model.ModelSolarNeutronActivator; import mekanism.client.render.MekanismRenderer; -import mekanism.client.render.ctm.CTMModelFactory; import mekanism.client.render.tileentity.RenderBin; import mekanism.client.render.tileentity.RenderEnergyCube; import mekanism.client.render.tileentity.RenderFluidTank; @@ -35,9 +37,7 @@ import mekanism.common.Tier.FluidTankTier; import mekanism.common.base.ITierItem; import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateMachine.MachineType; -import mekanism.common.inventory.InventoryBin; import mekanism.common.item.ItemAtomicDisassembler; -import mekanism.common.item.ItemBlockBasic; import mekanism.common.item.ItemBlockEnergyCube; import mekanism.common.item.ItemBlockMachine; import mekanism.common.item.ItemFlamethrower; @@ -54,7 +54,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelChest; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.ItemCameraTransforms; @@ -67,6 +66,7 @@ import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraftforge.client.model.IPerspectiveAwareModel; +import net.minecraftforge.common.model.TRSRTransformation; import net.minecraftforge.fluids.Fluid; import org.apache.commons.lang3.tuple.Pair; @@ -507,15 +507,37 @@ public class BakedCustomItemModel implements IBakedModel, IPerspectiveAwareModel { return baseModel.getItemCameraTransforms(); } - + @Override - public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) + public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) { prevTransform = cameraTransformType; - - return Pair.of(this, CTMModelFactory.transforms.get(cameraTransformType).getMatrix()); + + return Pair.of(this, transforms.get(cameraTransformType).getMatrix()); } + // Copy from old CTM + public static Map transforms = ImmutableMap.builder() + .put(TransformType.GUI, get(0, 0, 0, 30, 225, 0, 0.625f)) + .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45, 0, 0.4f)) + .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225, 0, 0.4f)) + .put(TransformType.GROUND, get(0, 2, 0, 0, 0, 0, 0.25f)) + .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) + .build(); + + private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) + { + return new TRSRTransformation( + new Vector3f(tx / 16, ty / 16, tz / 16), + TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), + new Vector3f(s, s, s), + null); + } + @Override public ItemOverrideList getOverrides() { diff --git a/src/main/java/mekanism/client/render/obj/GlowPanelModel.java b/src/main/java/mekanism/client/render/obj/GlowPanelModel.java index 39281fc38..7dbb5f402 100644 --- a/src/main/java/mekanism/client/render/obj/GlowPanelModel.java +++ b/src/main/java/mekanism/client/render/obj/GlowPanelModel.java @@ -5,9 +5,9 @@ import java.util.List; import java.util.Map; import javax.vecmath.Matrix4f; +import javax.vecmath.Vector3f; import mekanism.api.EnumColor; -import mekanism.client.render.ctm.CTMModelFactory; import mekanism.common.block.property.PropertyColor; import mekanism.common.tile.TileEntityGlowPanel; import net.minecraft.block.state.IBlockState; @@ -30,8 +30,8 @@ import net.minecraftforge.client.model.IPerspectiveAwareModel; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.obj.OBJModel; import net.minecraftforge.client.model.obj.OBJModel.Face; -import net.minecraftforge.client.model.obj.OBJModel.OBJBakedModel; import net.minecraftforge.common.model.IModelState; +import net.minecraftforge.common.model.TRSRTransformation; import net.minecraftforge.common.property.IExtendedBlockState; import org.apache.commons.lang3.tuple.Pair; @@ -42,8 +42,8 @@ import com.google.common.collect.Lists; public class GlowPanelModel extends OBJBakedModelBase { - private static Map> glowPanelCache = new HashMap>(); - private static Map glowPanelItemCache = new HashMap(); + private static Map> glowPanelCache = new HashMap<>(); + private static Map glowPanelItemCache = new HashMap<>(); private IBlockState tempState; private ItemStack tempStack; @@ -164,8 +164,6 @@ public class GlowPanelModel extends OBJBakedModelBase return null; } - - private Pair thirdPersonTransform; @Override public Pair handlePerspective(ItemCameraTransforms.TransformType transformType) @@ -173,7 +171,7 @@ public class GlowPanelModel extends OBJBakedModelBase if(transformType == TransformType.GUI) { GlStateManager.rotate(180, 1, 0, 0); - ForgeHooksClient.multiplyCurrentGlMatrix(CTMModelFactory.transforms.get(transformType).getMatrix()); + ForgeHooksClient.multiplyCurrentGlMatrix(transforms.get(transformType).getMatrix()); GlStateManager.translate(0.65F, 0.45F, 0.0F); GlStateManager.rotate(90, 1, 0, 0); GlStateManager.scale(1.6F, 1.6F, 1.6F); @@ -186,12 +184,34 @@ public class GlowPanelModel extends OBJBakedModelBase } else if(transformType == TransformType.THIRD_PERSON_RIGHT_HAND || transformType == TransformType.THIRD_PERSON_LEFT_HAND) { - ForgeHooksClient.multiplyCurrentGlMatrix(CTMModelFactory.transforms.get(transformType).getMatrix()); + ForgeHooksClient.multiplyCurrentGlMatrix(transforms.get(transformType).getMatrix()); GlStateManager.translate(0.0F, 0.3F, 0.2F); return Pair.of(this, null); } - return Pair.of(this, CTMModelFactory.transforms.get(transformType).getMatrix()); + return Pair.of(this, transforms.get(transformType).getMatrix()); } + + // Copy from old CTM + public static Map transforms = ImmutableMap.builder() + .put(TransformType.GUI, get(0, 0, 0, 30, 225, 0, 0.625f)) + .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45, 0, 0.4f)) + .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225, 0, 0.4f)) + .put(TransformType.GROUND, get(0, 2, 0, 0, 0, 0, 0.25f)) + .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) + .build(); + + private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) + { + return new TRSRTransformation( + new Vector3f(tx / 16, ty / 16, tz / 16), + TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), + new Vector3f(s, s, s), + null); + } } diff --git a/src/main/java/mekanism/client/render/obj/TransmitterModel.java b/src/main/java/mekanism/client/render/obj/TransmitterModel.java index add01f4b5..959c0547d 100644 --- a/src/main/java/mekanism/client/render/obj/TransmitterModel.java +++ b/src/main/java/mekanism/client/render/obj/TransmitterModel.java @@ -9,8 +9,8 @@ import java.util.Objects; import java.util.Set; import javax.vecmath.Matrix4f; +import javax.vecmath.Vector3f; -import mekanism.client.render.ctm.CTMModelFactory; import mekanism.common.block.property.PropertyColor; import mekanism.common.block.property.PropertyConnection; import mekanism.common.config.MekanismConfig.client; @@ -40,6 +40,7 @@ import net.minecraftforge.client.model.obj.OBJModel.Group; import net.minecraftforge.client.model.obj.OBJModel.OBJProperty; import net.minecraftforge.client.model.obj.OBJModel.OBJState; import net.minecraftforge.common.model.IModelState; +import net.minecraftforge.common.model.TRSRTransformation; import net.minecraftforge.common.property.IExtendedBlockState; import org.apache.commons.lang3.tuple.Pair; @@ -50,9 +51,9 @@ import com.google.common.collect.Lists; public class TransmitterModel extends OBJBakedModelBase { - private static Set modelInstances = new HashSet(); + private static Set modelInstances = new HashSet<>(); - private Map> modelCache = new HashMap>(); + private Map> modelCache = new HashMap<>(); private TransmitterModel itemCache; private IBlockState tempState; @@ -84,7 +85,7 @@ public class TransmitterModel extends OBJBakedModelBase { if(itemCache == null) { - List visible = new ArrayList(); + List visible = new ArrayList<>(); for(EnumFacing side : EnumFacing.values()) { @@ -271,8 +272,30 @@ public class TransmitterModel extends OBJBakedModelBase @Override public Pair handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) { - return Pair.of(this, CTMModelFactory.transforms.get(cameraTransformType).getMatrix()); + return Pair.of(this, transforms.get(cameraTransformType).getMatrix()); } + + // Copy from old CTM + public static Map transforms = ImmutableMap.builder() + .put(TransformType.GUI, get(0, 0, 0, 30, 225, 0, 0.625f)) + .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45, 0, 0.4f)) + .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225, 0, 0.4f)) + .put(TransformType.GROUND, get(0, 2, 0, 0, 0, 0, 0.25f)) + .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) + .build(); + + private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) + { + return new TRSRTransformation( + new Vector3f(tx / 16, ty / 16, tz / 16), + TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), + new Vector3f(s, s, s), + null); + } public static void registerIcons(TextureMap map) { diff --git a/src/main/java/mekanism/common/block/BlockBasic.java b/src/main/java/mekanism/common/block/BlockBasic.java index 6be823ca1..53cc11862 100644 --- a/src/main/java/mekanism/common/block/BlockBasic.java +++ b/src/main/java/mekanism/common/block/BlockBasic.java @@ -6,9 +6,6 @@ import java.util.UUID; import mekanism.api.Coord4D; import mekanism.api.energy.IEnergizedItem; import mekanism.api.energy.IStrictEnergyStorage; -import mekanism.client.render.ctm.CTMBlockRenderContext; -import mekanism.client.render.ctm.CTMData; -import mekanism.client.render.ctm.ICTMBlock; import mekanism.common.Mekanism; import mekanism.common.Tier.BaseTier; import mekanism.common.base.IActiveState; @@ -18,7 +15,6 @@ import mekanism.common.block.states.BlockStateBasic; import mekanism.common.block.states.BlockStateBasic.BasicBlock; import mekanism.common.block.states.BlockStateBasic.BasicBlockType; import mekanism.common.block.states.BlockStateFacing; -import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.content.boiler.SynchronizedBoilerData; import mekanism.common.content.tank.TankUpdateProtocol; import mekanism.common.inventory.InventoryBin; @@ -67,7 +63,6 @@ import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.Explosion; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidUtil; import net.minecraftforge.fluids.capability.IFluidHandlerItem; @@ -107,18 +102,14 @@ import buildcraft.api.tools.IToolWrench; * @author AidanBrady * */ -public abstract class BlockBasic extends Block implements ICTMBlock +public abstract class BlockBasic extends Block { - public CTMData[][] ctmData = new CTMData[16][4]; - public BlockBasic() { super(Material.IRON); setHardness(5F); setResistance(20F); setCreativeTab(Mekanism.tabMekanism); - - initCTMs(); } public static BlockBasic getBlockBasic(BasicBlock block) @@ -205,21 +196,6 @@ public abstract class BlockBasic extends Block implements ICTMBlock return state; } - - @SideOnly(Side.CLIENT) - @Override - public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos) - { - if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR) - { - return stateIn; - } - - IExtendedBlockState state = (IExtendedBlockState)stateIn; - CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); - - return state.withProperty(BlockStateBasic.ctmProperty, ctx); - } @Override public void neighborChanged(IBlockState state, World world, BlockPos pos, Block neighborBlock, BlockPos fromPos) @@ -259,40 +235,6 @@ public abstract class BlockBasic extends Block implements ICTMBlock return blockResistance; } - public void initCTMs() - { - switch(getBasicBlock()) - { - case BASIC_BLOCK_1: - ctmData[7][0] = new CTMData(BasicBlockType.TELEPORTER_FRAME, MachineType.TELEPORTER); - ctmData[9][0] = new CTMData(BasicBlockType.DYNAMIC_TANK, BasicBlockType.DYNAMIC_VALVE); - ctmData[10][0] = new CTMData(BasicBlockType.STRUCTURAL_GLASS); - ctmData[11][0] = new CTMData(BasicBlockType.DYNAMIC_TANK, BasicBlockType.DYNAMIC_VALVE); - - ctmData[14][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); - ctmData[15][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); - - break; - case BASIC_BLOCK_2: - ctmData[0][0] = new CTMData(BasicBlockType.THERMAL_EVAPORATION_BLOCK, BasicBlockType.THERMAL_EVAPORATION_VALVE, BasicBlockType.THERMAL_EVAPORATION_CONTROLLER); - ctmData[1][0] = new CTMData(BasicBlockType.INDUCTION_CASING, BasicBlockType.INDUCTION_PORT); - ctmData[2][0] = new CTMData(BasicBlockType.INDUCTION_CASING, BasicBlockType.INDUCTION_PORT); - ctmData[3][0] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[3][1] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[3][2] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[3][3] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[4][0] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[4][1] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[4][2] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[4][3] = new CTMData(BasicBlockType.INDUCTION_CELL, BasicBlockType.INDUCTION_PROVIDER).setRenderConvexConnections(); - ctmData[5][0] = new CTMData(BasicBlockType.SUPERHEATING_ELEMENT).setRenderConvexConnections(); - ctmData[7][0] = new CTMData(BasicBlockType.BOILER_CASING, BasicBlockType.BOILER_VALVE); - ctmData[8][0] = new CTMData(BasicBlockType.BOILER_CASING, BasicBlockType.BOILER_VALVE); - - break; - } - } - @Override public int damageDropped(IBlockState state) { @@ -946,12 +888,9 @@ public abstract class BlockBasic extends Block implements ICTMBlock @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) { - if(BasicBlockType.get(state) == BasicBlockType.STRUCTURAL_GLASS) + if(BasicBlockType.get(state) == BasicBlockType.STRUCTURAL_GLASS && BasicBlockType.get(world.getBlockState(pos.offset(side))) == BasicBlockType.STRUCTURAL_GLASS) { - if(!ctmData[10][0].shouldRenderSide(world, pos.offset(side), side)) - { - return false; - } + return false; } return super.shouldSideBeRendered(state, world, pos, side); @@ -997,43 +936,7 @@ public abstract class BlockBasic extends Block implements ICTMBlock return false; } - - @Override - public CTMData getCTMData(IBlockState state) - { - return ctmData[state.getBlock().getMetaFromState(state)][0]; - } - - @Override - public String getOverrideTexture(IBlockState state, EnumFacing side) - { - BasicBlockType type = state.getValue(getTypeProperty()); - - if(type == BasicBlockType.INDUCTION_CELL || type == BasicBlockType.INDUCTION_PROVIDER) - { - return type.getName() + "_" + state.getValue(BlockStateBasic.tierProperty).getName(); - } - - if(type == BasicBlockType.THERMAL_EVAPORATION_CONTROLLER) - { - if(side == state.getValue(BlockStateFacing.facingProperty)) - { - return type.getName() + (state.getValue(BlockStateBasic.activeProperty) ? "_on" : ""); - } - else { - return "thermal_evaporation_block"; - } - } - - if(type == BasicBlockType.INDUCTION_PORT) - { - return type.getName() + (state.getValue(BlockStateBasic.activeProperty) ? "_output" : ""); - } - - return null; - } - - @Override + public PropertyEnum getTypeProperty() { return getBasicBlock().getProperty(); @@ -1044,4 +947,4 @@ public abstract class BlockBasic extends Block implements ICTMBlock { return BasicBlockType.get(world.getBlockState(pos)).isBeaconBase; } -} \ No newline at end of file +} diff --git a/src/main/java/mekanism/common/block/BlockMachine.java b/src/main/java/mekanism/common/block/BlockMachine.java index 6529f9ed9..e34429171 100644 --- a/src/main/java/mekanism/common/block/BlockMachine.java +++ b/src/main/java/mekanism/common/block/BlockMachine.java @@ -6,9 +6,6 @@ import java.util.UUID; import mekanism.api.Coord4D; import mekanism.api.energy.IEnergizedItem; import mekanism.api.energy.IStrictEnergyStorage; -import mekanism.client.render.ctm.CTMBlockRenderContext; -import mekanism.client.render.ctm.CTMData; -import mekanism.client.render.ctm.ICTMBlock; import mekanism.common.Mekanism; import mekanism.common.Tier.FluidTankTier; import mekanism.common.base.IActiveState; @@ -134,10 +131,8 @@ import buildcraft.api.tools.IToolWrench; * @author AidanBrady * */ -public abstract class BlockMachine extends BlockContainer implements ICTMBlock +public abstract class BlockMachine extends BlockContainer { - public CTMData[] ctmData = new CTMData[16]; - private static final AxisAlignedBB CHARGEPAD_BOUNDS = new AxisAlignedBB(0.0F, 0.0F, 0.0F, 1.0F, 0.06F, 1.0F); private static final AxisAlignedBB TANK_BOUNDS = new AxisAlignedBB(0.125F, 0.0F, 0.125F, 0.875F, 1.0F, 0.875F); private static final AxisAlignedBB LASER_BOUNDS = new AxisAlignedBB(0.25F, 0.0F, 0.25F, 0.75F, 1.0F, 0.75F); @@ -149,8 +144,6 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock setHardness(3.5F); setResistance(16F); setCreativeTab(Mekanism.tabMekanism); - - initCTMs(); } public static BlockMachine getBlockMachine(MachineBlock block) @@ -166,21 +159,6 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock } public abstract MachineBlock getMachineBlock(); - - @SideOnly(Side.CLIENT) - @Override - public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos) - { - if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR) - { - return stateIn; - } - - IExtendedBlockState state = (IExtendedBlockState)stateIn; - CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); - - return state.withProperty(BlockStateBasic.ctmProperty, ctx); - } @Override public BlockStateContainer createBlockState() @@ -230,18 +208,6 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock return state; } - - public void initCTMs() - { - switch(getMachineBlock()) - { - case MACHINE_BLOCK_1: - ctmData[11] = new CTMData(BasicBlockType.TELEPORTER_FRAME, MachineType.TELEPORTER); - - break; - default: - } - } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) @@ -1048,20 +1014,7 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock return true; } } - - @Override - public CTMData getCTMData(IBlockState state) - { - return ctmData[state.getBlock().getMetaFromState(state)]; - } - - @Override - public String getOverrideTexture(IBlockState state, EnumFacing side) - { - return null; - } - - @Override + public PropertyEnum getTypeProperty() { return getMachineBlock().getProperty(); diff --git a/src/main/java/mekanism/common/block/states/BlockStateBasic.java b/src/main/java/mekanism/common/block/states/BlockStateBasic.java index 8dbfacd80..3a944b47a 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateBasic.java +++ b/src/main/java/mekanism/common/block/states/BlockStateBasic.java @@ -1,6 +1,5 @@ package mekanism.common.block.states; -import mekanism.client.render.ctm.PropertyCTMRenderContext; import mekanism.common.Mekanism; import mekanism.common.MekanismBlocks; import mekanism.common.Tier.BaseTier; @@ -45,11 +44,10 @@ public class BlockStateBasic extends ExtendedBlockState { public static final PropertyBool activeProperty = PropertyBool.create("active"); public static final PropertyEnum tierProperty = PropertyEnum.create("tier", BaseTier.class); - public static final PropertyCTMRenderContext ctmProperty = new PropertyCTMRenderContext(); public BlockStateBasic(BlockBasic block, PropertyEnum typeProperty) { - super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); + super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty}, new IUnlistedProperty[] {}); } public static enum BasicBlock diff --git a/src/main/java/mekanism/common/block/states/BlockStateMachine.java b/src/main/java/mekanism/common/block/states/BlockStateMachine.java index 33efc28bb..3e1854d90 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateMachine.java +++ b/src/main/java/mekanism/common/block/states/BlockStateMachine.java @@ -82,7 +82,7 @@ public class BlockStateMachine extends ExtendedBlockState public BlockStateMachine(BlockMachine block, PropertyEnum typeProperty) { - super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty, recipeProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); + super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty, tierProperty, recipeProperty}, new IUnlistedProperty[] {}); } public enum MachineBlock diff --git a/src/main/java/mekanism/common/config/MekanismConfig.java b/src/main/java/mekanism/common/config/MekanismConfig.java index 2fc3088df..967e8873a 100644 --- a/src/main/java/mekanism/common/config/MekanismConfig.java +++ b/src/main/java/mekanism/common/config/MekanismConfig.java @@ -84,7 +84,6 @@ public class MekanismConfig public static boolean machineEffects = true; public static boolean oldTransmitterRender = false; public static boolean replaceSoundsWhenResuming = true; - public static boolean renderCTM = true; public static boolean enableAmbientLighting; public static int ambientLightingLevel; public static boolean opaqueTransmitters = false; diff --git a/src/main/java/mekanism/generators/client/GeneratorsClientProxy.java b/src/main/java/mekanism/generators/client/GeneratorsClientProxy.java index 9bba49203..b08ae4851 100644 --- a/src/main/java/mekanism/generators/client/GeneratorsClientProxy.java +++ b/src/main/java/mekanism/generators/client/GeneratorsClientProxy.java @@ -3,7 +3,6 @@ package mekanism.generators.client; import java.io.IOException; import mekanism.client.render.MekanismRenderer; -import mekanism.client.render.ctm.CTMRegistry; import mekanism.generators.client.gui.GuiBioGenerator; import mekanism.generators.client.gui.GuiGasGenerator; import mekanism.generators.client.gui.GuiHeatGenerator; @@ -138,10 +137,6 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy public void preInit() { MinecraftForge.EVENT_BUS.register(this); - - CTMRegistry.registerCTMs("mekanismgenerators", "turbine_vent", "turbine_valve", "turbine_casing", "electromagnetic_coil", - "reactor_controller", "reactor_frame", "reactor_port", "reactor_port_output", "reactor_glass", "laser_focus_matrix", - "reactor_logic_adapter", "reactor_controller_on", "saturating_condenser"); } @Override diff --git a/src/main/java/mekanism/generators/client/render/item/BakedGeneratorItemModel.java b/src/main/java/mekanism/generators/client/render/item/BakedGeneratorItemModel.java index 3dcf2fc0f..5eb519a28 100644 --- a/src/main/java/mekanism/generators/client/render/item/BakedGeneratorItemModel.java +++ b/src/main/java/mekanism/generators/client/render/item/BakedGeneratorItemModel.java @@ -2,11 +2,13 @@ package mekanism.generators.client.render.item; import java.util.LinkedList; import java.util.List; +import java.util.Map; import javax.vecmath.Matrix4f; +import javax.vecmath.Vector3f; +import com.google.common.collect.ImmutableMap; import mekanism.client.render.MekanismRenderer; -import mekanism.client.render.ctm.CTMModelFactory; import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils.ResourceType; import mekanism.generators.client.model.ModelAdvancedSolarGenerator; @@ -33,6 +35,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraftforge.client.model.IPerspectiveAwareModel; +import net.minecraftforge.common.model.TRSRTransformation; import org.apache.commons.lang3.tuple.Pair; import org.lwjgl.opengl.GL11; @@ -190,9 +193,30 @@ public class BakedGeneratorItemModel implements IBakedModel, IPerspectiveAwareMo { prevTransform = cameraTransformType; - return Pair.of(this, CTMModelFactory.transforms.get(cameraTransformType).getMatrix()); + return Pair.of(this, transforms.get(cameraTransformType).getMatrix()); } + // Copy from old CTM + public static Map transforms = ImmutableMap.builder() + .put(TransformType.GUI, get(0, 0, 0, 30, 225, 0, 0.625f)) + .put(TransformType.THIRD_PERSON_RIGHT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.THIRD_PERSON_LEFT_HAND, get(0, 2.5f, 0, 75, 45, 0, 0.375f)) + .put(TransformType.FIRST_PERSON_RIGHT_HAND, get(0, 0, 0, 0, 45, 0, 0.4f)) + .put(TransformType.FIRST_PERSON_LEFT_HAND, get(0, 0, 0, 0, 225, 0, 0.4f)) + .put(TransformType.GROUND, get(0, 2, 0, 0, 0, 0, 0.25f)) + .put(TransformType.HEAD, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.FIXED, get(0, 0, 0, 0, 0, 0, 1)) + .put(TransformType.NONE, get(0, 0, 0, 0, 0, 0, 0)) + .build(); + private static TRSRTransformation get(float tx, float ty, float tz, float ax, float ay, float az, float s) + { + return new TRSRTransformation( + new Vector3f(tx / 16, ty / 16, tz / 16), + TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)), + new Vector3f(s, s, s), + null); + } + @Override public ItemOverrideList getOverrides() { diff --git a/src/main/java/mekanism/generators/common/block/BlockGenerator.java b/src/main/java/mekanism/generators/common/block/BlockGenerator.java index 03976ab9a..6d182d798 100644 --- a/src/main/java/mekanism/generators/common/block/BlockGenerator.java +++ b/src/main/java/mekanism/generators/common/block/BlockGenerator.java @@ -3,9 +3,6 @@ package mekanism.generators.common.block; import java.util.Random; import mekanism.api.energy.IEnergizedItem; -import mekanism.client.render.ctm.CTMBlockRenderContext; -import mekanism.client.render.ctm.CTMData; -import mekanism.client.render.ctm.ICTMBlock; import mekanism.common.Mekanism; import mekanism.common.base.IActiveState; import mekanism.common.base.IBoundingBlock; @@ -82,10 +79,8 @@ import buildcraft.api.tools.IToolWrench; * @author AidanBrady * */ -public abstract class BlockGenerator extends BlockContainer implements ICTMBlock +public abstract class BlockGenerator extends BlockContainer { - public CTMData[] ctmData = new CTMData[16]; - public Random machineRand = new Random(); private static final AxisAlignedBB SOLAR_BOUNDS = new AxisAlignedBB(0.0F, 0.0F, 0.0F, 1.0F, 0.7F, 1.0F); @@ -97,8 +92,6 @@ public abstract class BlockGenerator extends BlockContainer implements ICTMBlock setHardness(3.5F); setResistance(8F); setCreativeTab(Mekanism.tabMekanism); - - initCTMs(); } public static BlockGenerator getGeneratorBlock(GeneratorBlock block) @@ -115,36 +108,6 @@ public abstract class BlockGenerator extends BlockContainer implements ICTMBlock public abstract GeneratorBlock getGeneratorBlock(); - public void initCTMs() - { - switch(getGeneratorBlock()) - { - case GENERATOR_BLOCK_1: - ctmData[9] = new CTMData(GeneratorType.ELECTROMAGNETIC_COIL); - ctmData[10] = new CTMData(GeneratorType.TURBINE_CASING, GeneratorType.TURBINE_VALVE, GeneratorType.TURBINE_VENT); - ctmData[11] = new CTMData(GeneratorType.TURBINE_VALVE, GeneratorType.TURBINE_CASING, GeneratorType.TURBINE_VENT); - ctmData[12] = new CTMData(GeneratorType.TURBINE_VENT, GeneratorType.TURBINE_CASING, GeneratorType.TURBINE_VALVE); - ctmData[13] = new CTMData(GeneratorType.SATURATING_CONDENSER); - - break; - } - } - - @SideOnly(Side.CLIENT) - @Override - public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos) - { - if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR) - { - return stateIn; - } - - IExtendedBlockState state = (IExtendedBlockState)stateIn; - CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); - - return state.withProperty(BlockStateBasic.ctmProperty, ctx); - } - @Override public BlockStateContainer createBlockState() { @@ -761,20 +724,7 @@ public abstract class BlockGenerator extends BlockContainer implements ICTMBlock return false; } - - @Override - public CTMData getCTMData(IBlockState state) - { - return ctmData[state.getBlock().getMetaFromState(state)]; - } - - @Override - public String getOverrideTexture(IBlockState state, EnumFacing side) - { - return null; - } - - @Override + public PropertyEnum getTypeProperty() { return getGeneratorBlock().getProperty(); diff --git a/src/main/java/mekanism/generators/common/block/BlockReactor.java b/src/main/java/mekanism/generators/common/block/BlockReactor.java index 00d86b305..c1498c05e 100644 --- a/src/main/java/mekanism/generators/common/block/BlockReactor.java +++ b/src/main/java/mekanism/generators/common/block/BlockReactor.java @@ -1,11 +1,7 @@ package mekanism.generators.common.block; -import mekanism.client.render.ctm.CTMBlockRenderContext; -import mekanism.client.render.ctm.CTMData; -import mekanism.client.render.ctm.ICTMBlock; import mekanism.common.Mekanism; import mekanism.common.base.IActiveState; -import mekanism.common.block.states.BlockStateBasic; import mekanism.common.tile.prefab.TileEntityBasicBlock; import mekanism.common.tile.prefab.TileEntityElectricBlock; import mekanism.common.util.MekanismUtils; @@ -39,14 +35,12 @@ import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; -import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import buildcraft.api.tools.IToolWrench; -public abstract class BlockReactor extends Block implements ICTMBlock, ITileEntityProvider +public abstract class BlockReactor extends Block implements ITileEntityProvider { - public CTMData[] ctmData = new CTMData[16]; public BlockReactor() { @@ -54,8 +48,6 @@ public abstract class BlockReactor extends Block implements ICTMBlock, ITileEnti setHardness(3.5F); setResistance(8F); setCreativeTab(Mekanism.tabMekanism); - - initCTMs(); } public static BlockReactor getReactorBlock(ReactorBlock block) @@ -90,41 +82,6 @@ public abstract class BlockReactor extends Block implements ICTMBlock, ITileEnti return state; } - public void initCTMs() - { - switch(getReactorBlock()) - { - case REACTOR_BLOCK: - ctmData[0] = new CTMData(ReactorBlockType.REACTOR_CONTROLLER, ReactorBlockType.REACTOR_FRAME, ReactorBlockType.REACTOR_PORT, ReactorBlockType.REACTOR_LOGIC_ADAPTER); - ctmData[1] = new CTMData(ReactorBlockType.REACTOR_CONTROLLER, ReactorBlockType.REACTOR_FRAME, ReactorBlockType.REACTOR_PORT, ReactorBlockType.REACTOR_LOGIC_ADAPTER); - ctmData[2] = new CTMData(ReactorBlockType.REACTOR_CONTROLLER, ReactorBlockType.REACTOR_FRAME, ReactorBlockType.REACTOR_PORT, ReactorBlockType.REACTOR_LOGIC_ADAPTER); - ctmData[3] = new CTMData(ReactorBlockType.REACTOR_CONTROLLER, ReactorBlockType.REACTOR_FRAME, ReactorBlockType.REACTOR_PORT, ReactorBlockType.REACTOR_LOGIC_ADAPTER); - ctmData[4] = new CTMData(ReactorBlockType.REACTOR_CONTROLLER, ReactorBlockType.REACTOR_FRAME, ReactorBlockType.REACTOR_PORT, ReactorBlockType.REACTOR_LOGIC_ADAPTER); - - break; - case REACTOR_GLASS: - ctmData[0] = new CTMData(ReactorBlockType.REACTOR_GLASS, ReactorBlockType.LASER_FOCUS_MATRIX); - ctmData[1] = new CTMData(ReactorBlockType.REACTOR_GLASS, ReactorBlockType.LASER_FOCUS_MATRIX); - - break; - } - } - - @SideOnly(Side.CLIENT) - @Override - public IBlockState getExtendedState(IBlockState stateIn, IBlockAccess w, BlockPos pos) - { - if(stateIn.getBlock() == null || stateIn.getMaterial() == Material.AIR) - { - return stateIn; - } - - IExtendedBlockState state = (IExtendedBlockState)stateIn; - CTMBlockRenderContext ctx = new CTMBlockRenderContext(w, pos); - - return state.withProperty(BlockStateBasic.ctmProperty, ctx); - } - @Override public BlockStateContainer createBlockState() { @@ -281,9 +238,13 @@ public abstract class BlockReactor extends Block implements ICTMBlock, ITileEnti if(type == ReactorBlockType.REACTOR_GLASS || type == ReactorBlockType.LASER_FOCUS_MATRIX) { - if(!ctmData[meta].shouldRenderSide(world, pos.offset(side), side)) - { - return false; + IBlockState stateOffset = world.getBlockState(pos.offset(side)); + if(this == stateOffset.getBlock()) { + int metaOffset = stateOffset.getBlock().getMetaFromState(stateOffset); + ReactorBlockType typeOffset = ReactorBlockType.get(getReactorBlock(), metaOffset); + if (typeOffset == ReactorBlockType.REACTOR_GLASS || type == ReactorBlockType.LASER_FOCUS_MATRIX) { + return false; + } } } @@ -354,37 +315,7 @@ public abstract class BlockReactor extends Block implements ICTMBlock, ITileEnti return itemStack; } - - @Override - public CTMData getCTMData(IBlockState state) - { - return ctmData[state.getBlock().getMetaFromState(state)]; - } - - @Override - public String getOverrideTexture(IBlockState state, EnumFacing side) - { - ReactorBlockType type = state.getValue(getTypeProperty()); - - if(type == ReactorBlockType.REACTOR_CONTROLLER) - { - if(side == EnumFacing.UP) - { - return type.getName() + (state.getValue(BlockStateReactor.activeProperty) ? "_on" : ""); - } - else { - return "reactor_frame"; - } - } - else if(type == ReactorBlockType.REACTOR_PORT) - { - return type.getName() + (state.getValue(BlockStateReactor.activeProperty) ? "_output" : ""); - } - - return null; - } - - @Override + public PropertyEnum getTypeProperty() { return getReactorBlock().getProperty(); diff --git a/src/main/java/mekanism/generators/common/block/states/BlockStateGenerator.java b/src/main/java/mekanism/generators/common/block/states/BlockStateGenerator.java index 6380ef963..e2372bba6 100644 --- a/src/main/java/mekanism/generators/common/block/states/BlockStateGenerator.java +++ b/src/main/java/mekanism/generators/common/block/states/BlockStateGenerator.java @@ -53,7 +53,7 @@ public class BlockStateGenerator extends ExtendedBlockState public BlockStateGenerator(BlockGenerator block, PropertyEnum typeProperty) { - super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); + super(block, new IProperty[] {BlockStateFacing.facingProperty, typeProperty, activeProperty}, new IUnlistedProperty[] {}); } public static enum GeneratorBlock diff --git a/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java b/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java index dbe6ade6f..3f849ef57 100644 --- a/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java +++ b/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java @@ -34,7 +34,7 @@ public class BlockStateReactor extends ExtendedBlockState public BlockStateReactor(BlockReactor block, PropertyEnum typeProperty) { - super(block, new IProperty[] {typeProperty, activeProperty}, new IUnlistedProperty[] {BlockStateBasic.ctmProperty}); + super(block, new IProperty[] {typeProperty, activeProperty}, new IUnlistedProperty[] {}); } public static enum ReactorBlock diff --git a/src/main/resources/assets/mekanism/blockstates/boiler_casing.json b/src/main/resources/assets/mekanism/blockstates/boiler_casing.json index e2cbe4ccd..0f28918b5 100644 --- a/src/main/resources/assets/mekanism/blockstates/boiler_casing.json +++ b/src/main/resources/assets/mekanism/blockstates/boiler_casing.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/boiler_casing" + "all": "mekanism:blocks/boiler_casing" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/boiler_valve.json b/src/main/resources/assets/mekanism/blockstates/boiler_valve.json index ef299bcc0..184ec8961 100644 --- a/src/main/resources/assets/mekanism/blockstates/boiler_valve.json +++ b/src/main/resources/assets/mekanism/blockstates/boiler_valve.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/boiler_valve" + "all": "mekanism:blocks/boiler_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json b/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json index 0c41fc493..a07cdc517 100644 --- a/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json +++ b/src/main/resources/assets/mekanism/blockstates/dynamic_tank.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/dynamic_tank" + "all": "mekanism:blocks/dynamic_tank" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json b/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json index 667a65d9d..4f6eec8df 100644 --- a/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json +++ b/src/main/resources/assets/mekanism/blockstates/dynamic_valve.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/dynamic_valve" + "all": "mekanism:blocks/dynamic_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json b/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json index 1b14552ad..3252f8a82 100644 --- a/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json +++ b/src/main/resources/assets/mekanism/blockstates/electromagnetic_coil.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/electromagnetic_coil" + "all": "mekanism:blocks/electromagnetic_coil" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_casing.json b/src/main/resources/assets/mekanism/blockstates/induction_casing.json index 3f0e2a490..2cba17d60 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_casing.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_casing.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_casing" + "all": "mekanism:blocks/induction_casing" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json index eafa1f124..8ece7b1d6 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_advanced.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_cell_advanced" + "all": "mekanism:blocks/induction_cell_advanced" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json index 119c43d8d..1a7241cb1 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_basic.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_cell_basic" + "all": "mekanism:blocks/induction_cell_basic" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json index cbb647a84..63f7bbaea 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_elite.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_cell_elite" + "all": "mekanism:blocks/induction_cell_elite" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json b/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json index ab064eb36..987515f9e 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_cell_ultimate.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_cell_ultimate" + "all": "mekanism:blocks/induction_cell_ultimate" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_port.json b/src/main/resources/assets/mekanism/blockstates/induction_port.json index 1206a30dd..195be6df4 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_port.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_port.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_port" + "all": "mekanism:blocks/induction_port" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json index 639865b48..0b7eb7a30 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_advanced.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_provider_advanced" + "all": "mekanism:blocks/induction_provider_advanced" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json index 1da31590e..1c4321aaf 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_basic.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_provider_basic" + "all": "mekanism:blocks/induction_provider_basic" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json index ed9789302..9d8aef33e 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_elite.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_provider_elite" + "all": "mekanism:blocks/induction_provider_elite" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json b/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json index 8b426c869..955cd4e05 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_provider_ultimate.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/induction_provider_ultimate" + "all": "mekanism:blocks/induction_provider_ultimate" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/structural_glass.json b/src/main/resources/assets/mekanism/blockstates/structural_glass.json index 00bae141e..e06060a91 100644 --- a/src/main/resources/assets/mekanism/blockstates/structural_glass.json +++ b/src/main/resources/assets/mekanism/blockstates/structural_glass.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/structural_glass" + "all": "mekanism:blocks/structural_glass" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/superheating_element.json b/src/main/resources/assets/mekanism/blockstates/superheating_element.json index 6943c41a7..fb83c472f 100644 --- a/src/main/resources/assets/mekanism/blockstates/superheating_element.json +++ b/src/main/resources/assets/mekanism/blockstates/superheating_element.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/superheating_element" + "all": "mekanism:blocks/superheating_element" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/teleporter.json b/src/main/resources/assets/mekanism/blockstates/teleporter.json index 6f2dd8a61..f973e45b9 100644 --- a/src/main/resources/assets/mekanism/blockstates/teleporter.json +++ b/src/main/resources/assets/mekanism/blockstates/teleporter.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/teleporter" + "all": "mekanism:blocks/teleporter" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json b/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json index b09eeb541..b440f7dda 100644 --- a/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json +++ b/src/main/resources/assets/mekanism/blockstates/teleporter_frame.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/teleporter_frame" + "all": "mekanism:blocks/teleporter_frame" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json index 1c74369d2..5e0699a97 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_block.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/thermal_evaporation_block" + "all": "mekanism:blocks/thermal_evaporation_block" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json index 61ab2f43f..5fda98a4a 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json @@ -3,8 +3,8 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanism:blocks/ctm/thermal_evaporation_block", - "front": "mekanism:blocks/ctm/thermal_evaporation_controller" + "sides": "mekanism:blocks/thermal_evaporation_block", + "front": "mekanism:blocks/thermal_evaporation_controller" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json index 2b1da32df..43b41657c 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_valve.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanism:blocks/ctm/thermal_evaporation_valve" + "all": "mekanism:blocks/thermal_evaporation_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/boiler_casing-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing.png b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_casing.png rename to src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta new file mode 100644 index 000000000..257d8efc7 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/boiler_casing-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/boiler_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve.png b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/boiler_valve.png rename to src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta new file mode 100644 index 000000000..ea0aaa4a8 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/boiler_valve-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta deleted file mode 100644 index efc331201..000000000 --- a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 10 - } -} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta deleted file mode 100644 index efc331201..000000000 --- a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png.mcmeta +++ /dev/null @@ -1,5 +0,0 @@ -{ - "animation": { - "frametime": 10 - } -} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_tank-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_tank-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/dynamic_tank-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_tank.png b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_tank.png rename to src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta new file mode 100644 index 000000000..27be62109 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/dynamic_tank-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/dynamic_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve.png b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/dynamic_valve.png rename to src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta new file mode 100644 index 000000000..4cd63ae95 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/dynamic_valve-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_casing-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing.png b/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_casing.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_casing.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta new file mode 100644 index 000000000..f5006838d --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_casing-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_advanced.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta new file mode 100644 index 000000000..923d4b7a2 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_cell_advanced-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_basic.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta new file mode 100644 index 000000000..5fef33ab4 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_cell_basic-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_elite.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta new file mode 100644 index 000000000..45766c25a --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_cell_elite-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate.png b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_cell_ultimate.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta new file mode 100644 index 000000000..cc0b1b7aa --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_cell_ultimate-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_port-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_port-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port.png b/src/main/resources/assets/mekanism/textures/blocks/induction_port.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_port.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta new file mode 100644 index 000000000..89e41b4f0 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_port-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_port_output-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output.png b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_port_output.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta new file mode 100644 index 000000000..faab9e488 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_port_output-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_advanced.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta new file mode 100644 index 000000000..b4da9cbd8 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_provider_advanced-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_basic.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta new file mode 100644 index 000000000..6e3bcf50a --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_provider_basic-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_elite.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta new file mode 100644 index 000000000..ff025a700 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_provider_elite-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate.png b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/induction_provider_ultimate.png rename to src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta new file mode 100644 index 000000000..c65a83e68 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/induction_provider_ultimate-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/structural_glass-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/structural_glass-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass.png b/src/main/resources/assets/mekanism/textures/blocks/structural_glass.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/structural_glass.png rename to src/main/resources/assets/mekanism/textures/blocks/structural_glass.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/structural_glass.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/structural_glass.png.mcmeta new file mode 100644 index 000000000..196780b25 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/structural_glass.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"CUTOUT", + "textures":[ + "mekanism:blocks/structural_glass-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/superheating_element-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/superheating_element-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element.png b/src/main/resources/assets/mekanism/textures/blocks/superheating_element.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element.png rename to src/main/resources/assets/mekanism/textures/blocks/superheating_element.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/superheating_element.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/superheating_element.png.mcmeta new file mode 100644 index 000000000..ec7da3e74 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/superheating_element.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/superheating_element-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/superheating_element_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/superheating_element_on-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on.png b/src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/superheating_element_on.png rename to src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png.mcmeta new file mode 100644 index 000000000..c7f2897e6 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/superheating_element_on.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/superheating_element_on-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/teleporter-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/teleporter-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter.png b/src/main/resources/assets/mekanism/textures/blocks/teleporter.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter.png rename to src/main/resources/assets/mekanism/textures/blocks/teleporter.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta new file mode 100644 index 000000000..89168b85f --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/teleporter-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/teleporter_frame-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame.png b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/teleporter_frame.png rename to src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta new file mode 100644 index 000000000..17bed2377 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/teleporter_frame-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_block.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta new file mode 100644 index 000000000..d204b1992 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/thermal_evaporation_block-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta new file mode 100644 index 000000000..9e6e07cd3 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/thermal_evaporation_controller-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_controller_on.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta new file mode 100644 index 000000000..3d5276da9 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta @@ -0,0 +1,13 @@ +{ + "animation": { + "frametime": 10 + }, + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/thermal_evaporation_controller_on-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve-ctm.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve-ctm.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve-ctm.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve.png b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png similarity index 100% rename from src/main/resources/assets/mekanism/textures/blocks/ctm/thermal_evaporation_valve.png rename to src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta new file mode 100644 index 000000000..580243f57 --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanism:blocks/thermal_evaporation_valve-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/electromagnetic_coil.json b/src/main/resources/assets/mekanismgenerators/blockstates/electromagnetic_coil.json index cb9368072..8d57ca8d7 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/electromagnetic_coil.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/electromagnetic_coil.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/electromagnetic_coil" + "all": "mekanismgenerators:blocks/electromagnetic_coil" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/laser_focus_matrix.json b/src/main/resources/assets/mekanismgenerators/blockstates/laser_focus_matrix.json index cb1c6899e..6ce375e73 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/laser_focus_matrix.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/laser_focus_matrix.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/laser_focus_matrix" + "all": "mekanismgenerators:blocks/laser_focus_matrix" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json index d23429914..6d22742db 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json @@ -3,9 +3,9 @@ "defaults": { "model": "mekanism:machine", "textures": { - "sides": "mekanismgenerators:blocks/ctm/reactor_frame", - "front": "mekanismgenerators:blocks/ctm/reactor_frame", - "top": "mekanismgenerators:blocks/ctm/reactor_controller" + "sides": "mekanismgenerators:blocks/reactor_frame", + "front": "mekanismgenerators:blocks/reactor_frame", + "top": "mekanismgenerators:blocks/reactor_controller" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_frame.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_frame.json index 4301c212c..86c07c498 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_frame.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_frame.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/reactor_frame" + "all": "mekanismgenerators:blocks/reactor_frame" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_glass.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_glass.json index ee9fbcb58..57f20e994 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_glass.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_glass.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/reactor_glass" + "all": "mekanismgenerators:blocks/reactor_glass" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_logic_adapter.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_logic_adapter.json index 76ac4001d..7268044a6 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_logic_adapter.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_logic_adapter.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/reactor_logic_adapter" + "all": "mekanismgenerators:blocks/reactor_logic_adapter" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json index 7c206e9c1..d85bd2c95 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/reactor_port" + "all": "mekanismgenerators:blocks/reactor_port" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/saturating_condenser.json b/src/main/resources/assets/mekanismgenerators/blockstates/saturating_condenser.json index cdc754f69..0129b1a66 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/saturating_condenser.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/saturating_condenser.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/saturating_condenser" + "all": "mekanismgenerators:blocks/saturating_condenser" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_casing.json b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_casing.json index 5ab17c563..387913bff 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_casing.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_casing.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/turbine_casing" + "all": "mekanismgenerators:blocks/turbine_casing" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_valve.json b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_valve.json index efbffc748..a2f29142d 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_valve.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_valve.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/turbine_valve" + "all": "mekanismgenerators:blocks/turbine_valve" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_vent.json b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_vent.json index 104893fa1..fac3e290b 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/turbine_vent.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/turbine_vent.json @@ -3,7 +3,7 @@ "defaults": { "model": "mekanism:basic_cube", "textures": { - "all": "mekanismgenerators:blocks/ctm/turbine_vent" + "all": "mekanismgenerators:blocks/turbine_vent" } }, "variants": { diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/electromagnetic_coil-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/electromagnetic_coil-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/electromagnetic_coil.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/electromagnetic_coil.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png.mcmeta new file mode 100644 index 000000000..20f32df80 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/electromagnetic_coil.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/electromagnetic_coil-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/laser_focus_matrix-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/laser_focus_matrix-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/laser_focus_matrix.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/laser_focus_matrix.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta new file mode 100644 index 000000000..08d11d9c3 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"TRANSLUCENT", + "textures":[ + "mekanismgenerators:blocks/laser_focus_matrix-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta new file mode 100644 index 000000000..4e12b602c --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_controller-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller_on-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller_on-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller_on.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_controller_on.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta new file mode 100644 index 000000000..8a2f1038e --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_controller_on-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_frame-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_frame-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_frame.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_frame.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta new file mode 100644 index 000000000..77dc47ec6 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_frame-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_glass-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_glass-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_glass.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_glass.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta new file mode 100644 index 000000000..f2d15a6a9 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"TRANSLUCENT", + "textures":[ + "mekanismgenerators:blocks/reactor_glass-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_logic_adapter-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_logic_adapter-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_logic_adapter.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_logic_adapter.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta new file mode 100644 index 000000000..f80721512 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_logic_adapter-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_neutron_capture-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_neutron_capture-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_neutron_capture.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_neutron_capture.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png.mcmeta new file mode 100644 index 000000000..4631ac6e3 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_neutron_capture.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"TRANSLUCENT", + "textures":[ + "mekanismgenerators:blocks/reactor_neutron_capture-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta new file mode 100644 index 000000000..736192334 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_port-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port_output-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port_output-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port_output.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/reactor_port_output.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta new file mode 100644 index 000000000..259cd7652 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/reactor_port_output-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/saturating_condenser-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/saturating_condenser-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/saturating_condenser.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/saturating_condenser.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png.mcmeta new file mode 100644 index 000000000..c7b687cf4 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/saturating_condenser.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/saturating_condenser-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_casing-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_casing-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_casing.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_casing.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta new file mode 100644 index 000000000..bb8ee6229 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/turbine_casing-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_valve-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_valve-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_valve.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_valve.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta new file mode 100644 index 000000000..781fe9365 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/turbine_valve-ctm" + ] + } +} diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_vent-ctm.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent-ctm.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_vent-ctm.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent-ctm.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_vent.png b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png similarity index 100% rename from src/main/resources/assets/mekanismgenerators/textures/blocks/ctm/turbine_vent.png rename to src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta new file mode 100644 index 000000000..1c3554045 --- /dev/null +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta @@ -0,0 +1,10 @@ +{ + "ctm":{ + "ctm_version": 1, + "type":"CTM", + "layer":"SOLID", + "textures":[ + "mekanismgenerators:blocks/turbine_vent-ctm" + ] + } +} From 6f67b35f602ee887054f752898f64d6c048fe3c0 Mon Sep 17 00:00:00 2001 From: Xander Victory Date: Tue, 25 Jul 2017 14:20:17 +0800 Subject: [PATCH 04/17] refactor build.gradle to support maven publishing --- build.gradle | 84 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 67 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 11dc58195..444eabc76 100644 --- a/build.gradle +++ b/build.gradle @@ -107,7 +107,9 @@ processResources } task coreJar(type: Jar) { - baseName = 'Mekanism' + archiveName = "Mekanism-${project.version}.jar" + dependsOn 'reobfJar' + classifier "core" from('etc/core') { include '*.info' @@ -120,7 +122,9 @@ task coreJar(type: Jar) { } task toolsJar(type: Jar) { - baseName = 'MekanismTools' + archiveName = "MekanismTools-${project.version}.jar" + dependsOn 'reobfJar' + classifier "tools" from('etc/tools') { include '*.info' @@ -133,7 +137,9 @@ task toolsJar(type: Jar) { } task generatorsJar(type: Jar) { - baseName = 'MekanismGenerators' + archiveName = "MekanismGenerators-${project.version}.jar" + dependsOn 'reobfJar' + classifier "generators" from('etc/generators') { include '*.info' @@ -145,28 +151,72 @@ task generatorsJar(type: Jar) { } } -coreJar.dependsOn('reobfJar') -toolsJar.dependsOn('reobfJar') -generatorsJar.dependsOn('reobfJar') - task MDKZip(type: Zip) { - baseName = 'MDK' + archiveName = "MDK-${project.version}.zip" from sourceSets.main.java.srcDirs include 'mekanism/api/**' + classifier "mdk" } -task releaseJars(type: Copy) { - from coreJar - from toolsJar - from generatorsJar - from MDKZip - rename '-(.*)jar', '.jar' - rename '-(.*)zip', '.zip' - into '.' +task apiJar(type: Jar) { + classifier "api" + baseName "Mekanism" + dependsOn "sourceMainJava" + include 'mekanism/api/**' + from sourceSets.main.java.srcDirs + from sourceSets.main.output +} + +artifacts { + archives apiJar + archives coreJar + archives toolsJar + archives generatorsJar + archives MDKZip } task fullBuild(type: Delete) { delete jar + dependsOn "build" } -fullBuild.dependsOn('releaseJars') +apply plugin: 'maven' +apply plugin: 'maven-publish' + +uploadArchives { + if(System.getenv("LOCAL_MAVEN") != null) { + repositories { + mavenDeployer { + repository(url: "file://"+System.getenv("LOCAL_MAVEN")) + pom { + groupId = project.group + version = project.version + if (System.getenv("MAVEN_ARTIFACT") != null) { + artifactId = System.getenv("MAVEN_ARTIFACT") + } else { + artifactId = "Mekanism" + } + project { + name "Mekanism" + packaging 'jar' + description 'Mekanism is a Minecraft add-on featuring high-tech machinery that can be used to create powerful tools, armor, and weapons.' + url 'http://aidancbrady.com/mekanism/' + scm { + url 'https://github.com/aidancbrady/Mekanism.git' + } + issueManagement { + system 'github' + url 'https://github.com/aidancbrady/Mekanism/issues' + } + licenses { + license { + name 'MIT' + distribution 'repo' + } + } + } + } + } + } + } +} \ No newline at end of file From 46350ed6099f4405be12ce05df2d35025f98ccf7 Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sun, 30 Jul 2017 13:41:30 +0200 Subject: [PATCH 05/17] Use CTM connect_to for connecting blocks --- build.properties | 2 +- .../textures/blocks/boiler_casing.png.mcmeta | 20 ++++++++++- .../textures/blocks/boiler_valve.png.mcmeta | 20 ++++++++++- .../textures/blocks/dynamic_tank.png.mcmeta | 20 ++++++++++- .../textures/blocks/dynamic_valve.png.mcmeta | 20 ++++++++++- .../blocks/induction_casing.png.mcmeta | 20 ++++++++++- .../blocks/induction_cell_advanced.png.mcmeta | 20 ++++++++++- .../blocks/induction_cell_basic.png.mcmeta | 20 ++++++++++- .../blocks/induction_cell_elite.png.mcmeta | 20 ++++++++++- .../blocks/induction_cell_ultimate.png.mcmeta | 20 ++++++++++- .../textures/blocks/induction_port.png.mcmeta | 20 ++++++++++- .../blocks/induction_port_output.png.mcmeta | 20 ++++++++++- .../induction_provider_advanced.png.mcmeta | 20 ++++++++++- .../induction_provider_basic.png.mcmeta | 20 ++++++++++- .../induction_provider_elite.png.mcmeta | 20 ++++++++++- .../induction_provider_ultimate.png.mcmeta | 20 ++++++++++- .../textures/blocks/teleporter.png.mcmeta | 20 ++++++++++- .../blocks/teleporter_frame.png.mcmeta | 20 ++++++++++- .../thermal_evaporation_block.png.mcmeta | 27 ++++++++++++++- .../thermal_evaporation_controller.png.mcmeta | 27 ++++++++++++++- ...ermal_evaporation_controller_on.png.mcmeta | 27 ++++++++++++++- .../thermal_evaporation_valve.png.mcmeta | 27 ++++++++++++++- .../blocks/laser_focus_matrix.png.mcmeta | 20 ++++++++++- .../blocks/reactor_controller.png.mcmeta | 34 ++++++++++++++++++- .../blocks/reactor_controller_on.png.mcmeta | 34 ++++++++++++++++++- .../textures/blocks/reactor_frame.png.mcmeta | 34 ++++++++++++++++++- .../textures/blocks/reactor_glass.png.mcmeta | 20 ++++++++++- .../blocks/reactor_logic_adapter.png.mcmeta | 34 ++++++++++++++++++- .../textures/blocks/reactor_port.png.mcmeta | 34 ++++++++++++++++++- .../blocks/reactor_port_output.png.mcmeta | 34 ++++++++++++++++++- .../textures/blocks/turbine_casing.png.mcmeta | 27 ++++++++++++++- .../textures/blocks/turbine_valve.png.mcmeta | 27 ++++++++++++++- .../textures/blocks/turbine_vent.png.mcmeta | 27 ++++++++++++++- 33 files changed, 742 insertions(+), 33 deletions(-) diff --git a/build.properties b/build.properties index 2460dbea3..29223ad4b 100644 --- a/build.properties +++ b/build.properties @@ -9,5 +9,5 @@ invtweak_version=1.62+beta.89 opencomputers_version=1.7.0.24 hwyla_version=1.8.13-B26_1.11 buildcraft_version=7.99.6 -ctm_version=0.2.0.8 +ctm_version=0.2.1.9 storagedrawers_version=4.2.10 diff --git a/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta index 257d8efc7..a6608aefe 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/boiler_casing.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/boiler_casing-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "boiler_casing" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "boiler_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta index ea0aaa4a8..5d537af66 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/boiler_valve.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/boiler_valve-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "boiler_casing" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "boiler_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta index 27be62109..38ab01749 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/dynamic_tank.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/dynamic_tank-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "dynamic_tank" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "dynamic_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta index 4cd63ae95..a5d5cdb40 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/dynamic_valve.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/dynamic_valve-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "dynamic_tank" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "dynamic_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta index f5006838d..676c3c7f6 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_casing.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_casing-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_casing" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta index 923d4b7a2..27305eee5 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_advanced.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_cell_advanced-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta index 5fef33ab4..50bff00ac 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_basic.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_cell_basic-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta index 45766c25a..d91b9490c 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_elite.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_cell_elite-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta index cc0b1b7aa..03c9a6398 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_cell_ultimate.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_cell_ultimate-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta index 89e41b4f0..8e67deed2 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_port.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_port-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_casing" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta index faab9e488..a2275b128 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_port_output.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_port_output-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_casing" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta index b4da9cbd8..4cf8bf026 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_advanced.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_provider_advanced-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta index 6e3bcf50a..b1123a05e 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_basic.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_provider_basic-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta index ff025a700..c8ed21f54 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_elite.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_provider_elite-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta index c65a83e68..52de5b581 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/induction_provider_ultimate.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/induction_provider_ultimate-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_cell" + } + }, + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "induction_provider" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta index 89168b85f..15144b177 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/teleporter.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/teleporter-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "teleporter_frame" + } + }, + { + "block": "mekanism:machineblock", + "predicate": + { + "type": "teleporter" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta index 17bed2377..dad88f3ad 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/teleporter_frame.png.mcmeta @@ -5,6 +5,24 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/teleporter_frame-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "teleporter_frame" + } + }, + { + "block": "mekanism:machineblock", + "predicate": + { + "type": "teleporter" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta index d204b1992..836e5bb0d 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_block.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/thermal_evaporation_block-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "thermal_evaporation_block" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_controller" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta index 9e6e07cd3..79641f2a7 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/thermal_evaporation_controller-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "thermal_evaporation_block" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_controller" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta index 3d5276da9..a6e3540b3 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on.png.mcmeta @@ -8,6 +8,31 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/thermal_evaporation_controller_on-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "thermal_evaporation_block" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_controller" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta index 580243f57..190a014ff 100644 --- a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_valve.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanism:blocks/thermal_evaporation_valve-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanism:basicblock2", + "predicate": + { + "type": "thermal_evaporation_block" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_controller" + } + }, + { + "block": "mekanism:basicblock", + "predicate": + { + "type": "thermal_evaporation_valve" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta index 08d11d9c3..985103ab8 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/laser_focus_matrix.png.mcmeta @@ -5,6 +5,24 @@ "layer":"TRANSLUCENT", "textures":[ "mekanismgenerators:blocks/laser_focus_matrix-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactorglass", + "predicate": + { + "type": "reactor_glass" + } + }, + { + "block": "mekanismgenerators:reactorglass", + "predicate": + { + "type": "laser_focus_matrix" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta index 4e12b602c..41c2d44b4 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_controller-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta index 8a2f1038e..2a1a78418 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_controller_on.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_controller_on-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta index 77dc47ec6..9e4b6a9aa 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_frame.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_frame-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta index f2d15a6a9..7121dad34 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_glass.png.mcmeta @@ -5,6 +5,24 @@ "layer":"TRANSLUCENT", "textures":[ "mekanismgenerators:blocks/reactor_glass-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactorglass", + "predicate": + { + "type": "reactor_glass" + } + }, + { + "block": "mekanismgenerators:reactorglass", + "predicate": + { + "type": "laser_focus_matrix" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta index f80721512..cc258e2e8 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_logic_adapter.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_logic_adapter-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta index 736192334..8885f43ea 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_port-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta index 259cd7652..4fe849667 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/reactor_port_output.png.mcmeta @@ -5,6 +5,38 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/reactor_port_output-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_frame" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_controller" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_logic_adapter" + } + }, + { + "block": "mekanismgenerators:reactor", + "predicate": + { + "type": "reactor_port" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta index bb8ee6229..373d77fff 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_casing.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/turbine_casing-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_casing" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_valve" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_vent" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta index 781fe9365..d9077479b 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_valve.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/turbine_valve-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_casing" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_valve" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_vent" + } + } + ] + } } } diff --git a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta index 1c3554045..be7c9f9fa 100644 --- a/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta +++ b/src/main/resources/assets/mekanismgenerators/textures/blocks/turbine_vent.png.mcmeta @@ -5,6 +5,31 @@ "layer":"SOLID", "textures":[ "mekanismgenerators:blocks/turbine_vent-ctm" - ] + ], + "extra": { + "connect_to": [ + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_casing" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_valve" + } + }, + { + "block": "mekanismgenerators:generator", + "predicate": + { + "type": "turbine_vent" + } + } + ] + } } } From 5d8cf6afc26c8ea2a96bfa8f5d818cf7c18ff87c Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sun, 30 Jul 2017 14:30:44 +0200 Subject: [PATCH 06/17] Allow texture rotation of Thermal Evap. Controller --- src/main/java/mekanism/common/block/states/BlockStateBasic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/mekanism/common/block/states/BlockStateBasic.java b/src/main/java/mekanism/common/block/states/BlockStateBasic.java index 3a944b47a..9782a9f81 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateBasic.java +++ b/src/main/java/mekanism/common/block/states/BlockStateBasic.java @@ -97,7 +97,7 @@ public class BlockStateBasic extends ExtendedBlockState DYNAMIC_VALVE(BasicBlock.BASIC_BLOCK_1, 11, "DynamicValve", TileEntityDynamicValve.class, true, Predicates.alwaysFalse(), false, false, false), COPPER_BLOCK(BasicBlock.BASIC_BLOCK_1, 12, "CopperBlock", null, false, Predicates.alwaysFalse(), false, false, true), TIN_BLOCK(BasicBlock.BASIC_BLOCK_1, 13, "TinBlock", null, false, Predicates.alwaysFalse(), false, false, true), - THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, true, Predicates.alwaysFalse(), false, false, false), + THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, true, Plane.HORIZONTAL, false, false, false), THERMAL_EVAPORATION_VALVE(BasicBlock.BASIC_BLOCK_1, 15, "ThermalEvaporationValve", TileEntityThermalEvaporationValve.class, true, Predicates.alwaysFalse(), false, false, false), THERMAL_EVAPORATION_BLOCK(BasicBlock.BASIC_BLOCK_2, 0, "ThermalEvaporationBlock", TileEntityThermalEvaporationBlock.class, true, Predicates.alwaysFalse(), false, false, false), INDUCTION_CASING(BasicBlock.BASIC_BLOCK_2, 1, "InductionCasing", TileEntityInductionCasing.class, true, Predicates.alwaysFalse(), false, false, false), From d0f0508a26aabfa41bcad4d033a174c1414b3591 Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sun, 30 Jul 2017 14:40:57 +0200 Subject: [PATCH 07/17] Set UP texture reactor controller --- .../mekanismgenerators/blockstates/reactor_controller.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json index 6d22742db..aecc08f32 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json @@ -5,7 +5,7 @@ "textures": { "sides": "mekanismgenerators:blocks/reactor_frame", "front": "mekanismgenerators:blocks/reactor_frame", - "top": "mekanismgenerators:blocks/reactor_controller" + "up": "mekanismgenerators:blocks/reactor_controller" } }, "variants": { From 83f06d6ba2fe86551fed13d1c62f2039a0baa2b2 Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sun, 30 Jul 2017 16:18:10 +0200 Subject: [PATCH 08/17] Fix active block states. Allowed Thermal Evaporation Controller and Induction Port to have active states. Allowed Reactor Controller and Reactor Port to have active states. Disallowed Reactor Focus Matrix to have active states. Fix issue with Reactor Glass and Reactor Laser Matrix should side render. --- .../common/block/states/BlockStateBasic.java | 4 ++-- .../generators/common/block/BlockReactor.java | 2 +- .../common/block/states/BlockStateReactor.java | 18 +++++++++++++++--- .../mekanism/blockstates/induction_port.json | 10 +++++++++- .../thermal_evaporation_controller.json | 11 ++++++++++- .../blockstates/reactor_controller.json | 18 +++++++++++------- .../blockstates/reactor_port.json | 10 +++++++++- 7 files changed, 57 insertions(+), 16 deletions(-) diff --git a/src/main/java/mekanism/common/block/states/BlockStateBasic.java b/src/main/java/mekanism/common/block/states/BlockStateBasic.java index 9782a9f81..adeb23f4b 100644 --- a/src/main/java/mekanism/common/block/states/BlockStateBasic.java +++ b/src/main/java/mekanism/common/block/states/BlockStateBasic.java @@ -97,11 +97,11 @@ public class BlockStateBasic extends ExtendedBlockState DYNAMIC_VALVE(BasicBlock.BASIC_BLOCK_1, 11, "DynamicValve", TileEntityDynamicValve.class, true, Predicates.alwaysFalse(), false, false, false), COPPER_BLOCK(BasicBlock.BASIC_BLOCK_1, 12, "CopperBlock", null, false, Predicates.alwaysFalse(), false, false, true), TIN_BLOCK(BasicBlock.BASIC_BLOCK_1, 13, "TinBlock", null, false, Predicates.alwaysFalse(), false, false, true), - THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, true, Plane.HORIZONTAL, false, false, false), + THERMAL_EVAPORATION_CONTROLLER(BasicBlock.BASIC_BLOCK_1, 14, "ThermalEvaporationController", TileEntityThermalEvaporationController.class, true, Plane.HORIZONTAL, true, false, false), THERMAL_EVAPORATION_VALVE(BasicBlock.BASIC_BLOCK_1, 15, "ThermalEvaporationValve", TileEntityThermalEvaporationValve.class, true, Predicates.alwaysFalse(), false, false, false), THERMAL_EVAPORATION_BLOCK(BasicBlock.BASIC_BLOCK_2, 0, "ThermalEvaporationBlock", TileEntityThermalEvaporationBlock.class, true, Predicates.alwaysFalse(), false, false, false), INDUCTION_CASING(BasicBlock.BASIC_BLOCK_2, 1, "InductionCasing", TileEntityInductionCasing.class, true, Predicates.alwaysFalse(), false, false, false), - INDUCTION_PORT(BasicBlock.BASIC_BLOCK_2, 2, "InductionPort", TileEntityInductionPort.class, true, Predicates.alwaysFalse(), false, false, false), + INDUCTION_PORT(BasicBlock.BASIC_BLOCK_2, 2, "InductionPort", TileEntityInductionPort.class, true, Predicates.alwaysFalse(), true, false, false), INDUCTION_CELL(BasicBlock.BASIC_BLOCK_2, 3, "InductionCell", TileEntityInductionCell.class, true, Predicates.alwaysFalse(), false, true, false), INDUCTION_PROVIDER(BasicBlock.BASIC_BLOCK_2, 4, "InductionProvider", TileEntityInductionProvider.class, true, Predicates.alwaysFalse(), false, true, false), SUPERHEATING_ELEMENT(BasicBlock.BASIC_BLOCK_2, 5, "SuperheatingElement", TileEntitySuperheatingElement.class, true, Predicates.alwaysFalse(), false, false, false), diff --git a/src/main/java/mekanism/generators/common/block/BlockReactor.java b/src/main/java/mekanism/generators/common/block/BlockReactor.java index 4f642870b..ccbd775ca 100644 --- a/src/main/java/mekanism/generators/common/block/BlockReactor.java +++ b/src/main/java/mekanism/generators/common/block/BlockReactor.java @@ -242,7 +242,7 @@ public abstract class BlockReactor extends Block implements ITileEntityProvider if(this == stateOffset.getBlock()) { int metaOffset = stateOffset.getBlock().getMetaFromState(stateOffset); ReactorBlockType typeOffset = ReactorBlockType.get(getReactorBlock(), metaOffset); - if (typeOffset == ReactorBlockType.REACTOR_GLASS || type == ReactorBlockType.LASER_FOCUS_MATRIX) { + if (typeOffset == ReactorBlockType.REACTOR_GLASS || typeOffset == ReactorBlockType.LASER_FOCUS_MATRIX) { return false; } } diff --git a/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java b/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java index 3f849ef57..064a98d5d 100644 --- a/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java +++ b/src/main/java/mekanism/generators/common/block/states/BlockStateReactor.java @@ -86,12 +86,12 @@ public class BlockStateReactor extends ExtendedBlockState public static enum ReactorBlockType implements IStringSerializable { - REACTOR_CONTROLLER(ReactorBlock.REACTOR_BLOCK, 0, "ReactorController", 10, TileEntityReactorController.class, false), + REACTOR_CONTROLLER(ReactorBlock.REACTOR_BLOCK, 0, "ReactorController", 10, TileEntityReactorController.class, true), REACTOR_FRAME(ReactorBlock.REACTOR_BLOCK, 1, "ReactorFrame", -1, TileEntityReactorFrame.class, false), - REACTOR_PORT(ReactorBlock.REACTOR_BLOCK, 2, "ReactorPort", -1, TileEntityReactorPort.class, false), + REACTOR_PORT(ReactorBlock.REACTOR_BLOCK, 2, "ReactorPort", -1, TileEntityReactorPort.class, true), REACTOR_LOGIC_ADAPTER(ReactorBlock.REACTOR_BLOCK, 3, "ReactorLogicAdapter", 15, TileEntityReactorLogicAdapter.class, false), REACTOR_GLASS(ReactorBlock.REACTOR_GLASS, 0, "ReactorGlass", -1, TileEntityReactorGlass.class, false), - LASER_FOCUS_MATRIX(ReactorBlock.REACTOR_GLASS, 1, "ReactorLaserFocusMatrix", -1, TileEntityReactorLaserFocusMatrix.class, true); + LASER_FOCUS_MATRIX(ReactorBlock.REACTOR_GLASS, 1, "ReactorLaserFocusMatrix", -1, TileEntityReactorLaserFocusMatrix.class, false); public ReactorBlock blockType; public int meta; @@ -164,6 +164,11 @@ public class BlockStateReactor extends ExtendedBlockState { return new ItemStack(blockType.getBlock(), amount, meta); } + + public boolean hasActiveTexture() + { + return activable; + } } public static class ReactorBlockStateMapper extends StateMapperBase @@ -176,6 +181,13 @@ public class BlockStateReactor extends ExtendedBlockState StringBuilder builder = new StringBuilder(); String nameOverride = null; + if(type.hasActiveTexture()) + { + builder.append(activeProperty.getName()); + builder.append("="); + builder.append(state.getValue(activeProperty)); + } + if(builder.length() == 0) { builder.append("normal"); diff --git a/src/main/resources/assets/mekanism/blockstates/induction_port.json b/src/main/resources/assets/mekanism/blockstates/induction_port.json index 195be6df4..4fdb1e33a 100644 --- a/src/main/resources/assets/mekanism/blockstates/induction_port.json +++ b/src/main/resources/assets/mekanism/blockstates/induction_port.json @@ -8,7 +8,15 @@ }, "variants": { "normal": [{}], - "inventory": [{}] + "inventory": [{}], + "active": { + "false": {}, + "true": { + "textures": { + "all": "mekanism:blocks/induction_port_output" + } + } + } } } diff --git a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json index 5fda98a4a..e0cdf4916 100644 --- a/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json +++ b/src/main/resources/assets/mekanism/blockstates/thermal_evaporation_controller.json @@ -15,7 +15,16 @@ "east": {"y": 90}, "west": {"y": -90} }, - "inventory": [{}] + "inventory": [{}], + "active": { + "false": {}, + "true": { + "textures": { + "sides": "mekanism:blocks/thermal_evaporation_block", + "front": "mekanism:blocks/thermal_evaporation_controller_on" + } + } + } } } diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json index aecc08f32..192e12856 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_controller.json @@ -10,13 +10,17 @@ }, "variants": { "normal": [{}], - "facing": { - "north": {}, - "south": {"y": 180}, - "east": {"y": 90}, - "west": {"y": -90} - }, - "inventory": [{}] + "inventory": [{}], + "active": { + "false": {}, + "true": { + "textures": { + "sides": "mekanismgenerators:blocks/reactor_frame", + "front": "mekanismgenerators:blocks/reactor_frame", + "up": "mekanismgenerators:blocks/reactor_controller_on" + } + } + } } } diff --git a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json index d85bd2c95..8f4e114ba 100644 --- a/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json +++ b/src/main/resources/assets/mekanismgenerators/blockstates/reactor_port.json @@ -8,7 +8,15 @@ }, "variants": { "normal": [{}], - "inventory": [{}] + "inventory": [{}], + "active": { + "false": {}, + "true": { + "textures": { + "all": "mekanismgenerators:blocks/reactor_port_output" + } + } + } } } From 3d080cfda61cf8731378ff1279931b5d86df8cd7 Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sun, 30 Jul 2017 18:41:45 +0200 Subject: [PATCH 09/17] Fix CTM Thermal Evap Controller animation --- .../blocks/thermal_evaporation_controller_on-ctm.png.mcmeta | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png.mcmeta diff --git a/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png.mcmeta b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png.mcmeta new file mode 100644 index 000000000..a949f0dba --- /dev/null +++ b/src/main/resources/assets/mekanism/textures/blocks/thermal_evaporation_controller_on-ctm.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 10 + } +} From 5bd67b37b2dfda42c0c0b32c7131981e03d713fb Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Mon, 31 Jul 2017 19:41:24 -0700 Subject: [PATCH 10/17] Fixed IC2 integration --- .../api/energy/prefab/BasicEnergyTile.java | 4 +- .../ic2/api/energy/prefab/BasicSink.class | Bin 3876 -> 4523 bytes .../java/ic2/api/energy/prefab/BasicSink.java | 8 ++++ .../api/energy/prefab/BasicSinkSource.class | Bin 4751 -> 5379 bytes .../api/energy/prefab/BasicSinkSource.java | 13 ++++++ .../ic2/api/energy/prefab/BasicSource.class | Bin 4328 -> 4746 bytes .../ic2/api/energy/prefab/BasicSource.java | 8 ++++ .../common/base/IAdvancedBoundingBlock.java | 4 +- .../mekanism/common/base/IEnergyWrapper.java | 12 +++-- .../common/integration/MekanismHooks.java | 13 +++--- .../common/integration/OreDictManager.java | 5 +-- .../integration/ic2/IC2Integration.java | 8 ++-- .../common/item/ItemBlockEnergyCube.java | 5 ++- .../common/item/ItemBlockMachine.java | 7 ++- .../mekanism/common/item/ItemEnergized.java | 5 ++- .../mekanism/common/item/ItemFreeRunners.java | 5 ++- .../network/PacketTransmitterUpdate.java | 5 +++ .../tile/TileEntityAdvancedBoundingBlock.java | 11 ++--- .../common/tile/TileEntityInductionPort.java | 42 +++++++++--------- .../tile/prefab/TileEntityBasicBlock.java | 3 +- .../tile/prefab/TileEntityElectricBlock.java | 36 +++++++-------- .../common/item/ItemBlockGenerator.java | 5 ++- .../tile/turbine/TileEntityTurbineValve.java | 38 ++++++++-------- 23 files changed, 137 insertions(+), 100 deletions(-) diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java b/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java index 624e1077f..fc913bafe 100644 --- a/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java +++ b/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java @@ -220,7 +220,7 @@ abstract class BasicEnergyTile implements ILocatable, IEnergyTile { * @return true if energy was transferred */ public boolean charge(ItemStack stack) { - if (stack == null || stack.isEmpty() || !Info.isIc2Available() || getWorldObj().isRemote) return false; + if (stack == null || !Info.isIc2Available() || getWorldObj().isRemote) return false; double amount = ElectricItem.manager.charge(stack, energyStored, Math.max(getSinkTier(), getSourceTier()), false, false); @@ -237,7 +237,7 @@ abstract class BasicEnergyTile implements ILocatable, IEnergyTile { * @return true if energy was transferred */ public boolean discharge(ItemStack stack, double limit) { - if (stack == null || stack.isEmpty() || !Info.isIc2Available() || getWorldObj().isRemote) return false; + if (stack == null || !Info.isIc2Available() || getWorldObj().isRemote) return false; double amount = capacity - energyStored; if (amount <= 0) return false; diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.class b/src/api/java/ic2/api/energy/prefab/BasicSink.class index 32434a7ee5803e4fab5d48a4063c2b62da8d87a5..6615ef962ceea89ac6ea1fc68706e9704f987aaf 100644 GIT binary patch literal 4523 zcmbVPYj@Pv72VhKkUhu-92`On*br03LqNeH3B{CvU+uKUNn=AGP1;`1h_UP$X^=Gr z`XKL+2T7XJ2We^3JeqvzT5Z=#n5<^4=6ilr(sQn4X)G&dRzLWRbanPQ`|fk@!(V;< zpZ@|F!6!Kk;i3jt!*UKOc%5kQ?+TksY%b@}fh%3O55HjFU$XfXzy6xd)f}G1bDeme zhhJdxBAb`kyv*hmHrLp^%H}mTud{iB&2=_!vU!Wm+iZTr<{dV_WphKr?=<{g!yg3F zo@KfMq9~9(ZrPT1LZFbJwoT8dS+-en|KG@V!V*(ysVv+gZVDxs%brzS8Ji4f?|6*h{# z&t%Q=Jkw2_&7|F^O_9iUWpwx{0nPM%1%^V|Hi#(DRkmES{nn6~0nJz1fy-9#xP z4JjEdjBXm6nfK;oWk%M>XIp-FdQq-Oqblu+G3&W3hYzJ1TmI~Z$Z72=N~oL80Xu6pmegEu>OHI`{@^LnIZomY6h zB<(ZNXqPO9gOD@f5 z&Y2mTQysfjOncrl=nK_k+^N;6isjL`-U%+Gw`hy z)sZwI>I)jpS@w#oT4m``IkJvDt-fU&b$=u`>onYwIYmoLpeNkg4sq+~$m7pc!>Eml z)v8&M)l+VzQKM~d@-nYlwNAE2PJXYAHLPmcbUDTnMGjaD@=ktiP{%F&h0R}eyoV>) z>2Er|gZ=#UKAR789L9)_4>6+QBOQOo$F!h|<0BzO9kZCzaRz5~Jc)BU&f_T^Kf%*F zo?-J-{7lEsQPd$ZucO3IWqvaG=>jS`7GUXE#FCCGn;ILN=?>gs=coOC0}sD__z+qj zsdW$IB`k2?+MZ#Db;p>%_SJl`13_TNT71h|6c}9lZT;dF7>;*WA^}>c)Js`eubVct z*1`Pxy=DD&6SM&BIy-5bUx$c3cY2QBGy;7|kty}A=ro8a;8QylpGJ!giHAh&$m8kh zrrK9lH-w(3rBBoONDHbaFAHSyyia2f-GYWdjX-~CZe6-p_0w}6!(9N2yEKo6G`}0r{Did35_O|+;Qrwz^uA1zoTO zO2FmV*MAGUr9>*s6BQ(im_}1sn9ghQT^8fl2kf15@}uAq0MaB3W+aqa-|IdwL3=qMQDDDxYKX zKVy-vtH`?V8AKNNA$}A@ITsXAFPx_c`O;?;FN(qcZ2<2ehZ`!6-{gA8P{%a!Vir11 z2TiVHhMv+i`WPM$vKaKsUKyg9i%2yv)-`yUXj`bw;_NbNoW^J8!#GLK}0oqVa z&W+N1jMUoU5sHkWVp-rpNP|${}qMl5q>9omAoJ1g_dYY7Nrxfip*v^J+28*5?d;Qk|NHwN05kX@gZM4$*vZUK;lmBwW*Q6ewi{sdJ`fy5|)Xauv&PwU%iax+9id%{7~bVY#Nep;c))FPFtq zIe(1|%-MBA!9<0$7rU*R;Z#MfNjtkLwl132gk$ozznO4X%#MO16;q$lMBCI1%WxVS zTH7&}MNOL(9aCR2t+gV#(-sbqDmXTjHww1tqAhfClENt|IG77aOl#TJ%IuHJzWAQ+ zd+fP_*=P#x*iN&qU1wR0_|v8IXf5HcXtPaQU%O&=e1fC|DVU4^`fVu~ZQGQQqY<4L zqYAcn441Q0l{HJ`WC3;xT{qfpXI^GaZYkooDeRVp!RJYe_okPpYZ6~GvMt-@a&1+?fk!}Fn}O2T(N~1S zo*s?HY`R8EE0b7qg}zoSae-2s+DD$C&B|ll4qaZpaCC2T60hpQx*G0|iF!~7)}WkD zPyh>#Vax@$Yl7O)GqdE{j#2lF(JWxqtq0t(A&_$)er4`B6j9Y)oUO`^-I`3R=4y08 zHJP(pZK`6u7|nN#3KhvQM4hWI%^r(pB?iM&Y}~fyR=U>ORjX+W3W)lGb~C26E}CXt zxKxgmZB^u1s@wK^jM~w z9lobNFVD>cNEP!~Q1K?-Qc=d+D&9dw#U(7NxXj`T-c|7)iYk^+RdJP9*LZcES2u7| z#Vx$A;se}P@ga+kSbU7zbQzy8acRyD(D16t!~aoB{iB6%mV$gV>#P#;vg&F2mKB`C>%Ns6epc1OO|p>FA0m|vZFo`s zhzx#`cDy!G0}oZ4C%@PW6>s=$qT+&VC%PJ#^;tOQti^7QM1%ji&&8x~I)OQqd@wfv zgGYC5`#lofFMZHa54z(b4=EoS^7b$m1>fic`@96E;T8kV3?8c_GO%AP@e8YY}x;W+f(;T)&uJ8*pSUia|yAaGbNdiG<$&kP5qe-~oF`-TJ4 RzZo&$XNLe2OvuSo`yUZh!uQURV{l_#+ zX6GHt&sS~7DthLMpZD#GWjVg>-^?%Z@uYg3nk^J2&TB}{xFt)&)_J-wG^)#%w`49? zII?5jEt-|{rf19V=3vslY}Yl6&)dagd9!BcEywc8H}f^mS}~XN(`MZ+E)wIS0yd=~ zRWm)-)-cu;D7IKMYi5yH+2X8*-kN(|+TF6~o5icA&6)zDSoxENk!%}??X0-@f?)Oq zZ>zmMZ|R`p&l+Z;TwQm)N-6)O*r^EO26@a^P5*L!y5bhEo^|W3BE2d~!*C>`Gns}& z%_VgQBR(-%b^Jxga~cNfmM>%m^P9{D^X04Q-y-iiW`BFx@@K88>6EO}Ni`=dn4KVl zhV5LjihgVGaI|9u;H1;2&XIPfJT*HjQCmv3$0*x%<~+AbrsH6DL~*9gs@ss6)~~r0 z-z-x?0|XT|KseOwHjbTHS+TqjXS(E>*IW3K*;$e0776X>Pkt{f`%7kd!K^a%&g{he z74w>zub56bzvz1cJ*dcuu?4t>!*p7|6k^y8g4B$kS-zrS--e*|)7W3K>&45aCk-Bq zl4<)^HD91na-Eu;xI|)F-Ur^sTb%nFbuLg@Q(T&)f!{Wio+DdZf zJj6*J+`vsE=(_Jn2X|emi;{6a584xYK^mA znu-z~<3gf6%PfhWRNAp_(ux#ZXXbLlxq8m2xF$QHjyRgOooi;rE}1^(A>}&r>RqZ) z3r5m`c;>j@Q7n;t>8L2jz=QZJr!Z7ep;EERX61xeZdAEvoxD-BYJrf3LZ?7#(+#^) zvOLMr&~Q%^%V?debyODUBclfXhUdk+VBkeOC7v&7$h19`w%fi(kvH%F@;d%*;APy= zv1(uquNZJ~#(;xMlHgS_uW1-;Woeaq1XBj?VoJw94Ez(XbN4RH9E)^q;3Ih2z(>K> zmr*oOf@NR@WdoPR*tlZgs+6lpxvD(X@QeWubpt*c2Cj*@F6M^xJ=WDJu(@BLNjaCe z$wczW!IdvGRZD6$9N5f5QL5q4`Xw((Hk^JMhFX~-2Zx3|>*G6CzlPEE?>25H8YZH$ zjs?K2fg(cw~x=JTXQz(M-+P^Il`C0K7UruZdvc)3C7)O-zJB)ka8kQV8;w} zb0$j;BY@l5{077IdzuG0_mHZ2gO`h}9CpbAyvj}T8hAgB&?dpf$lGI5)+7J#hsITR zjP@OXmg0CHN1w?}X4jx)lD9E(7d;p6B5`pI$sN6`NM(|%&{xs7hW+aO8+vv~jPOW0wi!7SJJ82Ip06USwE{tOc zr?3YL*o!3$b8+wEn%$3g(eE*O5GdY_hxlKf-h+qPhCFe@V5{;Z%_h~8wA;%J+wmyh zrf{62LrDCGMS68SrsKT{jnSiTVmzTZc|4Yr?f*Yc4iNPr!aYn*?jtATyC!2tgyT}aL z;vHlL!yNMI3p|B1o>qBsiWj2|*I*lqD!0Lf6l@p<)iXsu4d?M>vx-nHSbGU`;JFCI zQU}D|HpC0hq^1xFNk*O4yhd8Os65?{Pc*69_tP` wzggPATU*o`?%OOloGyOr!~~Cb7tC*@nBZ)8!Th$037+U8m|-{7&hzYl0f)>b?EnA( literal 4751 zcmbtWS$Esk5&j@9kVr_jbF!qLM&%mpE1G#ulZ9jV!B`Y$s{DKqN%LA^{cz zt+@NX?`zto`|{Ltx|}*n`_RWe^f&di{pJE(1S2X>`@kV^acAcHX1RC%@vp!B4Zvmm zHiv0^Xawiri)f7?Ks%3n*v;|vB@y>!%ZEjLM7DfX#K&^@I6g6qPs;MAM0{GrXGDBf z#OFkOUc?tfd{M-gM0{CPY6Y8Y-g?#_l| z`x>;ehFr^Q`xQG}$Ufz`PH6{}y{fI@&%uPK@gc*n);^)AH$C!^}XSNU>rytqQS{Vo5`$>Fo;L(e=Qp?A)-L z3W$oz_cWX>bb&bTmS>g)b0By-^iI9*1|8qmuo#ckuIJaQ<{gm>F~n`g(QH`3wt2no zRd&|AR>w(3X=#{@Y4jV@kZO7i-TBy_1gkoJpyOo?`Ia3>FvI+&3t_$jmHtur)|dSw zH9IKT4a=?C)g_e^IxNgGf`;SXwJSkq@j{%j03^uIVs@0(BV};q3yVgC+tXpo)Tn~JK9(rVA909K30yph%g@kB_N-E%lAR%P4rh2Z&kFrC0|m}Lr8t_!8v7Z{k%?&<%sTQ-lhTWnD2DYhmBPjvpELF<#N} z69YfR&kWdDGEl{uZ2Y;1Ul^FjB?G_2B^|#q@N4{r$7Ff&a?HGe4cszt8+QymhvyBv zfcF}B5$`kbei0wQ2Mt(aeN(Jg7d7dt#W2Rd#K-WMicE&z6O z%%0p3W;rSko;Vt&589#nQo|$rdrOQwbj@fu*|8Kmp*5V^uiw{Z8qV$i_Hf^7n2py@ zA^`Rvt7W1C!Vd4Nkm{<<<7(J(TY=?P7?#QIWf5(QLc)DKTTaDn^gf2C+M3){Qr*4t zn!S1EfGbLnU5m5m3&S8ckk~LnxSduX>m7_YcwMn$8rDm^N(*wdr>8l%Ok)V=@d#yF z8h|rUT6%#0Q{e560_7~O|IOlDVGmmIc=`c`ipMh#koptS$1{IHW(ZGai?1R( zk$w3Uj1(ubuR{MLRZ=KYo<^4P8085VIEisg(8Xyyj!De%%T@K=#G`nOZ*;^jCY{R@ zdyN3)Ng$@xlYq?7!VwN_m#F(Dt{#QnW=yjjOvQks_HqOf>tB8%bwmBkeOog<5B zvN%r+7wB~6by+;||FF2y$KuI|#otMMgv{oPbC1sMG1QUQHYLT`;v~69*$k<&$*I*R$oPsvb|T!>MV7^NdgO$N z#jdS@B_c&K#mbyiu_#L@3XH^XvA{rxk5sQT$JOqqk)y2%lyC-1%GWuTuJl2tB&Q-@ zIhL^$-H>9Jh4xQOq==wIy|7!ZFa}b(V`IfXBgbF9_8N@ecUgsBpH*IraA)L&cP!o+ zS$U4ErD=@f^R!T?JV1V|XCsWv8d1MT*(oX(Mi;GtXHZtQ4ZJIAAOp|xDb3Xt+=#qL zlL^)gVGjK+2JucG#7r0BYL}?VAas=TJ!~Pr7Za6lVlDE#NPZIGyyADUMtx84QLAtX|tXZpgfo7=;YgS4|< zZB8#;?Uc%2ws>(5`Br-I+!-+r6lcR@yhGx-9yenE7IP(Cx5GRN%%<*C7xIi@ElpB+G%YMwfIn*Ra(Z)P3< diff --git a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java index 3936ca843..88e9939cc 100644 --- a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java +++ b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java @@ -19,6 +19,9 @@ public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergy public BasicSinkSource(TileEntity parent, double capacity, int sinkTier, int sourceTier) { super(parent, capacity); + if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); + if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); + this.sinkTier = sinkTier; this.sourceTier = sourceTier; double power = EnergyNet.instance.getPowerFromTier(sourceTier); @@ -29,6 +32,9 @@ public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergy public BasicSinkSource(ILocatable parent, double capacity, int sinkTier, int sourceTier) { super(parent, capacity); + if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); + if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); + this.sinkTier = sinkTier; this.sourceTier = sourceTier; double power = EnergyNet.instance.getPowerFromTier(sourceTier); @@ -39,6 +45,9 @@ public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergy public BasicSinkSource(World world, BlockPos pos, double capacity, int sinkTier, int sourceTier) { super(world, pos, capacity); + if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); + if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); + this.sinkTier = sinkTier; this.sourceTier = sourceTier; double power = EnergyNet.instance.getPowerFromTier(sourceTier); @@ -52,6 +61,8 @@ public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergy * @param tier IC2 Tier. */ public void setSinkTier(int tier) { + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + this.sinkTier = tier; } @@ -61,6 +72,8 @@ public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergy * @param tier IC2 Tier. */ public void setSourceTier(int tier) { + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + double power = EnergyNet.instance.getPowerFromTier(tier); if (getCapacity() < power) setCapacity(power); diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/api/java/ic2/api/energy/prefab/BasicSource.class index aec40ce5dd52174534324ca8f160c9d8ffcdf494..fb1c81ef4e3ba7fc740acd1cb94779e0acbf6177 100644 GIT binary patch literal 4746 zcmcInX?GiE6@EsmEsvXpIC1JGw$mn&m8R2%LP?y2dM%1wCtxQbW$RcP%M(j8Vl=Xo z7Rp{qY1zsWAQUKTfpb_6jSuu3_zu5-|I!0I_nnC(kEgEqzz1K=ymO!X-sj%uUHp%K z|MhPGPT{vX9K$EG@Um#+kc8iZru?pp*${IhhXii+;wYZ!#k2TSA3lxea(w-an9mCS zb7DR(E??-u7v<$kVxAZCWic;^`HGkq#e7xFOJZIY^EELl5JMir*TsB8%s0h+OUx@` zzMaK)viNQm-_wxtZOhZ36*Xke+K%m?*HFmMJC<+MY{x2j=8A9lcGa>R-}Y}BOMIMB zkK@zDu`3KP<(4fCyXNV=(5x+6-jcao<;dQ7w`5kYn4T@~;b6*NwHq4lpSMe=46|+< zmScI9n?~KUR?KB%(rnnJMYrjdtZ^n(H$6_P;b>R+Xy_@Kb+g1YNoZO_y6$cWx&B4p zEUi6h)>RUU{4EWK^Q|OoXT>#&lCLkhhRhDW?e{FcuVFG;r484smW``o$0G?hSwW*_ z`m4rd)h(@EavR|sX$8_S6ajR`(vYmXEZUKXPfXA(evriv$+%(pK^d1+dsBJUtA49y z`;8e@@+DWp6YUa&eUMHY#lT~tRI=*6>&23pahkPR*4n9zk3Gf8dsfM^*QMG=TV>lR zriR|KO^|Q9j)vhlY8_K(*j=&wiz_RZXO)BOSe5)3o180q=EmKjRDN1CnK5f_Q-sq` zRA(Isq0nV?VcB0YD+^|gO5K+qo4;Ml!8YSQHX{mGOuJ`CWc#Csyv%$40>x;{j zmEn+HGM&rq(O$FMDyMj`p1a6;*0Zds)>7IU zau+6-G|Wcxc9wmEU)YQ(w^nD{%Hz>O$GEW2o@JJ2J-4R99_=P9mC^4yQ>#s9?XpvK zO){Y%IGVGab+c-hO`mUH62H=6VO~cW3*z%@F|X_R4IX94;?${*jCCyGvW_dbs^i1BrsFAm zM8`+*F&!Tl^9eky!<1ml609UoE2!vLg{|W{)^t?G)WkTF^XNP7BlS%Mq;!-2HWu^IbCH1w$B*uABWm!N~HEdQ6{1V?C3!3NfS9XrLcOyD%g%N z%KOqWXgJQllq?Tk$cFe_zzNz1`SwqaXZd@fa3a46Z6I|U!*3#S?M)=FZ6dWdeFvF= z)E#8+pl1`ke=iKA-azh8=o?7=1$qLf(}g?eA57o6jo!i_z3=%Wqa|^Y_FiOYpQc@A z24#*}IE@O5Trv;w%cDrsUVwpz`72M4@Vcm}r+4#fLOn^=DdP6vJqqz&jt(I4ABIe2 z@mLn`OA_)HMw5!z=~!aB{tv{~NUX*zToS7@L65{5Z%gdV|4wXt3$e2yv462@J*>f8 z;lzVuo7g>&j%yh^(Qa8fY*{*JSw^)i6SOQ7)3S9+;s)jN4B0%3GrWyoz;lY(dDYUn zR?Fsa4(AoKIlLc_tCr0{nwOLmmE_Wl5Hv3XY2KhTFORfp-b5CY9WUMnris+=#46cmI0n4Z5jxQdoxl_Lfcl=G zS}qWwu}br_vKS5Z4x|fz#-86t0^U*qbp=j`0W~~{g%CVNhLTEO;TqA$D{o+r&<}Ew zf3U#gGKW`HnEmR#ua#FHF0yC*-vF2J!7!kq-h*s%QF^b%WRt>&uo!|*hT!Dhy?207 O@B>|d33JuXQ~xglI=7Vo literal 4328 zcmb7GYj+e`72P-eN;;JRB4H9E5tu=`3x=A(@iAsZNkT9h0-6BM_@Yu>Ns4q=wbj*R z@HryPLww+i<#PGO$k;(;?f#KBrk0-x5aFUc|*({G2apMT`}Ji z^L;Tt5TgSz7JWCe z8lLYup}iJakym$JKk}kG)(Rgl>c{E1h3a(%mr}+@j~4v+Sm4xxO2&-?5sZyJoLiGj_{!mVno9LURg*X0Rp6jVwpDvw7KWY7#p6cNC^79TJ|u7FY|yHxjN%W)tuEy@Yoa zX3{Ec1!28r-4HvSBHX5eR>O`qteJY?Y+emo$s7d@QkYBudSfZ%ngK;Sk@Cq1TEb6C zc)*NXZWPP7qRX4F=vs}q4KHe4)RM0R3YWSPBz2HVTMMzr1;=rlQ4nS(bJ1@%=Bc&6 zK3#pC%7?DwdbdUGlO5Uii>WYF^9YK(z*qQaR%$&{C>&gOqbqA`Zs^uxc2uQOWs%FZ z(B9e^%2(#3CyRC?XiMXa5Y?*#A#8LRU0RJ+?DZwP!A?C~sV?5KZ`)Sg_SdcDD3q)e zhUvyic`?Q3>9l)QWauA*bPHTry`^w;4`_E`sX@!xu)}q-IFarrFLE2!0*!9p={eE4 zxZ{2NeZ0kasNLdPmG#ACN@X}?IJSSSJ33_7I&z8!^*q3==R?<>?JT7OY^FHOGP}X8 z#Xh@7hUwEqh;rSx@>a-HR)VFO6@~dUZ+|ti_=Uxo4H`|Btu~z&I>UuRhpt_l4}*pd zd$OOf?2M7XpWSHto7en$U^5do1V_uBf7`BmH9KM*ih;kVzZKifc%&S+&^*@$8?k4P zIxAgc-~@hZ;24gV@G}EH$1h5FXyBLlm4R7Tx z-C(&=_wk9#E4%&PSiPG>EDd+`-D^W!_M8|B&+g2a+Hn;ocH?`NiNdkn-}bIMg=)I~ znFP3oSncs05^j9<#HlX1+%E<_zZKcO!=xwE+gP$I(vN$?L@Gx2W4u*em6J!hv%CLt zZ5{3Iw~^vIC83#X10$Z&jS)i2SSa&*YTybQ)(cpr3?Lp14DJfnx=n<>)BX{|G9SV3qJ< zPUSczgkQ=eT>9XIJrdp|;W{VwIaBbSgwK6&!XNJvemNohn28NC3DZ1%rn-$mbF7d^ zT!?(>{>{m+o%nto&yqeIDSfM-vOtC2@HQ@!}TOr*+vqHA!B-813#i;gv z6J^|`!1vgI_ch&P>>5Vt(4EqRxcTC+uKs`~RD}8u#&ewevpAnH_&k3FJCOggSlxT{ zM0;GQdWEV4i9T_@$(u zN_xW?N$1=kMsd1Y+dg>8~+D|bTYI6 diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.java b/src/api/java/ic2/api/energy/prefab/BasicSource.java index 9efba8de7..dde127fa6 100644 --- a/src/api/java/ic2/api/energy/prefab/BasicSource.java +++ b/src/api/java/ic2/api/energy/prefab/BasicSource.java @@ -95,6 +95,8 @@ public class BasicSource extends BasicEnergyTile implements IEnergySource { public BasicSource(TileEntity parent, double capacity, int tier) { super(parent, capacity); + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + this.tier = tier; double power = EnergyNet.instance.getPowerFromTier(tier); @@ -104,6 +106,8 @@ public class BasicSource extends BasicEnergyTile implements IEnergySource { public BasicSource(ILocatable parent, double capacity, int tier) { super(parent, capacity); + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + this.tier = tier; double power = EnergyNet.instance.getPowerFromTier(tier); @@ -113,6 +117,8 @@ public class BasicSource extends BasicEnergyTile implements IEnergySource { public BasicSource(World world, BlockPos pos, double capacity, int tier) { super(world, pos, capacity); + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + this.tier = tier; double power = EnergyNet.instance.getPowerFromTier(tier); @@ -125,6 +131,8 @@ public class BasicSource extends BasicEnergyTile implements IEnergySource { * @param tier1 IC2 Tier. */ public void setSourceTier(int tier) { + if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); + double power = EnergyNet.instance.getPowerFromTier(tier); if (getCapacity() < power) setCapacity(power); diff --git a/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java b/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java index 74fd2764c..e0ae676c7 100644 --- a/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java +++ b/src/main/java/mekanism/common/base/IAdvancedBoundingBlock.java @@ -5,8 +5,8 @@ import mekanism.api.IConfigCardAccess.ISpecialConfigData; import mekanism.api.energy.IStrictEnergyAcceptor; import mekanism.api.energy.IStrictEnergyStorage; import mekanism.common.integration.computer.IComputerIntegration; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.security.ISecurityTile; -import net.minecraft.block.Block; import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; @@ -18,7 +18,7 @@ import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; @InterfaceList({ - @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"), + @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = IC2Integration.MODID), }) public interface IAdvancedBoundingBlock extends ICapabilityProvider, IBoundingBlock, ISidedInventory, IEnergySink, IStrictEnergyAcceptor, IStrictEnergyStorage, IEnergyReceiver, IEnergyProvider, IComputerIntegration, ISpecialConfigData, ISecurityTile { diff --git a/src/main/java/mekanism/common/base/IEnergyWrapper.java b/src/main/java/mekanism/common/base/IEnergyWrapper.java index f73b72c5d..85b24dad9 100644 --- a/src/main/java/mekanism/common/base/IEnergyWrapper.java +++ b/src/main/java/mekanism/common/base/IEnergyWrapper.java @@ -3,12 +3,10 @@ package mekanism.common.base; import ic2.api.energy.tile.IEnergySink; import ic2.api.energy.tile.IEnergySource; import ic2.api.tile.IEnergyStorage; - -import java.util.EnumSet; - import mekanism.api.energy.IStrictEnergyAcceptor; import mekanism.api.energy.IStrictEnergyOutputter; import mekanism.api.energy.IStrictEnergyStorage; +import mekanism.common.integration.ic2.IC2Integration; import net.minecraft.inventory.IInventory; import net.minecraft.util.EnumFacing; import net.minecraftforge.fml.common.Optional.Interface; @@ -17,10 +15,10 @@ import cofh.api.energy.IEnergyProvider; import cofh.api.energy.IEnergyReceiver; @InterfaceList({ - @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"), - @Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = "IC2"), - @Interface(iface = "ic2.api.energy.tile.IEnergyEmitter", modid = "IC2"), - @Interface(iface = "ic2.api.tile.IEnergyStorage", modid = "IC2") + @Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = IC2Integration.MODID), + @Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = IC2Integration.MODID), + @Interface(iface = "ic2.api.energy.tile.IEnergyEmitter", modid = IC2Integration.MODID), + @Interface(iface = "ic2.api.tile.IEnergyStorage", modid = IC2Integration.MODID) }) public interface IEnergyWrapper extends IStrictEnergyStorage, IEnergyReceiver, IEnergyProvider, IEnergySink, IEnergySource, IEnergyStorage, IStrictEnergyAcceptor, IStrictEnergyOutputter, IInventory { diff --git a/src/main/java/mekanism/common/integration/MekanismHooks.java b/src/main/java/mekanism/common/integration/MekanismHooks.java index 1db17a590..d1b3c2195 100644 --- a/src/main/java/mekanism/common/integration/MekanismHooks.java +++ b/src/main/java/mekanism/common/integration/MekanismHooks.java @@ -16,6 +16,7 @@ import mekanism.common.Resource; import mekanism.common.block.states.BlockStateTransmitter.TransmitterType; import mekanism.common.integration.computer.CCPeripheral; import mekanism.common.integration.computer.OCDriver; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.integration.storagedrawer.StorageDrawerRecipeHandler; import mekanism.common.recipe.RecipeHandler; import mekanism.common.util.MekanismUtils; @@ -48,10 +49,10 @@ public final class MekanismHooks public void hook() { - if(Loader.isModLoaded("CoFHCore")) CoFHCoreLoaded = true; - if(Loader.isModLoaded("IC2")) IC2Loaded = true; - if(Loader.isModLoaded("Railcraft")) RailcraftLoaded = true; - if(Loader.isModLoaded("ThermalExpansion")) TELoaded = true; + if(Loader.isModLoaded("cofhcore")) CoFHCoreLoaded = true; + if(Loader.isModLoaded("ic2")) IC2Loaded = true; + if(Loader.isModLoaded("railcraft")) RailcraftLoaded = true; + if(Loader.isModLoaded("thermalexpansion")) TELoaded = true; if(Loader.isModLoaded("ComputerCraft")) CCLoaded = true; if(Loader.isModLoaded("appliedenergistics2")) AE2Loaded = true; if(Loader.isModLoaded("tesla")) TeslaLoaded = true; @@ -86,7 +87,7 @@ public final class MekanismHooks } } - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public void hookIC2Recipes() { for(MachineRecipe> entry : Recipes.macerator.getRecipes()) @@ -140,7 +141,7 @@ public final class MekanismHooks } catch(Exception e) {} } - @Method(modid = "OpenComputers") + @Method(modid = "opencomputers") public void loadOCDrivers() { try { diff --git a/src/main/java/mekanism/common/integration/OreDictManager.java b/src/main/java/mekanism/common/integration/OreDictManager.java index a8f61e805..3119d3562 100644 --- a/src/main/java/mekanism/common/integration/OreDictManager.java +++ b/src/main/java/mekanism/common/integration/OreDictManager.java @@ -2,7 +2,6 @@ package mekanism.common.integration; import ic2.api.recipe.Recipes; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -14,6 +13,7 @@ import mekanism.common.Mekanism; import mekanism.common.MekanismFluids; import mekanism.common.MekanismItems; import mekanism.common.Resource; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.recipe.RecipeHandler; import mekanism.common.recipe.RecipeHandler.Recipe; import mekanism.common.util.MekanismUtils; @@ -25,7 +25,6 @@ import net.minecraft.init.Items; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraftforge.fml.common.Optional.Method; import net.minecraftforge.oredict.OreDictionary; @@ -288,7 +287,7 @@ public final class OreDictManager } catch(Exception e) {} } - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public static void addIC2BronzeRecipe() { try { diff --git a/src/main/java/mekanism/common/integration/ic2/IC2Integration.java b/src/main/java/mekanism/common/integration/ic2/IC2Integration.java index a0146caac..f354ef1be 100644 --- a/src/main/java/mekanism/common/integration/ic2/IC2Integration.java +++ b/src/main/java/mekanism/common/integration/ic2/IC2Integration.java @@ -12,7 +12,9 @@ import net.minecraftforge.fml.common.Optional.Method; public class IC2Integration { - @Method(modid = "IC2") + public static final String MODID = "ic2"; + + @Method(modid = IC2Integration.MODID) public static boolean isOutputter(TileEntity tileEntity, EnumFacing side) { IEnergyTile tile = EnergyNet.instance.getSubTile(tileEntity.getWorld(), tileEntity.getPos()); @@ -25,7 +27,7 @@ public class IC2Integration return false; } - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public static boolean isAcceptor(TileEntity orig, TileEntity tileEntity, EnumFacing side) { IEnergyTile tile = EnergyNet.instance.getSubTile(tileEntity.getWorld(), tileEntity.getPos()); @@ -41,7 +43,7 @@ public class IC2Integration return false; } - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public static double emitEnergy(IEnergyWrapper from, TileEntity tileEntity, EnumFacing side, double currentSending) { IEnergyTile tile = EnergyNet.instance.getSubTile(tileEntity.getWorld(), tileEntity.getPos()); diff --git a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java index 2fe310258..9ad6a41a6 100644 --- a/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java +++ b/src/main/java/mekanism/common/item/ItemBlockEnergyCube.java @@ -24,6 +24,7 @@ import mekanism.common.base.ITierItem; import mekanism.common.capabilities.ItemCapabilityWrapper; import mekanism.common.config.MekanismConfig.general; import mekanism.common.integration.forgeenergy.ForgeEnergyItemWrapper; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.integration.ic2.IC2ItemManager; import mekanism.common.integration.tesla.TeslaItemWrapper; import mekanism.common.network.PacketTileEntity.TileEntityMessage; @@ -56,7 +57,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ - @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") + @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = IC2Integration.MODID) }) public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, ISpecialElectricItem, ISustainedInventory, IEnergyContainerItem, ISecurityItem, ITierItem { @@ -324,7 +325,7 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IS } @Override - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public IElectricItemManager getManager(ItemStack itemStack) { return IC2ItemManager.getManager(this); diff --git a/src/main/java/mekanism/common/item/ItemBlockMachine.java b/src/main/java/mekanism/common/item/ItemBlockMachine.java index 3cf75f52e..27ae43d59 100644 --- a/src/main/java/mekanism/common/item/ItemBlockMachine.java +++ b/src/main/java/mekanism/common/item/ItemBlockMachine.java @@ -17,7 +17,6 @@ import mekanism.client.MekKeyHandler; import mekanism.client.MekanismClient; import mekanism.client.MekanismKeyHandler; import mekanism.common.Mekanism; -import mekanism.common.Tier; import mekanism.common.Tier.BaseTier; import mekanism.common.Tier.FluidTankTier; import mekanism.common.Upgrade; @@ -37,10 +36,10 @@ import mekanism.common.block.states.BlockStateMachine.MachineType; import mekanism.common.capabilities.ItemCapabilityWrapper; import mekanism.common.config.MekanismConfig.general; import mekanism.common.integration.forgeenergy.ForgeEnergyItemWrapper; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.integration.ic2.IC2ItemManager; import mekanism.common.integration.tesla.TeslaItemWrapper; import mekanism.common.inventory.InventoryPersonalChest; -import mekanism.common.item.ItemConfigurator.ConfiguratorMode; import mekanism.common.network.PacketTileEntity.TileEntityMessage; import mekanism.common.security.ISecurityItem; import mekanism.common.security.ISecurityTile; @@ -134,7 +133,7 @@ import cofh.api.energy.IEnergyContainerItem; * */ @InterfaceList({ - @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") + @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = IC2Integration.MODID) }) public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpecialElectricItem, IFactory, ISustainedInventory, ISustainedTank, IEnergyContainerItem, IFluidItemWrapper, ITierItem, ISecurityItem, IItemNetwork { @@ -780,7 +779,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec } @Override - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public IElectricItemManager getManager(ItemStack itemStack) { return IC2ItemManager.getManager(this); diff --git a/src/main/java/mekanism/common/item/ItemEnergized.java b/src/main/java/mekanism/common/item/ItemEnergized.java index 301eba34c..6b6614c9b 100644 --- a/src/main/java/mekanism/common/item/ItemEnergized.java +++ b/src/main/java/mekanism/common/item/ItemEnergized.java @@ -11,6 +11,7 @@ import mekanism.common.Mekanism; import mekanism.common.capabilities.ItemCapabilityWrapper; import mekanism.common.config.MekanismConfig.general; import mekanism.common.integration.forgeenergy.ForgeEnergyItemWrapper; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.integration.ic2.IC2ItemManager; import mekanism.common.integration.tesla.TeslaItemWrapper; import mekanism.common.util.ItemDataUtils; @@ -30,7 +31,7 @@ import net.minecraftforge.fml.common.Optional.Method; import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ - @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") + @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = IC2Integration.MODID) }) public class ItemEnergized extends ItemMekanism implements IEnergizedItem, ISpecialElectricItem, IEnergyContainerItem { @@ -171,7 +172,7 @@ public class ItemEnergized extends ItemMekanism implements IEnergizedItem, ISpec } @Override - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public IElectricItemManager getManager(ItemStack itemStack) { return IC2ItemManager.getManager(this); diff --git a/src/main/java/mekanism/common/item/ItemFreeRunners.java b/src/main/java/mekanism/common/item/ItemFreeRunners.java index 26d25f2da..4d6045ef9 100644 --- a/src/main/java/mekanism/common/item/ItemFreeRunners.java +++ b/src/main/java/mekanism/common/item/ItemFreeRunners.java @@ -13,6 +13,7 @@ import mekanism.common.Mekanism; import mekanism.common.capabilities.ItemCapabilityWrapper; import mekanism.common.config.MekanismConfig.general; import mekanism.common.integration.forgeenergy.ForgeEnergyItemWrapper; +import mekanism.common.integration.ic2.IC2Integration; import mekanism.common.integration.ic2.IC2ItemManager; import mekanism.common.integration.tesla.TeslaItemWrapper; import mekanism.common.util.ItemDataUtils; @@ -44,7 +45,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; import cofh.api.energy.IEnergyContainerItem; @InterfaceList({ - @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = "IC2") + @Interface(iface = "ic2.api.item.ISpecialElectricItem", modid = IC2Integration.MODID) }) public class ItemFreeRunners extends ItemArmor implements IEnergizedItem, ISpecialElectricItem, IEnergyContainerItem { @@ -206,7 +207,7 @@ public class ItemFreeRunners extends ItemArmor implements IEnergizedItem, ISpeci } @Override - @Method(modid = "IC2") + @Method(modid = IC2Integration.MODID) public IElectricItemManager getManager(ItemStack itemStack) { return IC2ItemManager.getManager(this); diff --git a/src/main/java/mekanism/common/network/PacketTransmitterUpdate.java b/src/main/java/mekanism/common/network/PacketTransmitterUpdate.java index ca59d63eb..331bc0b92 100644 --- a/src/main/java/mekanism/common/network/PacketTransmitterUpdate.java +++ b/src/main/java/mekanism/common/network/PacketTransmitterUpdate.java @@ -39,6 +39,11 @@ public class PacketTransmitterUpdate implements IMessageHandler Date: Tue, 1 Aug 2017 09:41:48 -0700 Subject: [PATCH 11/17] Fixed Formulaic Assemblicator bucket issue, attempt to maven-ize IC2 --- build.gradle | 26 +- build.properties | 3 +- src/api/java/ic2/api/crops/BaseSeed.class | Bin 861 -> 0 bytes src/api/java/ic2/api/crops/BaseSeed.java | 57 -- src/api/java/ic2/api/crops/CropCard.class | Bin 5062 -> 0 bytes src/api/java/ic2/api/crops/CropCard.java | 383 -------- .../java/ic2/api/crops/CropProperties.class | Bin 1233 -> 0 bytes .../java/ic2/api/crops/CropProperties.java | 78 -- src/api/java/ic2/api/crops/CropSoilType.class | Bin 1832 -> 0 bytes src/api/java/ic2/api/crops/CropSoilType.java | 42 - src/api/java/ic2/api/crops/Crops.class | Bin 1187 -> 0 bytes src/api/java/ic2/api/crops/Crops.java | 113 --- .../java/ic2/api/crops/ExampleCropCard.class | Bin 1950 -> 0 bytes .../java/ic2/api/crops/ExampleCropCard.java | 53 -- src/api/java/ic2/api/crops/ICropSeed.class | Bin 669 -> 0 bytes src/api/java/ic2/api/crops/ICropSeed.java | 81 -- src/api/java/ic2/api/crops/ICropTile.class | Bin 1553 -> 0 bytes src/api/java/ic2/api/crops/ICropTile.java | 284 ------ src/api/java/ic2/api/energy/EnergyNet.class | Bin 331 -> 0 bytes src/api/java/ic2/api/energy/EnergyNet.java | 18 - src/api/java/ic2/api/energy/IEnergyNet.class | Bin 1172 -> 0 bytes src/api/java/ic2/api/energy/IEnergyNet.java | 90 -- .../api/energy/IEnergyNetEventReceiver.class | Bin 216 -> 0 bytes .../api/energy/IEnergyNetEventReceiver.java | 20 - src/api/java/ic2/api/energy/NodeStats.class | Bin 675 -> 0 bytes src/api/java/ic2/api/energy/NodeStats.java | 25 - .../api/energy/event/EnergyTileEvent.class | Bin 923 -> 0 bytes .../ic2/api/energy/event/EnergyTileEvent.java | 24 - .../energy/event/EnergyTileLoadEvent.class | Bin 442 -> 0 bytes .../api/energy/event/EnergyTileLoadEvent.java | 26 - .../energy/event/EnergyTileUnloadEvent.class | Bin 448 -> 0 bytes .../energy/event/EnergyTileUnloadEvent.java | 27 - .../energy/prefab/BasicEnergyTe$Sink.class | Bin 702 -> 0 bytes .../energy/prefab/BasicEnergyTe$Source.class | Bin 712 -> 0 bytes .../ic2/api/energy/prefab/BasicEnergyTe.class | Bin 1711 -> 0 bytes .../ic2/api/energy/prefab/BasicEnergyTe.java | 104 --- .../api/energy/prefab/BasicEnergyTile.class | Bin 5890 -> 0 bytes .../api/energy/prefab/BasicEnergyTile.java | 309 ------- .../ic2/api/energy/prefab/BasicSink.class | Bin 4523 -> 0 bytes .../java/ic2/api/energy/prefab/BasicSink.java | 163 ---- .../api/energy/prefab/BasicSinkSource.class | Bin 5379 -> 0 bytes .../api/energy/prefab/BasicSinkSource.java | 127 --- .../ic2/api/energy/prefab/BasicSource.class | Bin 4746 -> 0 bytes .../ic2/api/energy/prefab/BasicSource.java | 173 ---- .../ic2/api/energy/tile/IChargingSlot.class | Bin 151 -> 0 bytes .../ic2/api/energy/tile/IChargingSlot.java | 16 - .../api/energy/tile/IColoredEnergyTile.class | Bin 264 -> 0 bytes .../api/energy/tile/IColoredEnergyTile.java | 21 - .../api/energy/tile/IDischargingSlot.class | Bin 161 -> 0 bytes .../ic2/api/energy/tile/IDischargingSlot.java | 17 - .../ic2/api/energy/tile/IEnergyAcceptor.class | Bin 271 -> 0 bytes .../ic2/api/energy/tile/IEnergyAcceptor.java | 25 - .../api/energy/tile/IEnergyConductor.class | Bin 428 -> 0 bytes .../ic2/api/energy/tile/IEnergyConductor.java | 53 -- .../ic2/api/energy/tile/IEnergyEmitter.class | Bin 266 -> 0 bytes .../ic2/api/energy/tile/IEnergyEmitter.java | 26 - .../ic2/api/energy/tile/IEnergySink.class | Bin 290 -> 0 bytes .../java/ic2/api/energy/tile/IEnergySink.java | 45 - .../ic2/api/energy/tile/IEnergySource.class | Bin 260 -> 0 bytes .../ic2/api/energy/tile/IEnergySource.java | 40 - .../ic2/api/energy/tile/IEnergyTile.class | Bin 123 -> 0 bytes .../java/ic2/api/energy/tile/IEnergyTile.java | 15 - .../energy/tile/IExplosionPowerOverride.class | Bin 213 -> 0 bytes .../energy/tile/IExplosionPowerOverride.java | 25 - .../ic2/api/energy/tile/IHeatSource.class | Bin 249 -> 0 bytes .../java/ic2/api/energy/tile/IHeatSource.java | 23 - .../ic2/api/energy/tile/IKineticSource.class | Bin 273 -> 0 bytes .../ic2/api/energy/tile/IKineticSource.java | 22 - .../ic2/api/energy/tile/IMetaDelegate.class | Bin 285 -> 0 bytes .../ic2/api/energy/tile/IMetaDelegate.java | 34 - .../api/energy/tile/IMultiEnergySource.class | Bin 266 -> 0 bytes .../api/energy/tile/IMultiEnergySource.java | 24 - .../api/energy/tile/IOverloadHandler.class | Bin 161 -> 0 bytes .../ic2/api/energy/tile/IOverloadHandler.java | 17 - src/api/java/ic2/api/energy/usage.txt | 148 --- .../java/ic2/api/event/ExplosionEvent.class | Bin 1038 -> 0 bytes .../java/ic2/api/event/ExplosionEvent.java | 40 - .../event/LaserEvent$LaserExplodesEvent.class | Bin 1120 -> 0 bytes .../LaserEvent$LaserHitsBlockEvent.class | Bin 1264 -> 0 bytes .../LaserEvent$LaserHitsEntityEvent.class | Bin 975 -> 0 bytes .../event/LaserEvent$LaserShootEvent.class | Bin 994 -> 0 bytes src/api/java/ic2/api/event/LaserEvent.class | Bin 1347 -> 0 bytes src/api/java/ic2/api/event/LaserEvent.java | 118 --- .../java/ic2/api/event/RetextureEvent.class | Bin 2143 -> 0 bytes .../java/ic2/api/event/RetextureEvent.java | 54 -- .../ic2/api/event/TeBlockFinalCallEvent.class | Bin 348 -> 0 bytes .../ic2/api/event/TeBlockFinalCallEvent.java | 20 - src/api/java/ic2/api/info/IInfoProvider.class | Bin 241 -> 0 bytes src/api/java/ic2/api/info/IInfoProvider.java | 27 - src/api/java/ic2/api/info/ILocatable.class | Bin 229 -> 0 bytes src/api/java/ic2/api/info/ILocatable.java | 24 - src/api/java/ic2/api/info/ITeBlock.class | Bin 110 -> 0 bytes src/api/java/ic2/api/info/ITeBlock.java | 317 ------- src/api/java/ic2/api/info/Info.class | Bin 1325 -> 0 bytes src/api/java/ic2/api/info/Info.java | 39 - src/api/java/ic2/api/item/ElectricItem.class | Bin 1369 -> 0 bytes src/api/java/ic2/api/item/ElectricItem.java | 59 -- src/api/java/ic2/api/item/HudMode.class | Bin 1904 -> 0 bytes src/api/java/ic2/api/item/HudMode.java | 37 - .../api/item/IBackupElectricItemManager.class | Bin 241 -> 0 bytes .../api/item/IBackupElectricItemManager.java | 12 - .../ic2/api/item/IBlockCuttingBlade.class | Bin 188 -> 0 bytes .../java/ic2/api/item/IBlockCuttingBlade.java | 7 - src/api/java/ic2/api/item/IBoxable.class | Bin 177 -> 0 bytes src/api/java/ic2/api/item/IBoxable.java | 14 - src/api/java/ic2/api/item/IC2Items.class | Bin 1727 -> 0 bytes src/api/java/ic2/api/item/IC2Items.java | 865 ------------------ .../java/ic2/api/item/ICustomDamageItem.class | Bin 386 -> 0 bytes .../java/ic2/api/item/ICustomDamageItem.java | 56 -- src/api/java/ic2/api/item/IDebuggable.class | Bin 191 -> 0 bytes src/api/java/ic2/api/item/IDebuggable.java | 22 - src/api/java/ic2/api/item/IElectricItem.class | Bin 323 -> 0 bytes src/api/java/ic2/api/item/IElectricItem.java | 42 - .../ic2/api/item/IElectricItemManager.class | Bin 704 -> 0 bytes .../ic2/api/item/IElectricItemManager.java | 126 --- src/api/java/ic2/api/item/IItemAPI.class | Bin 443 -> 0 bytes src/api/java/ic2/api/item/IItemAPI.java | 55 -- src/api/java/ic2/api/item/IItemHudInfo.class | Bin 283 -> 0 bytes src/api/java/ic2/api/item/IItemHudInfo.java | 33 - ...IItemHudProvider$IItemHudBarProvider.class | Bin 294 -> 0 bytes .../java/ic2/api/item/IItemHudProvider.class | Bin 373 -> 0 bytes .../java/ic2/api/item/IItemHudProvider.java | 46 - .../api/item/IKineticRotor$GearboxType.class | Bin 1125 -> 0 bytes src/api/java/ic2/api/item/IKineticRotor.class | Bin 590 -> 0 bytes src/api/java/ic2/api/item/IKineticRotor.java | 23 - src/api/java/ic2/api/item/IMetalArmor.class | Bin 217 -> 0 bytes src/api/java/ic2/api/item/IMetalArmor.java | 20 - .../ic2/api/item/ISpecialElectricItem.class | Bin 225 -> 0 bytes .../ic2/api/item/ISpecialElectricItem.java | 13 - .../ic2/api/item/ITeBlockSpecialItem.class | Bin 325 -> 0 bytes .../ic2/api/item/ITeBlockSpecialItem.java | 35 - .../java/ic2/api/item/ITerraformingBP.class | Bin 512 -> 0 bytes .../java/ic2/api/item/ITerraformingBP.java | 42 - src/api/java/ic2/api/item/ItemWrapper.class | Bin 2403 -> 0 bytes src/api/java/ic2/api/item/ItemWrapper.java | 50 - .../ic2/api/network/ClientModifiable.class | Bin 400 -> 0 bytes .../ic2/api/network/ClientModifiable.java | 10 - .../java/ic2/api/network/IGrowingBuffer.class | Bin 322 -> 0 bytes .../java/ic2/api/network/IGrowingBuffer.java | 36 - ...NetworkClientTileEntityEventListener.class | Bin 245 -> 0 bytes ...INetworkClientTileEntityEventListener.java | 17 - .../api/network/INetworkCustomEncoder.class | Bin 371 -> 0 bytes .../api/network/INetworkCustomEncoder.java | 36 - .../api/network/INetworkDataProvider.class | Bin 248 -> 0 bytes .../ic2/api/network/INetworkDataProvider.java | 21 - .../network/INetworkItemEventListener.class | Bin 251 -> 0 bytes .../network/INetworkItemEventListener.java | 19 - .../ic2/api/network/INetworkManager.class | Bin 631 -> 0 bytes .../java/ic2/api/network/INetworkManager.java | 30 - .../INetworkTileEntityEventListener.class | Bin 191 -> 0 bytes .../INetworkTileEntityEventListener.java | 14 - .../api/network/INetworkUpdateListener.class | Bin 191 -> 0 bytes .../api/network/INetworkUpdateListener.java | 14 - .../java/ic2/api/network/NetworkHelper.class | Bin 2956 -> 0 bytes .../java/ic2/api/network/NetworkHelper.java | 170 ---- .../api/reactor/IBaseReactorComponent.class | Bin 225 -> 0 bytes .../api/reactor/IBaseReactorComponent.java | 21 - src/api/java/ic2/api/reactor/IReactor.class | Bin 737 -> 0 bytes src/api/java/ic2/api/reactor/IReactor.java | 148 --- .../ic2/api/reactor/IReactorChamber.class | Bin 210 -> 0 bytes .../java/ic2/api/reactor/IReactorChamber.java | 22 - .../ic2/api/reactor/IReactorComponent.class | Bin 765 -> 0 bytes .../ic2/api/reactor/IReactorComponent.java | 98 -- .../recipe/IBasicMachineRecipeManager.class | Bin 679 -> 0 bytes .../recipe/IBasicMachineRecipeManager.java | 13 - .../ICannerBottleRecipeManager$Input.class | Bin 947 -> 0 bytes .../ICannerBottleRecipeManager$RawInput.class | Bin 636 -> 0 bytes .../recipe/ICannerBottleRecipeManager.class | Bin 1009 -> 0 bytes .../recipe/ICannerBottleRecipeManager.java | 57 -- .../ICannerEnrichRecipeManager$Input.class | Bin 1114 -> 0 bytes .../ICannerEnrichRecipeManager$RawInput.class | Bin 685 -> 0 bytes .../recipe/ICannerEnrichRecipeManager.class | Bin 939 -> 0 bytes .../recipe/ICannerEnrichRecipeManager.java | 56 -- ...tingRecipeManager$AttributeContainer.class | Bin 565 -> 0 bytes .../api/recipe/ICraftingRecipeManager.class | Bin 358 -> 0 bytes .../api/recipe/ICraftingRecipeManager.java | 45 - ...yzerRecipeManager$ElectrolyzerOutput.class | Bin 1626 -> 0 bytes ...yzerRecipeManager$ElectrolyzerRecipe.class | Bin 2231 -> 0 bytes .../recipe/IElectrolyzerRecipeManager.class | Bin 1148 -> 0 bytes .../recipe/IElectrolyzerRecipeManager.java | 120 --- ...tyFluidContainerRecipeManager$Output.class | Bin 918 -> 0 bytes .../IEmptyFluidContainerRecipeManager.class | Bin 908 -> 0 bytes .../IEmptyFluidContainerRecipeManager.java | 25 - ...erRecipeManager$FermentationProperty.class | Bin 1104 -> 0 bytes .../api/recipe/IFermenterRecipeManager.class | Bin 765 -> 0 bytes .../api/recipe/IFermenterRecipeManager.java | 64 -- ...illFluidContainerRecipeManager$Input.class | Bin 701 -> 0 bytes .../IFillFluidContainerRecipeManager.class | Bin 931 -> 0 bytes .../IFillFluidContainerRecipeManager.java | 24 - .../IFluidHeatManager$BurnProperty.class | Bin 540 -> 0 bytes .../ic2/api/recipe/IFluidHeatManager.class | Bin 581 -> 0 bytes .../ic2/api/recipe/IFluidHeatManager.java | 32 - .../ic2/api/recipe/ILiquidAcceptManager.class | Bin 321 -> 0 bytes .../ic2/api/recipe/ILiquidAcceptManager.java | 10 - ...xchangerManager$HeatExchangeProperty.class | Bin 662 -> 0 bytes .../recipe/ILiquidHeatExchangerManager.class | Bin 780 -> 0 bytes .../recipe/ILiquidHeatExchangerManager.java | 39 - .../ic2/api/recipe/IListRecipeManager.class | Bin 479 -> 0 bytes .../ic2/api/recipe/IListRecipeManager.java | 41 - .../api/recipe/IMachineRecipeManager.class | Bin 688 -> 0 bytes .../ic2/api/recipe/IMachineRecipeManager.java | 56 -- .../java/ic2/api/recipe/IPatternStorage.class | Bin 299 -> 0 bytes .../java/ic2/api/recipe/IPatternStorage.java | 11 - .../java/ic2/api/recipe/IRecipeInput.class | Bin 314 -> 0 bytes src/api/java/ic2/api/recipe/IRecipeInput.java | 36 - .../ic2/api/recipe/IRecipeInputFactory.class | Bin 905 -> 0 bytes .../ic2/api/recipe/IRecipeInputFactory.java | 17 - .../ic2/api/recipe/IScrapboxManager.class | Bin 444 -> 0 bytes .../java/ic2/api/recipe/IScrapboxManager.java | 13 - .../ISemiFluidFuelManager$BurnProperty.class | Bin 543 -> 0 bytes .../api/recipe/ISemiFluidFuelManager.class | Bin 601 -> 0 bytes .../ic2/api/recipe/ISemiFluidFuelManager.java | 32 - .../java/ic2/api/recipe/MachineRecipe.class | Bin 1792 -> 0 bytes .../java/ic2/api/recipe/MachineRecipe.java | 35 - .../ic2/api/recipe/MachineRecipeResult.class | Bin 1336 -> 0 bytes .../ic2/api/recipe/MachineRecipeResult.java | 23 - .../java/ic2/api/recipe/RecipeOutput.class | Bin 2683 -> 0 bytes src/api/java/ic2/api/recipe/RecipeOutput.java | 54 -- src/api/java/ic2/api/recipe/Recipes.class | Bin 1903 -> 0 bytes src/api/java/ic2/api/recipe/Recipes.java | 190 ---- .../ic2/api/tile/ExplosionWhitelist.class | Bin 1086 -> 0 bytes .../java/ic2/api/tile/ExplosionWhitelist.java | 48 - .../java/ic2/api/tile/IEnergyStorage.class | Bin 358 -> 0 bytes src/api/java/ic2/api/tile/IEnergyStorage.java | 61 -- .../java/ic2/api/tile/IRotorProvider.class | Bin 310 -> 0 bytes src/api/java/ic2/api/tile/IRotorProvider.java | 33 - src/api/java/ic2/api/tile/IWrenchable.class | Bin 1007 -> 0 bytes src/api/java/ic2/api/tile/IWrenchable.java | 67 -- .../tile/RotorRegistry$IRotorRegistry.class | Bin 389 -> 0 bytes src/api/java/ic2/api/tile/RotorRegistry.class | Bin 1756 -> 0 bytes src/api/java/ic2/api/tile/RotorRegistry.java | 45 - .../api/upgrade/IAugmentationUpgrade.class | Bin 269 -> 0 bytes .../ic2/api/upgrade/IAugmentationUpgrade.java | 20 - .../api/upgrade/IEnergyStorageUpgrade.class | Bin 384 -> 0 bytes .../api/upgrade/IEnergyStorageUpgrade.java | 30 - .../api/upgrade/IFluidConsumingUpgrade.class | Bin 177 -> 0 bytes .../api/upgrade/IFluidConsumingUpgrade.java | 10 - .../api/upgrade/IFluidProducingUpgrade.class | Bin 177 -> 0 bytes .../api/upgrade/IFluidProducingUpgrade.java | 10 - .../java/ic2/api/upgrade/IFullUpgrade.class | Bin 526 -> 0 bytes .../java/ic2/api/upgrade/IFullUpgrade.java | 12 - .../api/upgrade/IItemConsumingUpgrade.class | Bin 175 -> 0 bytes .../api/upgrade/IItemConsumingUpgrade.java | 10 - .../api/upgrade/IItemProducingUpgrade.class | Bin 175 -> 0 bytes .../api/upgrade/IItemProducingUpgrade.java | 10 - .../ic2/api/upgrade/IProcessingUpgrade.class | Bin 441 -> 0 bytes .../ic2/api/upgrade/IProcessingUpgrade.java | 50 - .../upgrade/IRedstoneSensitiveUpgrade.class | Bin 383 -> 0 bytes .../upgrade/IRedstoneSensitiveUpgrade.java | 31 - .../ic2/api/upgrade/ITransformerUpgrade.class | Bin 264 -> 0 bytes .../ic2/api/upgrade/ITransformerUpgrade.java | 20 - .../ic2/api/upgrade/IUpgradableBlock.class | Bin 314 -> 0 bytes .../ic2/api/upgrade/IUpgradableBlock.java | 29 - .../java/ic2/api/upgrade/IUpgradeItem.class | Bin 713 -> 0 bytes .../java/ic2/api/upgrade/IUpgradeItem.java | 44 - .../ic2/api/upgrade/UpgradableProperty.class | Bin 1472 -> 0 bytes .../ic2/api/upgrade/UpgradableProperty.java | 45 - .../ic2/api/upgrade/UpgradeRegistry.class | Bin 1308 -> 0 bytes .../java/ic2/api/upgrade/UpgradeRegistry.java | 38 - .../api/util/FluidContainerOutputMode.class | Bin 1381 -> 0 bytes .../api/util/FluidContainerOutputMode.java | 18 - src/api/java/ic2/api/util/IKeyboard.class | Bin 374 -> 0 bytes src/api/java/ic2/api/util/IKeyboard.java | 14 - src/api/java/ic2/api/util/Keys.class | Bin 309 -> 0 bytes src/api/java/ic2/api/util/Keys.java | 6 - .../TileEntityFormulaicAssemblicator.java | 4 +- 266 files changed, 19 insertions(+), 7258 deletions(-) delete mode 100644 src/api/java/ic2/api/crops/BaseSeed.class delete mode 100644 src/api/java/ic2/api/crops/BaseSeed.java delete mode 100644 src/api/java/ic2/api/crops/CropCard.class delete mode 100644 src/api/java/ic2/api/crops/CropCard.java delete mode 100644 src/api/java/ic2/api/crops/CropProperties.class delete mode 100644 src/api/java/ic2/api/crops/CropProperties.java delete mode 100644 src/api/java/ic2/api/crops/CropSoilType.class delete mode 100644 src/api/java/ic2/api/crops/CropSoilType.java delete mode 100644 src/api/java/ic2/api/crops/Crops.class delete mode 100644 src/api/java/ic2/api/crops/Crops.java delete mode 100644 src/api/java/ic2/api/crops/ExampleCropCard.class delete mode 100644 src/api/java/ic2/api/crops/ExampleCropCard.java delete mode 100644 src/api/java/ic2/api/crops/ICropSeed.class delete mode 100644 src/api/java/ic2/api/crops/ICropSeed.java delete mode 100644 src/api/java/ic2/api/crops/ICropTile.class delete mode 100644 src/api/java/ic2/api/crops/ICropTile.java delete mode 100644 src/api/java/ic2/api/energy/EnergyNet.class delete mode 100644 src/api/java/ic2/api/energy/EnergyNet.java delete mode 100644 src/api/java/ic2/api/energy/IEnergyNet.class delete mode 100644 src/api/java/ic2/api/energy/IEnergyNet.java delete mode 100644 src/api/java/ic2/api/energy/IEnergyNetEventReceiver.class delete mode 100644 src/api/java/ic2/api/energy/IEnergyNetEventReceiver.java delete mode 100644 src/api/java/ic2/api/energy/NodeStats.class delete mode 100644 src/api/java/ic2/api/energy/NodeStats.java delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileEvent.class delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileEvent.java delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.java delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.class delete mode 100644 src/api/java/ic2/api/energy/event/EnergyTileUnloadEvent.java delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Sink.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTe$Source.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTe.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTe.java delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTile.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSink.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSink.java delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSinkSource.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSinkSource.java delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSource.class delete mode 100644 src/api/java/ic2/api/energy/prefab/BasicSource.java delete mode 100644 src/api/java/ic2/api/energy/tile/IChargingSlot.class delete mode 100644 src/api/java/ic2/api/energy/tile/IChargingSlot.java delete mode 100644 src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class delete mode 100644 src/api/java/ic2/api/energy/tile/IColoredEnergyTile.java delete mode 100644 src/api/java/ic2/api/energy/tile/IDischargingSlot.class delete mode 100644 src/api/java/ic2/api/energy/tile/IDischargingSlot.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyAcceptor.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyConductor.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyConductor.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyEmitter.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyEmitter.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergySink.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergySink.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergySource.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergySource.java delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyTile.class delete mode 100644 src/api/java/ic2/api/energy/tile/IEnergyTile.java delete mode 100644 src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.class delete mode 100644 src/api/java/ic2/api/energy/tile/IExplosionPowerOverride.java delete mode 100644 src/api/java/ic2/api/energy/tile/IHeatSource.class delete mode 100644 src/api/java/ic2/api/energy/tile/IHeatSource.java delete mode 100644 src/api/java/ic2/api/energy/tile/IKineticSource.class delete mode 100644 src/api/java/ic2/api/energy/tile/IKineticSource.java delete mode 100644 src/api/java/ic2/api/energy/tile/IMetaDelegate.class delete mode 100644 src/api/java/ic2/api/energy/tile/IMetaDelegate.java delete mode 100644 src/api/java/ic2/api/energy/tile/IMultiEnergySource.class delete mode 100644 src/api/java/ic2/api/energy/tile/IMultiEnergySource.java delete mode 100644 src/api/java/ic2/api/energy/tile/IOverloadHandler.class delete mode 100644 src/api/java/ic2/api/energy/tile/IOverloadHandler.java delete mode 100644 src/api/java/ic2/api/energy/usage.txt delete mode 100644 src/api/java/ic2/api/event/ExplosionEvent.class delete mode 100644 src/api/java/ic2/api/event/ExplosionEvent.java delete mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class delete mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class delete mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class delete mode 100644 src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class delete mode 100644 src/api/java/ic2/api/event/LaserEvent.class delete mode 100644 src/api/java/ic2/api/event/LaserEvent.java delete mode 100644 src/api/java/ic2/api/event/RetextureEvent.class delete mode 100644 src/api/java/ic2/api/event/RetextureEvent.java delete mode 100644 src/api/java/ic2/api/event/TeBlockFinalCallEvent.class delete mode 100644 src/api/java/ic2/api/event/TeBlockFinalCallEvent.java delete mode 100644 src/api/java/ic2/api/info/IInfoProvider.class delete mode 100644 src/api/java/ic2/api/info/IInfoProvider.java delete mode 100644 src/api/java/ic2/api/info/ILocatable.class delete mode 100644 src/api/java/ic2/api/info/ILocatable.java delete mode 100644 src/api/java/ic2/api/info/ITeBlock.class delete mode 100644 src/api/java/ic2/api/info/ITeBlock.java delete mode 100644 src/api/java/ic2/api/info/Info.class delete mode 100644 src/api/java/ic2/api/info/Info.java delete mode 100644 src/api/java/ic2/api/item/ElectricItem.class delete mode 100644 src/api/java/ic2/api/item/ElectricItem.java delete mode 100644 src/api/java/ic2/api/item/HudMode.class delete mode 100644 src/api/java/ic2/api/item/HudMode.java delete mode 100644 src/api/java/ic2/api/item/IBackupElectricItemManager.class delete mode 100644 src/api/java/ic2/api/item/IBackupElectricItemManager.java delete mode 100644 src/api/java/ic2/api/item/IBlockCuttingBlade.class delete mode 100644 src/api/java/ic2/api/item/IBlockCuttingBlade.java delete mode 100644 src/api/java/ic2/api/item/IBoxable.class delete mode 100644 src/api/java/ic2/api/item/IBoxable.java delete mode 100644 src/api/java/ic2/api/item/IC2Items.class delete mode 100644 src/api/java/ic2/api/item/IC2Items.java delete mode 100644 src/api/java/ic2/api/item/ICustomDamageItem.class delete mode 100644 src/api/java/ic2/api/item/ICustomDamageItem.java delete mode 100644 src/api/java/ic2/api/item/IDebuggable.class delete mode 100644 src/api/java/ic2/api/item/IDebuggable.java delete mode 100644 src/api/java/ic2/api/item/IElectricItem.class delete mode 100644 src/api/java/ic2/api/item/IElectricItem.java delete mode 100644 src/api/java/ic2/api/item/IElectricItemManager.class delete mode 100644 src/api/java/ic2/api/item/IElectricItemManager.java delete mode 100644 src/api/java/ic2/api/item/IItemAPI.class delete mode 100644 src/api/java/ic2/api/item/IItemAPI.java delete mode 100644 src/api/java/ic2/api/item/IItemHudInfo.class delete mode 100644 src/api/java/ic2/api/item/IItemHudInfo.java delete mode 100644 src/api/java/ic2/api/item/IItemHudProvider$IItemHudBarProvider.class delete mode 100644 src/api/java/ic2/api/item/IItemHudProvider.class delete mode 100644 src/api/java/ic2/api/item/IItemHudProvider.java delete mode 100644 src/api/java/ic2/api/item/IKineticRotor$GearboxType.class delete mode 100644 src/api/java/ic2/api/item/IKineticRotor.class delete mode 100644 src/api/java/ic2/api/item/IKineticRotor.java delete mode 100644 src/api/java/ic2/api/item/IMetalArmor.class delete mode 100644 src/api/java/ic2/api/item/IMetalArmor.java delete mode 100644 src/api/java/ic2/api/item/ISpecialElectricItem.class delete mode 100644 src/api/java/ic2/api/item/ISpecialElectricItem.java delete mode 100644 src/api/java/ic2/api/item/ITeBlockSpecialItem.class delete mode 100644 src/api/java/ic2/api/item/ITeBlockSpecialItem.java delete mode 100644 src/api/java/ic2/api/item/ITerraformingBP.class delete mode 100644 src/api/java/ic2/api/item/ITerraformingBP.java delete mode 100644 src/api/java/ic2/api/item/ItemWrapper.class delete mode 100644 src/api/java/ic2/api/item/ItemWrapper.java delete mode 100644 src/api/java/ic2/api/network/ClientModifiable.class delete mode 100644 src/api/java/ic2/api/network/ClientModifiable.java delete mode 100644 src/api/java/ic2/api/network/IGrowingBuffer.class delete mode 100644 src/api/java/ic2/api/network/IGrowingBuffer.java delete mode 100644 src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.class delete mode 100644 src/api/java/ic2/api/network/INetworkClientTileEntityEventListener.java delete mode 100644 src/api/java/ic2/api/network/INetworkCustomEncoder.class delete mode 100644 src/api/java/ic2/api/network/INetworkCustomEncoder.java delete mode 100644 src/api/java/ic2/api/network/INetworkDataProvider.class delete mode 100644 src/api/java/ic2/api/network/INetworkDataProvider.java delete mode 100644 src/api/java/ic2/api/network/INetworkItemEventListener.class delete mode 100644 src/api/java/ic2/api/network/INetworkItemEventListener.java delete mode 100644 src/api/java/ic2/api/network/INetworkManager.class delete mode 100644 src/api/java/ic2/api/network/INetworkManager.java delete mode 100644 src/api/java/ic2/api/network/INetworkTileEntityEventListener.class delete mode 100644 src/api/java/ic2/api/network/INetworkTileEntityEventListener.java delete mode 100644 src/api/java/ic2/api/network/INetworkUpdateListener.class delete mode 100644 src/api/java/ic2/api/network/INetworkUpdateListener.java delete mode 100644 src/api/java/ic2/api/network/NetworkHelper.class delete mode 100644 src/api/java/ic2/api/network/NetworkHelper.java delete mode 100644 src/api/java/ic2/api/reactor/IBaseReactorComponent.class delete mode 100644 src/api/java/ic2/api/reactor/IBaseReactorComponent.java delete mode 100644 src/api/java/ic2/api/reactor/IReactor.class delete mode 100644 src/api/java/ic2/api/reactor/IReactor.java delete mode 100644 src/api/java/ic2/api/reactor/IReactorChamber.class delete mode 100644 src/api/java/ic2/api/reactor/IReactorChamber.java delete mode 100644 src/api/java/ic2/api/reactor/IReactorComponent.class delete mode 100644 src/api/java/ic2/api/reactor/IReactorComponent.java delete mode 100644 src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$RawInput.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$RawInput.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/ICraftingRecipeManager$AttributeContainer.class delete mode 100644 src/api/java/ic2/api/recipe/ICraftingRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/ICraftingRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerOutput.class delete mode 100644 src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerRecipe.class delete mode 100644 src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IEmptyFluidContainerRecipeManager$Output.class delete mode 100644 src/api/java/ic2/api/recipe/IEmptyFluidContainerRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IEmptyFluidContainerRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IFermenterRecipeManager$FermentationProperty.class delete mode 100644 src/api/java/ic2/api/recipe/IFermenterRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IFermenterRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager$Input.class delete mode 100644 src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class delete mode 100644 src/api/java/ic2/api/recipe/IFluidHeatManager.class delete mode 100644 src/api/java/ic2/api/recipe/IFluidHeatManager.java delete mode 100644 src/api/java/ic2/api/recipe/ILiquidAcceptManager.class delete mode 100644 src/api/java/ic2/api/recipe/ILiquidAcceptManager.java delete mode 100644 src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class delete mode 100644 src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class delete mode 100644 src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java delete mode 100644 src/api/java/ic2/api/recipe/IListRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IListRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IMachineRecipeManager.class delete mode 100644 src/api/java/ic2/api/recipe/IMachineRecipeManager.java delete mode 100644 src/api/java/ic2/api/recipe/IPatternStorage.class delete mode 100644 src/api/java/ic2/api/recipe/IPatternStorage.java delete mode 100644 src/api/java/ic2/api/recipe/IRecipeInput.class delete mode 100644 src/api/java/ic2/api/recipe/IRecipeInput.java delete mode 100644 src/api/java/ic2/api/recipe/IRecipeInputFactory.class delete mode 100644 src/api/java/ic2/api/recipe/IRecipeInputFactory.java delete mode 100644 src/api/java/ic2/api/recipe/IScrapboxManager.class delete mode 100644 src/api/java/ic2/api/recipe/IScrapboxManager.java delete mode 100644 src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class delete mode 100644 src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class delete mode 100644 src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java delete mode 100644 src/api/java/ic2/api/recipe/MachineRecipe.class delete mode 100644 src/api/java/ic2/api/recipe/MachineRecipe.java delete mode 100644 src/api/java/ic2/api/recipe/MachineRecipeResult.class delete mode 100644 src/api/java/ic2/api/recipe/MachineRecipeResult.java delete mode 100644 src/api/java/ic2/api/recipe/RecipeOutput.class delete mode 100644 src/api/java/ic2/api/recipe/RecipeOutput.java delete mode 100644 src/api/java/ic2/api/recipe/Recipes.class delete mode 100644 src/api/java/ic2/api/recipe/Recipes.java delete mode 100644 src/api/java/ic2/api/tile/ExplosionWhitelist.class delete mode 100644 src/api/java/ic2/api/tile/ExplosionWhitelist.java delete mode 100644 src/api/java/ic2/api/tile/IEnergyStorage.class delete mode 100644 src/api/java/ic2/api/tile/IEnergyStorage.java delete mode 100644 src/api/java/ic2/api/tile/IRotorProvider.class delete mode 100644 src/api/java/ic2/api/tile/IRotorProvider.java delete mode 100644 src/api/java/ic2/api/tile/IWrenchable.class delete mode 100644 src/api/java/ic2/api/tile/IWrenchable.java delete mode 100644 src/api/java/ic2/api/tile/RotorRegistry$IRotorRegistry.class delete mode 100644 src/api/java/ic2/api/tile/RotorRegistry.class delete mode 100644 src/api/java/ic2/api/tile/RotorRegistry.java delete mode 100644 src/api/java/ic2/api/upgrade/IAugmentationUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IAugmentationUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IEnergyStorageUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IEnergyStorageUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IFluidConsumingUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IFluidConsumingUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IFluidProducingUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IFluidProducingUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IFullUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IFullUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IItemProducingUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IItemProducingUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IProcessingUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IProcessingUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IRedstoneSensitiveUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/IRedstoneSensitiveUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/ITransformerUpgrade.class delete mode 100644 src/api/java/ic2/api/upgrade/ITransformerUpgrade.java delete mode 100644 src/api/java/ic2/api/upgrade/IUpgradableBlock.class delete mode 100644 src/api/java/ic2/api/upgrade/IUpgradableBlock.java delete mode 100644 src/api/java/ic2/api/upgrade/IUpgradeItem.class delete mode 100644 src/api/java/ic2/api/upgrade/IUpgradeItem.java delete mode 100644 src/api/java/ic2/api/upgrade/UpgradableProperty.class delete mode 100644 src/api/java/ic2/api/upgrade/UpgradableProperty.java delete mode 100644 src/api/java/ic2/api/upgrade/UpgradeRegistry.class delete mode 100644 src/api/java/ic2/api/upgrade/UpgradeRegistry.java delete mode 100644 src/api/java/ic2/api/util/FluidContainerOutputMode.class delete mode 100644 src/api/java/ic2/api/util/FluidContainerOutputMode.java delete mode 100644 src/api/java/ic2/api/util/IKeyboard.class delete mode 100644 src/api/java/ic2/api/util/IKeyboard.java delete mode 100644 src/api/java/ic2/api/util/Keys.class delete mode 100644 src/api/java/ic2/api/util/Keys.java diff --git a/build.gradle b/build.gradle index af50f6b6e..dfe802728 100644 --- a/build.gradle +++ b/build.gradle @@ -61,14 +61,17 @@ repositories { name 'buildcraft' url 'https://mod-buildcraft.com/maven/' } - maven { - name 'thiakil.io' - url 'https://thiakil.github.io/maven/' - } - maven { - name 'thiakil mirror' //in case GitHub doesn't like maven being hosted in GH Pages - url 'http://maven.thiakil.com' - } + maven { + name 'ic2' + url 'http://maven.ic2.player.to' + maven { + name 'thiakil.io' + url 'https://thiakil.github.io/maven/' + } + maven { + name 'thiakil mirror' //in case GitHub doesn't like maven being hosted in GH Pages + url 'http://maven.thiakil.com' + } } // Define properties file @@ -103,11 +106,12 @@ dependencies { compile "li.cil.oc:OpenComputers:MC${config.minecraft_version}-${config.opencomputers_version}:api" deobfCompile "mcp.mobius.waila:Hwyla:${config.hwyla_version}" deobfCompile "com.mod-buildcraft:buildcraft-api:${config.buildcraft_version}" - compile ("com.jaquadro.minecraft.storagedrawers:StorageDrawers:${config.minecraft_version}-${config.storagedrawers_version}:api") { - exclude module: "Chameleon" // we only use the API, which doesn't need Chameleon + compile "net.industrial-craft:industrial-craft2:${config.ic2_version}:api" + compile ("com.jaquadro.minecraft.storagedrawers:StorageDrawers:${config.minecraft_version}-${config.storagedrawers_version}:api") { + exclude module: "Chameleon" // we only use the API, which doesn't need Chameleon exclude module: "jei_1.11.2" exclude module: "Hwyla" - } + } } processResources diff --git a/build.properties b/build.properties index 5661c1a73..5fe308bc8 100644 --- a/build.properties +++ b/build.properties @@ -9,4 +9,5 @@ invtweak_version=1.62+beta.89 opencomputers_version=1.7.0.24 hwyla_version=1.8.13-B26_1.11 buildcraft_version=7.99.6 -storagedrawers_version=4.2.10 \ No newline at end of file +storagedrawers_version=4.2.10 +ic2_version=2.7.81-ex111 \ No newline at end of file diff --git a/src/api/java/ic2/api/crops/BaseSeed.class b/src/api/java/ic2/api/crops/BaseSeed.class deleted file mode 100644 index 47efa31319d8903ed6b4e71d6907ffedaef41ceb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 861 zcmaJ;U279T6g`t{lJ2@qo7%LE=Bs`tTQJa9rJxbD5EPn{_sM3kQ`6nByQ$#s@Q?Vg z6nyXp_@l%#Q)>{>K+e5)_TF>O-1+|F>o)+0=zDO{aj}N3fqet_4BR*Hz#}}Y;86vS z1)MO67Xo`D9UczkLJv%x4u-^`OlD8nk?K!MKpYErX(qGRN&GQ86Iio_)R92dq$euX zj8Vwu@-rRj>`0)~`xo&sfBgyRhw+RP8zUX5x66yEN>1f;&XcWC9Lo7bCfd}$4xQ{w zr+?dhAyYM0%GmAxSJ6tkv>ARF+iQ6*)gn=$%+ySvak7jueW4~g)zo|*MKLd?!z~{^)_qhBY#7)yP{S69|J?iy zfxzZU@ZI!Wg_%IH*PmdY@8|NNOPnV)Ghx_mq=1dou#qy11$I!2c$?K{)@8EpR%Ex{ zgw2e*g3XM-qRos$$7aT3$vWKQH{z+iG77Ya1+;$xD`Ar` diff --git a/src/api/java/ic2/api/crops/BaseSeed.java b/src/api/java/ic2/api/crops/BaseSeed.java deleted file mode 100644 index 5f5f4446d..000000000 --- a/src/api/java/ic2/api/crops/BaseSeed.java +++ /dev/null @@ -1,57 +0,0 @@ -package ic2.api.crops; - -/** - * Base agriculture seed. Used to determine the state of a plant once it is planted from an item. - */ -public class BaseSeed { - /** - * Create a BaseSeed object. - * - * @param crop plant - * @param size plant size - * @param statGrowth plant growth stat - * @param statGain plant gain stat - * @param statResistance plant resistance stat - * @param stackSize for internal usage only - */ - public BaseSeed(CropCard crop, int size, int statGrowth, int statGain, int statResistance) { - this.crop = crop; - this.size = size; - this.statGrowth = statGrowth; - this.statGain = statGain; - this.statResistance = statResistance; - } - - /** - * @deprecated use the other constructor instead - */ - @Deprecated - public BaseSeed(CropCard crop, int size, int statGrowth, int statGain, int statResistance, int stackSize) { - this(crop, size, statGrowth, statGain, statResistance); - } - - /** - * Plant. - */ - public final CropCard crop; - - /** - * Plant size. - */ - public int size; - - /** - * Plant growth stat. - */ - public int statGrowth; - - /** - * Plant gain stat. - */ - public int statGain; - - /** - * Plant resistance stat. - */ - public int statResistance; -} diff --git a/src/api/java/ic2/api/crops/CropCard.class b/src/api/java/ic2/api/crops/CropCard.class deleted file mode 100644 index dab248f4b1d65ce8bfc377bd29b26e46c7dced78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5062 zcma)8TXa-c8UA+WN;u>)2{$2J3X~)yjHZPaf?RR|q7$GAg+fc^WacC}WO62+Ig>!E zwpO%Ot=79xFMzFhK}xFzt4r4ML6^%XpMCa4AAEJKE|&WJ`{_tjgHguCzI2r?YNhs+jI&+iSYHZiU#GCM~O35A1;<7XVpOHY!bS=Su((!?WrdMa;Tu-tUN9v#zz?lzhq_ZJk}AO0MJ zOQ(-cdG@54KWw_wR?+k0Sx19=tYFF_wd->9@{nmez2hb$qa)tO=t{&ntFUWvN7^bZ zvOQ}uJ-|jYktvtZ%e@CiJ$h3@@MVhJDmHLyD zjDBOmIU+e8DU@6R8snDx0Z}Yg+QlKB^$LzPY>zo+zJJp8XeSkcxc(qFe}_Ut!RcX@ zPxLXOZsCGNP^vuGoe=_PWBfGs7V>$!sOfs2Fjhn{;De9gQ^226Xu0oJ#>Ug!i`&JM z42vJ2lLa@=?#_o#vKU4k6Y)xl4})3Mg8ha%_(BZv-9bUUG%thiH@V}6xsv| z7jD>7VZ2@#vWm=D)|x}^-b!YRx+2Kvyi0EL>44dhY>6I+RBpa;DP{K&u+97^D- zfonKq;Gi@=##;%zZQv)kZs4bQ%fQd@a|6GSwHwm>Qkt96yn|Z`TdG#PpW%!>&DW%d zq)y;n1Mdm+uMGSeod$k`S%nn~bydPK&*Y;c=d3K57dNM-EQf2ItqY%sg-=cpHHJLt z75rz7WwY?Udphnb!*N^6Waa#g;XC3#I=v;=C2xJ%Y34&QT5u-^O{WwplGYk3T;09U z51R5sMW#g7W37FCZG9y5lqR((l2Ae6Lsj3J;K`O(hVm0U7ZjVhu@*CVNMx0?BV~QT zGh~jkn6aj2nM(5n(sOJAy}oecjx-8u7cROJGmU zT^vZ@qaQ#e?_v{sJhT`4*a{(b@+-NoiQbS_8|&w2LL0EcUk$IV!G0WoA}6ShJfTEM z11#Z$CRgMSsH@D|3uSqW`EUfGnre{4p+Wn3p%`Q^fAzCyXvAN}D@}W?%rql3&G1d5 z2?O|8VA4>4*0k+?H1aRhEK=8yh+aoDBA|Y9e1G3818oXHn*vY?X$&=u`^CkNBNO1C zB7TfZiM1_fmq*W58hS%xN)ovx#7tmNVyNeiFp1)B0!P`C6enEVYbYNhVZ_I;J(0zy8YtA5IN^lK+>l#CU}$L`!$~jf6|y60^77AXe%`jbniH+ zD=KgzOyVw%#4C}2R3+fw%8U${AX~%ioebTslD#X7c>eb?&9~#@&#Ckufr0!{!t?>W3(Cfu(=|5%G)r5HoYKa(UswQLQf@G+; z26~ueJWn<8y}U^;MG<%V9W+DuTJ|JrQBa*_5GsUFA%qojHB7!1mNNRN9c38Rl0UkT zKnpPTJ^*9v!LIlZr?2PLTp51|GoD(+3}4R_Y@7=sdWK&~esjkkvGEe>I%e_6rRue- zp3|s4shh(fHwQr`1}2aX$U+TH?HB!;e6YvkW!9E^>?@ao6DDtr=#u}fK}}r6I-hUv zVbj~F^I6xhY7yC0ZrMd!LkG47iY6S7BeF4~?Ji)7*2~k|&97XVApB;vfW0r4ftJ4= UbMNmb;S!)ofEsx0m2_|V|JBvw5&!@I diff --git a/src/api/java/ic2/api/crops/CropCard.java b/src/api/java/ic2/api/crops/CropCard.java deleted file mode 100644 index 60350036e..000000000 --- a/src/api/java/ic2/api/crops/CropCard.java +++ /dev/null @@ -1,383 +0,0 @@ -package ic2.api.crops; - -import java.util.List; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; - -/** - * Base agriculture crop. - * - * Any crop extending this can be registered using registerCrop to be added into the game. - */ -public abstract class CropCard { - public CropCard() { - } - - /** - * Plant id for identifying this crop within your mod. - *
- * The id has to be unique within the mod and is used for saving. - *
- * By default this id will be also used to determine {@link #getUnlocalizedName()} and {@link #getTexturesLocation()}. - * - * @note changing the id or owner will cause existing crops in users' worlds to disappear. - * - * @return Plant id - */ - public abstract String getId(); - - /** - * Determine the mod owning this crop. - * - * The owner serves as a name space. With every mod using a different owner, a mod only has to - * make sure it doesn't have getId() conflicts within itself. The identifier has to be lower - * case to ensure compatibility with future versions. - *
- * It's recommended to hard code this to your lower case mod id as specified in the @Mod - * annotation, as {@link #getUnlocalizedName()} will use it by default. - *
- * Do not use IC2's mod id here. - * - * @note changing the id or owner will cause existing crops in users' worlds to disappear. - * - * @return owning mod identifier, lower case. - */ - public abstract String getOwner(); - - /** - * Translation key for display to the player. - * - * It's recommended to specify a valid key from your language file here. - *
- * e.g. Add "yourmod.crop.yourCropName = Your crop's name" to the language file, - * override {@link #getId()} to return "yourCropName" and override {@link #getOwner()} to return "yourmod". - * - * @return Unlocalized name. - */ - public String getUnlocalizedName() { - return getOwner() + ".crop." + getId(); //Good enough default - } - - /** - * Your name here, will be shown in "Discovered by:" when analyzing seeds. - * - * @return Your name - */ - public String getDiscoveredBy() { - return "unknown"; - } - - /** - * Description of your plant. Keep it short, a few characters per line for up to two lines. - * Default is showing attributes of your plant, 2 per line. - * - * @param i line to get, starting from 0 - * @return The line - */ - public String desc(int i) { - String[] att = getAttributes(); - - if (att == null || att.length == 0) return ""; - - if (i == 0) { - String s = att[0]; - if (att.length >= 2) { - s += ", " + att[1]; - if (att.length >= 3) s += ","; - } - return s; - } - if (att.length < 3) return ""; - String s = att[2]; - if (att.length >= 4) s += ", " + att[3]; - return s; - } - - /** - * Crop roots length. Maximum roots length should be 5. - * @param cropTile reference to ICropTile - * @return roots length use in isBlockBelow - */ - public int getRootsLength(ICropTile cropTile) { - return 1; - } - - /** - * Object containing the crop properties info - See {@link CropProperties} for more info. - */ - public abstract CropProperties getProperties(); - - /** - * Additional attributes of the plant, also influencing breeding. - * Plants sharing stats and attributes will tend to cross-breed more often. - * - * @return Attributes as an array of strings - */ - public String[] getAttributes() { - return new String[0]; - } - - /** - * Determine the max crop size. - * - * Currently used for texture allocation, growth and harvesting control (by default). - */ - public abstract int getMaxSize(); - - /** - * Amount of growth points needed to increase the plant's size. - * Default is 200 * tier. - */ - public int getGrowthDuration(ICropTile cropTile) { - return getProperties().getTier() * 200; - } - - /** - * Check whether the plant can grow further. - * - * Consider: - * - Humidity, nutrients and air quality - * - Current size - * - Light level - * - Special biomes or conditions, accessible through crop.worldObj - * - * This method will be called upon empty upgraded crops to check whether a neighboring plant can cross onto it! Don't check if the size is greater than 0 and if the ID is real. - * - * @param cropTile reference to ICropTile - * @return Whether the crop can grow - */ - public boolean canGrow(ICropTile cropTile) { - return cropTile.getCurrentSize() < getMaxSize(); - } - - /** - * Calculate the influence for the plant to grow based on humidity, nutrients and air. - * Normal behavior is rating the three stats "normal", with each of them ranging from 0-30. - * Basic rule: Assume everything returns 10. All together must equal 30. Add the factors to your likings, for example (humidity*0.7)+(nutrients*0.9)+(air*1.4) - * - * Default is humidity + nutrients + air (no factors). - * - * @param crop reference to ICropTile - * @param humidity ground humidity, influenced by hydration - * @param nutrients nutrient quality in ground, based on fertilizers - * @param air air quality, influences by open gardens and less crops surrounding this one - * @return 0-30 - */ - public int getWeightInfluences(ICropTile crop, int humidity, int nutrients, int air) { - return humidity + nutrients + air; - } - - /** - * Used to determine whether the plant can crossbreed with another crop. - * Default is allow crossbreeding if the size is greater or equal than 3. - * - * @param crop crop to crossbreed with - */ - public boolean canCross(ICropTile crop) { - return crop.getCurrentSize() >= 3; - } - - - /** - * Called when the plant is rightclicked by a player. - * Default action is harvesting. - * - * Only called Serverside. - * - * @param cropTile reference to ICropTile - * @param player player rightclicking the crop - * @return Whether the plant has changed - */ - public boolean onRightClick(ICropTile cropTile, EntityPlayer player) { - return cropTile.performManualHarvest(); - } - - /** - * Use in Crop Harvester with insert Cropnalyzer to get best Output. - * - * @param cropTile reference to ICropTile - * @return need crop size for best output. - */ - - public int getOptimalHarvestSize(ICropTile cropTile) { - return getMaxSize(); - } - - /** - * Check whether the crop can be harvested. - * - * @param cropTile reference to ICropTile - * @return Whether the crop can be harvested in its current state. - */ - public boolean canBeHarvested(ICropTile cropTile) { - return cropTile.getCurrentSize() == getMaxSize(); - } - - /** - * Base chance for dropping the plant's gains, specify values greater than 1 for multiple drops. - * Default is 0.95^tier. - * - * @return Chance to drop the gains - */ - public double dropGainChance() { - return Math.pow(0.95, getProperties().getTier()); - } - - /** - * Item obtained from harvesting the plant. - * - * @param crop reference to ICropTile - * @return Item obtained - */ - public abstract ItemStack getGain(ICropTile crop); - - /** - * Get the size of the plant after harvesting. - * Default is 1. - * - * @param cropTile reference to ICropTile - * @return Plant size after harvesting - */ - public int getSizeAfterHarvest(ICropTile cropTile) { - return 1; - } - - - /** - * Called when the plant is left clicked by a player. - * Default action is picking the plant. - * - * Only called server side. - * - * @param cropTile reference to ICropTile - * @param player player left clicked the crop - * @return Whether the plant has changed - */ - public boolean onLeftClick(ICropTile cropTile, EntityPlayer player) { - return cropTile.pick(); - } - - /** - * Base chance for dropping seeds when the plant is picked. - * Default is 0.5*0.8^tier with a bigger chance for sizes greater than 2 and absolutely no chance for size 0. - * - * @param crop reference to ICropTile - * @return Chance to drop the seeds - */ - public float dropSeedChance(ICropTile crop) { - if (crop.getCurrentSize() == 1) return 0; - float base = 0.5F; - if (crop.getCurrentSize() == 2) base /= 2F; - for (int i = 0; i < getProperties().getTier(); i++) { - base *= 0.8; - } - return base; - } - - /** - * Obtain seeds dropped when the plant is picked. - * Multiple drops of the returned ItemStack can occur. - * Default action is generating a seed from this crop. - * - * @param crop reference to ICropTile - * @return Seeds - */ - public ItemStack getSeeds(ICropTile crop) { - return crop.generateSeeds(crop.getCrop(), crop.getStatGrowth(), crop.getStatGain(), crop.getStatResistance(), crop.getScanLevel()); - } - - /** - * Called when a neighbor block to the crop has changed. - * - * @param crop reference to ICropTile - */ - public void onNeighbourChange(ICropTile crop) { - // NO-OP - } - - /** - * Check if the crop emits a redstone signal. - * - * @return Whether the crop emits a redstone signal. - */ - public boolean isRedstoneSignalEmitter(ICropTile cropTile) { - return false; - } - - /** - * Get the emitted redstone signal strength. - * - * @return The redstone signal strength. - */ - public int getEmittedRedstoneSignal(ICropTile cropTile) { - return 0; - } - - /** - * Called when the crop is destroyed. - * - * @param crop reference to ICropTile - */ - public void onBlockDestroyed(ICropTile crop) { - // - } - - /** - * Get the light value emitted by the plant. - * - * @param crop reference to ICropTile - * @return Light value emitted - */ - public int getEmittedLight(ICropTile crop) { - return 0; - } - - /** - * Default is true if the entity is an EntityLiving in jumping or sprinting state. - * - * @param crop reference to ICropTile - * @param entity entity colliding - * @return Whether trampling calculation should happen, return false if the plant is no longer valid. - */ - public boolean onEntityCollision(ICropTile crop, Entity entity) { - return (entity instanceof EntityLivingBase && entity.isSprinting()); - } - - - /** - * Called every time the crop ticks. - * Should be called every 256 ticks or around 13 seconds. - * - * @param cropTile reference to ICropTile - */ - public void tick(ICropTile cropTile) { - // nothing by default - } - - /** - * Check whether this plant spreads weed to surrounding tiles. - * Default is true if the plant has a high growth stat (or is weeds) and size greater or equal than 2. - * - * @param cropTile reference to ICropTile - * @return Whether the plant spreads weed - */ - public boolean isWeed(ICropTile cropTile) { - return cropTile.getCurrentSize() >= 2 && (cropTile.getCrop() == Crops.weed || cropTile.getStatGrowth() >= 24); - } - - /** - * Retrieve the crop world. - * @param cropTile reference to ICropTile. - * @return The crop world object. - */ - public World getWorld(ICropTile cropTile) { - return cropTile.getWorldObj(); - } - - public abstract List getTexturesLocation(); -} diff --git a/src/api/java/ic2/api/crops/CropProperties.class b/src/api/java/ic2/api/crops/CropProperties.class deleted file mode 100644 index 11cd6c540bcadc4a8a7ee1f1b4cfe2baa8ea5c51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1233 zcmaJ{USzCEnpZm0Y~7bz%79VfyE-h z6}T<1B(N-S$HH9;D+)#@3=##ku2Aszf`hQ#N!}|I{kYZc9(Y?(z=Q2zCup_9Bl>wi zj^bpe8M`0`MJYiUMT|c!=o~^~(j2^9rt>9(%U@J&A`nksHvF}BjUJ}as zc+=?Yg>8jOJ@l7d?=W=zBtC4rYs6Rlf`lU54;8H4ptGU%W~((Swz*zA6+JA=GrHyY z*{Sp)ef(FwU`F6NDhgBoYgeHp72L>c?YfPv{lM=iu)kY+2|qXlyg0p zPTB0i`pn1-CWtf419oMwsRGrEaA%wyO<$Esag$&quuAoGz52OJkxG63#K%V){iLGnT> znS)Cq8-wJfR5AyiLe346S5nFRQBug}Ao)QmnLk(x*%~B2P9@KBhW!g`aw2lE^Z6ge yX4d(Ne4}a56dKJOO|j85X@(k2i^gtzI+@3a9_lJ*@RWmJJyT}>WG-_$dj1apPN)+A diff --git a/src/api/java/ic2/api/crops/CropProperties.java b/src/api/java/ic2/api/crops/CropProperties.java deleted file mode 100644 index 7271461d4..000000000 --- a/src/api/java/ic2/api/crops/CropProperties.java +++ /dev/null @@ -1,78 +0,0 @@ -package ic2.api.crops; - -/** - * Describe the plant through a set of properties, influencing breeding. - * Plants sharing properties and attributes will tend to cross-breed more often. - * - * Properties: - * - Tier (Tier of the plant. Ranges from 1 to 16, 0 is Weed. Valuable and powerful crops have higher tiers, useless and - * weak ones have lower tiers.) - * - Chemistry (Industrial uses based on chemical plant components) - * - Consumable (Food, potion ingredients, stuff meant to be eaten or similarly used) - * - Defensive (Plants with defense capabilities (damaging, explosive, chemical) or special abilities in general) - * - Colorful (How colorful/aesthetically/beautiful is the plant, like dye-plants or plants without actual effects) - * - Weed (Is this plant weed-like and rather unwanted/quick-spreading? Rare super-breed plants should have low values here) - * - * @author IC2 Team - */ -public class CropProperties { - - /** - * Create a CropProperties object. - * - * @param tier Tier property value - * @param chemistry Chemistry property value - * @param consumable Consumable property value - * @param defensive Defensive property value - * @param colorful Colorful property value - * @param weed Weed property value - */ - public CropProperties(int tier, int chemistry, int consumable, int defensive, - int colorful, int weed) { - this.tier = tier; - this.chemistry = chemistry; - this.consumable = consumable; - this.defensive = defensive; - this.colorful = colorful; - this.weed = weed; - } - - public int getTier() { - return this.tier; - } - - public int getChemistry() { - return this.chemistry; - } - - public int getConsumable() { - return this.consumable; - } - - public int getDefensive() { - return this.defensive; - } - - public int getColorful() { - return this.colorful; - } - - public int getWeed() { - return this.weed; - } - - public int[] getAllProperties() { - return new int[] { this.getChemistry(), this.getConsumable(), this.getDefensive(), - this.getColorful(), this.getWeed() }; - } - - /** - * Fields - */ - private final int tier; - private final int chemistry; - private final int consumable; - private final int defensive; - private final int colorful; - private final int weed; -} diff --git a/src/api/java/ic2/api/crops/CropSoilType.class b/src/api/java/ic2/api/crops/CropSoilType.class deleted file mode 100644 index fd7b99366240f40e5d6e09ed8786c45b2ee3c570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1832 zcmah}O;;306umXwGd(jlUjvQ|A0nt^7$Pl1^C3vU5h6(s7#c`O7D>^zq_yeh%=CD4 zlT{Y^9a$tB7s;5YCmubn^Gos*vNCzEW)5Hy#$Hs_tGe&L_wK9eKVJR*0>BJD&p^jq z7FRKE;EaI}vp9tX9v1oJT9$?~57*P^&tM75Y<$FLH_{m3ofS4dPGgXbPuQ^27-FNs z#;Soef%Nj?dc|H`y)H0h`|gY-_kGK)M*B6ZOrsO|!N!AqZ~}&ksGfDsRV@+P1FoAyF9TwifNpB}ZWR%l5%i_heA_Y62t0 zi8ny?a&*fR=&~v3YJG3Vt8U1hfOZVUv36VFV$r@M?@23=;jZPxRX^OFooJsx&W>Ce zY{{z6WGzNLlzT*+`!Ab7YR(V+cwS)oe}b*Fk!50w1dYG(so0F;?}jq2S1HKp;v0O% z*6U&H?|EB(&8HM^$|@xnd)37-jA9x4QAmsfD%JazJlM2WqcE%o0e5uQi&bl=AH|6_ z;Ydq23S-GRw$JMe0ZrEL3v@WKbnjN=eoMOaoEx+R(u!R2)DaPv!usA^yMD}5wpk~t zS6y$}=ic@ly_{3rToWVwPR^LPiBGBUjeBw3yTeM>~Q7B?Uol_s7sfagd))`Tn9D0IO z>B4U?emUUiq*I`mV)x+$PJ+4e#LtXxt9p3F6=}Gjyry8$YzPW?krwpq>8IT+&Z3#i zOO}3x@$WqQ6?ZewWQ#k4cW|lY{4GUIlJoder0vNUSGD=!p&w9~9GHE`ky%tz=@cBkGzm$JK+-IHt}r|e#3_oW&*sqDP* zoCwIh!`UXMZfBdIz0NiP^3Ed&?nATp%_=(4jV`)1-6U-f7D)L-OZ5+Mg|G?C{sZOD Binag% diff --git a/src/api/java/ic2/api/crops/CropSoilType.java b/src/api/java/ic2/api/crops/CropSoilType.java deleted file mode 100644 index 1a8dddf50..000000000 --- a/src/api/java/ic2/api/crops/CropSoilType.java +++ /dev/null @@ -1,42 +0,0 @@ -package ic2.api.crops; - -import javax.annotation.Nonnull; - -import net.minecraft.block.Block; -import net.minecraft.init.Blocks; - -/** - * List of possible blocks to be used as soil for a crop. - * @author estebes - */ -public enum CropSoilType { - //DIRT(Blocks.DIRT), - FARMLAND(Blocks.FARMLAND), - MYCELIUM(Blocks.MYCELIUM), - SAND(Blocks.SAND), - SOULSAND(Blocks.SOUL_SAND); - - private CropSoilType(@Nonnull Block block) { - this.block = block; - } - - public Block getBlock() { - return this.block; - } - - /** - * Check if a block can be used as soil. - * @param block the block - * @return true if the block is a possible crop soil - */ - public static boolean contais(Block block) { - for (CropSoilType aux : CropSoilType.values()) { - if (aux.getBlock() == block) { - return true; - } - } - return false; - } - - private final Block block; -} diff --git a/src/api/java/ic2/api/crops/Crops.class b/src/api/java/ic2/api/crops/Crops.class deleted file mode 100644 index a97ba790f2e6d689ffd1d2714fc7f843a4522eaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1187 zcmb7DTTc@~6#fPZrKJjj+{7DNwTp&H8XruGJhaBxq``+09(tlsrt6B-Pwgy;Gr8sTO8bcMPqrt8Q(Q=rm7Mr0mG&A^%X?4-=Ow zr100Tq~RB-i6cI6A>%ZypgV>i7Nz^-1$>cc-6Y+p7!De}Gx0_6Sm+_|Q=@v=`qL9k zAN8B7)hH_y-X+nuBK+L?3v{8Vghsd72*z1+t76_s<5>Dh(Jm`}HPpi9h6di861G3B zz5^nt897v$rA1NK4BL%q!EPDLli;?2ZhSh6c3pI4P-j9Pbnray@8TM{=Q5k~&29$O%Lk}7xD=1-( zP8H0fOnMRYzR9BM$>O9L>ABr+U|;DlLjj;r=e&g)$=W!8ETSnf+{TL6tA)OcHE*vM vdIOu@-oTdE_pnV2_dWLm!au|#?|+OPub<$l|5x|&8Sap-5@HDfma+94Wei9M diff --git a/src/api/java/ic2/api/crops/Crops.java b/src/api/java/ic2/api/crops/Crops.java deleted file mode 100644 index cfaeb19f1..000000000 --- a/src/api/java/ic2/api/crops/Crops.java +++ /dev/null @@ -1,113 +0,0 @@ -package ic2.api.crops; - -import java.util.Collection; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.biome.Biome; - -import net.minecraftforge.common.BiomeDictionary.Type; - -/** - * General management of the crop system. - */ -public abstract class Crops { - public static Crops instance; - - public static CropCard weed; // weed has special properties, thus it's exposed here - - /** - * Adds a crop nutrient biome bonus. - * - * +10/-10 0 indicates no bonus and negative values indicate a penalty. - * - * @param type Forge biome type to apply the bonus in - * @param nutrientsBonus Nutrient stat bonus - */ - public abstract void addBiomenutrientsBonus(Type type, int nutrientsBonus); - - /** - * Adds a crop humidity biome bonus. - * - * +10/-10 0 indicates no bonus and negative values indicate a penalty. - * - * @param type Forge biome type to apply the bonus in - * @param humidityBonus Humidity stat bonus - */ - public abstract void addBiomehumidityBonus(Type type, int humidityBonus); - - - /** - * Gets the humidity bonus for a biome. - * - * @param biome Biome to check - * @return Humidity bonus or 0 if none - */ - public abstract int getHumidityBiomeBonus(Biome biome); - - /** - * Gets the nutrient bonus for a biome. - * - * @param biome Biome to check - * @return Nutrient bonus or 0 if none - */ - public abstract int getNutrientBiomeBonus(Biome biome); - - /** - * Get the crop card for the specified owner and name. - * - * @param owner CropCard owner mod id. - * @param name CropCard name. - * @return Matching CropCard. - */ - public abstract CropCard getCropCard(String owner, String name); - - /** - * Get the crop card for the specified seed item stack. - * - * @param stack ItemStack containing seeds for the crop. - * @return Matching CropCard. - */ - public abstract CropCard getCropCard(ItemStack stack); - - /** - * Returns a list of all crops. - * - * @return All registered crops. - */ - public abstract Collection getCrops(); - - /** - * Register a plant and provide a legacy id for migration. - * - * @param crop Plant to register. - */ - public abstract void registerCrop(CropCard crop); - - /** - * Registers a base seed, an item used to plant a crop. - * - * @param stack item - * @param crop crop - * @param size initial size - * @param growth initial growth stat - * @param gain initial gain stat - * @param resistance initial resistance stat - * @return True if successful - */ - public abstract boolean registerBaseSeed(ItemStack stack, CropCard crop, int size, int growth, int gain, int resistance); - - /** - * Finds a base seed from the given item. - * - * @return Base seed or null if none found - */ - public abstract BaseSeed getBaseSeed(ItemStack stack); - - /** - * Execute registerSprites for all registered crop cards. - * - * This method will get called by IC2, don't call it yourself. - */ - //@SideOnly(Side.CLIENT) - //public abstract void startSpriteRegistration(IIconRegister iconRegister); -} diff --git a/src/api/java/ic2/api/crops/ExampleCropCard.class b/src/api/java/ic2/api/crops/ExampleCropCard.class deleted file mode 100644 index 774eb7d4ed007db88a5de97bfc6068102470ec29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1950 zcma)7U3U{j7=C7VlTDXxfB>Oj3awSyw3Nl7QcPPZZNW&=BB{mT2X2$G4&>`>Hrjga zKk>pFFT{)HXwK0)FZ@ZKL+HL+&mu7yzvxhLiOQkjk619`YFmz)I~`4d>j zhKUCzK4ge4h?)qN7<4DS#bB(|%bek4PSp5%tGdnoO>etGH;G)m_&PR)}s%lh;>auCMr7{l4K+!(`~Tlw9$~FHL5P-7^l76HNYiYrW1W{h^z~q zB`LvrLi>rtAoTPAR6l^edJI$#LzBlsr|??O>pWu0YrF%aXy~S{N7{&lSuPE*#18_X zVeheAB`IUqVn2pLpBg}F2goaMddS=KFQXC0?jTzH8K%)jEbQG;9LcU-k3&{6jcMg~ z23JWZ8}K{TS|^$BV5B&`537w6Ib$&;x8GxarUSc}&^s6{wh>R9+{Y=>oFPuYIyXW#(wzsj~N+`p&FS)g!Z%K+C>uAu}1PfZm94k$Z;Htq`jsB&G!Pe qu}oIiDbP0wE8E|_nWNneb))@_xQVyeUs%A~bfe)N(%n?M`Tqd-ShdCg diff --git a/src/api/java/ic2/api/crops/ExampleCropCard.java b/src/api/java/ic2/api/crops/ExampleCropCard.java deleted file mode 100644 index 2fc522066..000000000 --- a/src/api/java/ic2/api/crops/ExampleCropCard.java +++ /dev/null @@ -1,53 +0,0 @@ -package ic2.api.crops; - -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -import java.util.ArrayList; -import java.util.List; - -/** - * CropCard example - * @author estebes - */ -public class ExampleCropCard extends CropCard { - @Override - public String getId() { - return "example"; - } - - @Override - public String getOwner() { - return "myaddon"; - } - - /** - * See {@link CropProperties} for more info. - */ - @Override - public CropProperties getProperties() { - return new CropProperties(1, 0, 4, 0, 0, 2); - } - - @Override - public int getMaxSize() { - return 5; - } - - @Override - public ItemStack getGain(ICropTile crop) { - return new ItemStack(Items.DIAMOND, 1); - } - - @Override - public List getTexturesLocation() { - List ret = new ArrayList(getMaxSize()); - - for (int size = 1; size <= getMaxSize(); size++) { - ret.add(new ResourceLocation("myaddon", "blocks/crop/" + getId() + "_" + size)); - } - - return ret; - } -} diff --git a/src/api/java/ic2/api/crops/ICropSeed.class b/src/api/java/ic2/api/crops/ICropSeed.class deleted file mode 100644 index 21e648ea1b38655a546f6c79aef92dce1f25d128..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 669 zcmah{!A=4(5Pd}i1w{mfc+`_zY{E&ykwmfyiHVzduVus{+a=wi|K`CD@S}{gn~hlo zvzM8?&U>#joqm43e*hSwU&m=3J%RR|{Mf~-TNg*6SNcWZ`f_T?%g9*LPCa>PJVi3# zkP$|MsnJ8JRz_+TCNh!|B${0<)TrxXj6h47MftGRy0l^z+>xI>-cmYvbR60`;X$KtsrQ1*f+oY4t!sw&N;_vwNAMpkZ7%1H0IX!Sja<7g^#C=IYlQoVRcf`8rzAq;uu;;V8SZ9*^##PfNG`) zjI?!*8ST(8R{i*$z-WiaQAwlnsVK5D77$1pMH`xPnmO-EZsRfMTxL={#0G>R7quJ> zo25K#26UN^r4L)R%txV?^)0F?fhFvxVA`v5!F)xJv?nUs+sT#7w3e6khKz*i>^O!} zW=dgAx1&0*a{U9V(@prUw8a{V`B+*M z&+bJ+^E%t-A+H2%QwWKpz@@K}dN31Fl;{C<|I0DbJn-sNAA7k# z`lq`x#7$<*ioABLT{mJ4?w=BvY%p~sRs9PUn9DX*XDrk>td71Q#xW}!j&)wdX+xib zC0-L$M+!TWy&_oeDm~Y%?iKJ4r`tbW+dv0>ieb;~4Z)j`h#FNaiy3}&nB<`iKgR-j zPGB+J<*s6KYi78X!J(K+chswdLoRBT$HWCw#xIT~mUaEw%Ui%-_q=okjqNMRNcrp& z4=~15!F(Ue_`YI_Lty6e*W+Rt??=0tUn?if$E+{JTpUTSU|ULY3i=5U=)tEKKUK>y z0x{?VK-&*-YX@M^+960-n{;^C;grK84v#uK=J2?~6An*0Jmv7T!!r)waCp|?Ifv&R zz6lF9jzzd-?QOVY?Omt4=j@WR%Wxm_dw|&ir19y;Tr+mZLwIz}%44_pi92h>Sr4A# k?q}$w2eMeB=kUUMdg<&cys~%|UR(PH-lCSkn%%Mf58@Y$@Bjb+ diff --git a/src/api/java/ic2/api/crops/ICropTile.java b/src/api/java/ic2/api/crops/ICropTile.java deleted file mode 100644 index 21357bc7c..000000000 --- a/src/api/java/ic2/api/crops/ICropTile.java +++ /dev/null @@ -1,284 +0,0 @@ -package ic2.api.crops; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import ic2.api.info.ILocatable; - -/** - * Interface implemented by the crop tile entity. - */ -public interface ICropTile extends ILocatable { - /** - * Get the crop. - * - * @return CropCard, or null if there is no plant currently on the crop - */ - public CropCard getCrop(); - - /** - * Set the crop. - * - * @param cropCard CropCard or null for no plant - */ - public void setCrop(CropCard cropCard); - - /** - * Get the crop's plant size. - * - * @return Plant size, starting with 1 and maximum varies depending on plant - */ - public int getCurrentSize(); - - /** - * Set the crop's plant size. - * - * @param size Plant size - */ - public void setCurrentSize(int size); - - /** - * Get the crop's plant growth stat. - * Higher values indicate faster growth. - * - * @return Plant growth stat - */ - public int getStatGrowth(); - - /** - * Set the crop's plant growth stat. - * - * @param growth Plant growth stat - */ - public void setStatGrowth(int growth); - - /** - * Get the crop's plant gain stat. - * Higher values indicate more drops. - * - * @return Plant gain stat - */ - public int getStatGain(); - - /** - * Set the crop's plant gain stat. - * - * @param gain Plant gain stat - */ - public void setStatGain(int gain); - - /** - * Get the crop's plant resistance stat. - * Higher values indicate more resistance against trampling. - * - * @return Plant resistance stat - */ - public int getStatResistance(); - - /** - * Set the crop's plant resistance stat. - * - * @param resistance Plant resistance stat - */ - public void setStatResistance(int resistance); - - /** - * Get the crop's nutrient storage. - * Ranges from 0 to 100. - * - * @return Crop nutrient storage - */ - public int getStorageNutrients(); - - /** - * Set the crop's nutrient storage. - * - * @param nutrients Crop nutrient storage - */ - public void setStorageNutrients(int nutrients); - - /** - * Get the crop's hydration storage. - * 0 indicates nothing, 1-10 indicate water hydration and 11-100 for hydration cells. - * - * @return Crop hydration storage - */ - public int getStorageWater(); - - /** - * Set the crop's water storage. - * - * @param water Crop water storage - */ - public void setStorageWater(int water); - - /** - * Get the crop's Weed-Ex storage. - * - * @return Crop Weed-Ex storage - */ - public int getStorageWeedEX(); - - /** - * Set the crop's Weed-Ex storage. - * - * @param weedEX Crop Weed-Ex storage - */ - public void setStorageWeedEX(int weedEX); - - /** - * Get the crop's plant scan level. - * Increases every time the seed is analyzed. - * - * @return Plant scan level - */ - public int getScanLevel(); - - /** - * Set the crop's plant scan level. - * - * @param scanLevel Plant scan level - */ - public void setScanLevel(int scanLevel); - - public int getGrowthPoints(); - - public void setGrowthPoints(int growthPoints); - - public boolean isCrossingBase(); - - public void setCrossingBase(boolean crossingBase); - - /** - * Get the crop's plant custom data, stored alongside the crop. - * Can be modified in place. - * - * @return Plant custom data - */ - public NBTTagCompound getCustomData(); - - /** - * Get the crop's humidity. - * Ranges from 0 (dry) to 10 (humid). - * Updates every couple of seconds or when an update is requested. - * - * @see #updateState() - * - * @return Crop humidity level - */ - public int getTerrainHumidity(); - - /** - * Get the crop's nutrient level. - * Ranges from 0 (empty) to 10 (full). - * Updates every couple of seconds or when an update is requested. - * - * @see #updateState() - * - * @return Crop nutrient level - */ - public int getTerrainNutrients(); - - /** - * Get the crop's air quality. - * Ranges from 0 (cluttered) to 10 (fresh). - * Updates every couple of seconds or when an update is requested. - * - * @see #updateState() - * - * @return Crop air quality - */ - public int getTerrainAirQuality(); - - /** - * Get the crop's world. - * @deprecated This method causes a MethodNotFoundException in a obfuscated environment. - * Use {@link #getWorldObj()} instead - * - * @return Crop world - */ - @Deprecated - public World getWorld(); - - /** - * Get the crop's location. - * @deprecated Use {@link #getPosition()} instead. - * - * @return Crop location - */ - @Deprecated - public BlockPos getLocation(); - - /** - * Get the crop's light level. - * - * @return Crop light level - */ - public int getLightLevel(); - - /** - * Pick the crop, removing and giving seeds for the plant. - * - * @return true if successfully picked - */ - public boolean pick(); - - /** - * Harvest the crop, turning it into gain and resetting its size. - * drop output on ground - */ - public boolean performManualHarvest(); - - /** - * Harvest the crop, turning it into gain and resetting its size. - * drop output on ground - * @return List of harvest output - */ - - public List performHarvest(); - - /** - * Fully clears the crop without dropping anything. - */ - public void reset(); - - /** - * Request a texture and lighting update. - */ - public void updateState(); - - /** - * Check if a block is under the farmland containing the crop. - * Searches up to 4 blocks below the farmland or an air space, whichever appears first. - * - * @param block block to search - * @return Whether the block was found - */ - public boolean isBlockBelow(Block block); - - /** - * Check if a block is under the farmland containing the crop. - * Searches up to 4 blocks below the farmland or an air space, whichever appears first. - * - * @param oreDictionaryName blocks to search - * @return Whether the blocks were found - */ - public boolean isBlockBelow(String oreDictionaryName); - - /** - * Generate plant seeds with the given parameters. - * - * @param crop plant - * @param growth plant growth stat - * @param gain plant gain stat - * @param resistance plant resistance stat - * @param scan plant scan level - * @return Plant seed item - */ - public ItemStack generateSeeds(CropCard crop, int growth, int gain, int resistance, int scan); -} diff --git a/src/api/java/ic2/api/energy/EnergyNet.class b/src/api/java/ic2/api/energy/EnergyNet.class deleted file mode 100644 index 197104654adb0ed888e8f30094f0c97e2892663f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmZ8c%T5A85UgGn7FPu1Wb_BrgA=)GxEM)DHgJG&pB*RIWSuq3VB%+aBJtn{_)*55 zjUk3hS66lQ>-*>P3&0SA6bfgc5S=X{X+uL>pp-(PAaSsT#7aHZ&;v>$S&B-)7D$}fI8(E!?X9-!RQ+ol z_yPPV#O$Vui%CSe_<46`-kUG`=dbTS0N?;#v|zsl&l$8*G_lN(!B=lkpy9bJFwx?~ z@C&80G5>6zLCsVenekkhZ~R@RlGC9&5Bz~l4!Agz91GOxB_|i;Vb2|`LcpL+Vo^Do z>9xdoJbUx%$~F`WBh4kZ9zFLO_@5Z8MKUdfDK#bh;Z1y4%WHAq;XhM5^5WR>?|E}y zS)3>y4pbtH7*YCGzE6@BTiv6wENj7Br>!wpQ=HZRvJzbuXvJ5ldu|#Gj&2Z9Yt8j( zGH4PPO^reC|CtsHpTRm29;-1%Mi`=fdlTB)!py^IQ##`^KkMSCOhXz2gGqfwu9s7* zbU}WDiI@s56(4F@n8;`pd9d)(|H5F?HRl3#U#mQps2Mc8(C^MH_QD#5iae~P>xT@s zHKy|1pzcj+b3bB&a%#=5{%XY4CvlAC4_CKeJ7uwiryZ$MC)lUYfx$+_@!D3#V7J!G z%7K!0#b=^O`TNlX6VqhCV1@nz0G$SdThIU?ynTgDXpw!DtShia_f2Te&v)p&4jt!z m7d9Mj!j{8(aNpqr*mn33b{sx}U5Ah1iNigM#Q4-HJo^ntVqO{m diff --git a/src/api/java/ic2/api/energy/IEnergyNet.java b/src/api/java/ic2/api/energy/IEnergyNet.java deleted file mode 100644 index 4c79aa746..000000000 --- a/src/api/java/ic2/api/energy/IEnergyNet.java +++ /dev/null @@ -1,90 +0,0 @@ -package ic2.api.energy; - -import java.io.PrintStream; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import ic2.api.energy.tile.IEnergyTile; -import ic2.api.info.ILocatable; - -/** - * Interface representing the methods provided by the global EnergyNet class. - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public interface IEnergyNet { - /** - * Get the EnergyNet-registered tile for the specified position. - * - * The returned tile is always the main tile implementing IEnergySource/-Sink/-Conductor, which - * is also what was registered to the energy net. - * - * For multi-blocks (IMetaDelegate) the connectivity handling is being done by sub tiles that - * may or may not include the main tile. Sub tiles have to be queried separately through the - * getSubTile method. - * - * As a consequence of always returning the main tile, the supplied position may not match the - * returned tile's position. - * - * Connectivity checking -> IEnergyEmitter/IEnergyAcceptor -> getSubTile - * Logic like energy I/O -> IEnergySource/IEnergySink/IEnergyConductor -> getTile - * - * @param world World containing the tile - * @param pos position - * @return main tile for the specified position or null if none is registered - */ - IEnergyTile getTile(World world, BlockPos pos); - - /** - * Get the sub tile at the specified position. - * - * See the description of {@link #getTile} about whether getTile or getSubTile is applicable. - * - * @param world World containing the tile - * @param pos position - * @return sub tile at the specified position or null if none is registered - */ - IEnergyTile getSubTile(World world, BlockPos pos); - - void addTile(T tile); - void addTile(T tile); - - void removeTile(IEnergyTile tile); - - World getWorld(IEnergyTile tile); - - BlockPos getPos(IEnergyTile tile); - - /** - * Retrieve statistics for the tile entity specified. - * - * The statistics apply to the last simulated tick. - * - * @param tile Tile entity to check. - * @return Statistics for the tile entity. - */ - NodeStats getNodeStats(IEnergyTile tile); - - boolean dumpDebugInfo(World world, BlockPos pos, PrintStream console, PrintStream chat); - - /** - * Determine the typical power used by the specific tier, e.g. 128 eu/t for tier 2. - * - * @param tier tier - * @return power in eu/t - */ - double getPowerFromTier(int tier); - - /** - * Determine minimum tier required to handle the specified power, e.g. tier 2 for 128 eu/t. - * - * @param power in eu/t - * @return tier - */ - int getTierFromPower(double power); - - void registerEventReceiver(IEnergyNetEventReceiver receiver); - void unregisterEventReceiver(IEnergyNetEventReceiver receiver); -} diff --git a/src/api/java/ic2/api/energy/IEnergyNetEventReceiver.class b/src/api/java/ic2/api/energy/IEnergyNetEventReceiver.class deleted file mode 100644 index c39d5b09a78989c1836c6e3b00efea7d90b07247..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 216 zcmZ{eF$%&!6h!C8#Kcq{z*0mT7t&f;L=Z$FihbOC!iKmjAuf0|3lHF-#En=9R`X}( z@tNoA{s5354iSYI5CWr@ML`%(H%cZVzbL_)oAM@FRkK*9A9HZ`Vs<1%MrV9BmI?9R zTpP(NR}n^EaLa9KS+^NWR+gK2mD`*!`T6~aCJZ}X)VVIj?o_dC`vijLHUpkd=)nh^ L2A#U5-{lD3MwK~T diff --git a/src/api/java/ic2/api/energy/IEnergyNetEventReceiver.java b/src/api/java/ic2/api/energy/IEnergyNetEventReceiver.java deleted file mode 100644 index 420eb10ff..000000000 --- a/src/api/java/ic2/api/energy/IEnergyNetEventReceiver.java +++ /dev/null @@ -1,20 +0,0 @@ -package ic2.api.energy; - -import ic2.api.energy.tile.IEnergyTile; - -/** - * Interface for handlers being invoked after energy net changes. - * - *

Normally it's enough to listen for the neighbor update, which also happens, but using this - * mechanism allows listening to events that are not adjacent. Mechanisms that inject energy over - * a distance or provide compatibility with 3rd party energy may benefit from it. - * - *

The events will be fired after validation and only for successful changes. - * - *

WARNING: The events may (and will) be invoked from arbitrary threads. It's up to the - * implementation of IEnergyNetEventReceiver to properly synchronize them. - */ -public interface IEnergyNetEventReceiver { - void onAdd(IEnergyTile tile); - void onRemove(IEnergyTile tile); -} diff --git a/src/api/java/ic2/api/energy/NodeStats.class b/src/api/java/ic2/api/energy/NodeStats.class deleted file mode 100644 index eceb34029f314b4b047f8061329202be61ca273d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 675 zcmZ`#%TB^T6g@**%A*2;AmS^ogf48tR^vuAF(I(Pupe-OLrQB(A@Qq>iNwT(AK*tB z?+nO-;O0Kg%z4aw|9pM{XyP=3B&umxI8ddg%At)T8^;VO5r}B?avw0T7DIZuc4skz zJrDhuj|4;VN(M5%rlHCqBENeMD)N1J|V?+IOKkxM^f!8(2Sqt zl%dv^!=}fdrMGnPIwaDIc|5&j$c{vOyUt?N8(cV*8X3nOfQ^8LvbgSYi_M{ zG3ImbAd3?RHc}4Ks$`I2sQ%~9P*5z-=fTM94#r|gucrikoY7Y$=@Si@N{uE{3F=Oo zx>IyGVA!E;LN{&dW%mQjJzpT1fdBvi diff --git a/src/api/java/ic2/api/energy/NodeStats.java b/src/api/java/ic2/api/energy/NodeStats.java deleted file mode 100644 index db33da7df..000000000 --- a/src/api/java/ic2/api/energy/NodeStats.java +++ /dev/null @@ -1,25 +0,0 @@ -package ic2.api.energy; - -public class NodeStats { - public NodeStats(double energyIn, double energyOut, double voltage) { - this.energyIn = energyIn; - this.energyOut = energyOut; - this.voltage = voltage; - } - - public double getEnergyIn() { - return energyIn; - } - - public double getEnergyOut() { - return energyOut; - } - - public double getVoltage() { - return voltage; - } - - protected double energyIn; - protected double energyOut; - protected double voltage; -} diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileEvent.class deleted file mode 100644 index 5d1523da6b2a9968d1b7617d3ac6d95b4f6c2a11..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 923 zcma)4T~8B16g{&oY`e5p3Mhz_Rw`~=WfER7yqKDp)W)Qw#K&P7*3o6Q*-lY@mL^Kn zL?2E3QR5)th#E~sl?ZttJh9XhczI5iz3pHlg&Qi-WsSTes(zP~qQyv%*ym~4|X?{A+ zT?TIuPm(}BPKR2~WbM2ZXTrsH3HRW;XqC`Lr-U-@TkQcu%>sBNbjbUYD0&tvZDi7Y z6UdQKv8JN0<0Lw+t8raZ+@|i7uz(WnB(uN2w$0Ge((qGSNRWsVa}p<^1; z|27fTsrgrg?RVMmTUQ_$R{Y-VJOh&`9qzS;XwYx==-)Fe+DoJw9SYaTQz7ddIXLt- z+wZ_SAK^H-K(74(`EMwH#@zGj`~}>v?aq4?-V!c{>m;klldKTWB5GK|7M4i^ZcMo- dzC;$WrZpKwEt>r#u;XIIC7^BTCP@dYzW`;t@<0Fp diff --git a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java b/src/api/java/ic2/api/energy/event/EnergyTileEvent.java deleted file mode 100644 index 2bb1ac960..000000000 --- a/src/api/java/ic2/api/energy/event/EnergyTileEvent.java +++ /dev/null @@ -1,24 +0,0 @@ -package ic2.api.energy.event; - -import net.minecraftforge.event.world.WorldEvent; - -import ic2.api.energy.EnergyNet; -import ic2.api.energy.tile.IEnergyTile; - -/** - * Base class for energy net events, don't use it directly. - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public class EnergyTileEvent extends WorldEvent { - public EnergyTileEvent(IEnergyTile tile) { - super(EnergyNet.instance.getWorld(tile)); - - if (getWorld() == null) throw new NullPointerException("world is null"); - - this.tile = tile; - } - - public final IEnergyTile tile; -} - diff --git a/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class b/src/api/java/ic2/api/energy/event/EnergyTileLoadEvent.class deleted file mode 100644 index 9ccd40e3e27ccad43bee1cb2377b5491deda6c57..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmah_O-sW-5PcKVMAI+rL3=HDs4aA{*Gex^K?q(fy>HV&S7K6PTIkR6BzW)#_@l(x zR1jjNvoJgF?aZ6m`TTnS05C)=zyX>*j(waEyepHKd`vj+h9(*+y)=pw&K@=@H!-W* zNdcx3k1l2e_c~oLp&6Ql?^e%q&Zc@E3)2eINXIjs8H;~NH-9uQgkD*i*PP_)S2|4f zVq&=wp}K8vJ6;kx<5rX@4l|_6b6@>N<)xncq>l$2C2;I^z{~bkEvM05e7#%pW yP-`SddWiP~jfHpQ_Imv{(5plaeDOiSo=ILChk{SHSvZmxYaXho6-&$S(u&ocIM6Oe0;vW1L&X`VGWHCJ0W%n!KJaL=n;;NW0Q20elm(J=XWovFe$5H zzXT(RyC-9Uf0a#{(1?xY>)GRk^O2sU!ZhP7(dk&{#^Dv|7x(6wa8{M(Iom>gOW)cw z)6>3VyM)?u0N3+^(5e>yn2QkIWV1Zsfm9F1kk4QqiKuGj9tb>l?LYBeAFYtRj7!ytW z06)rDyLjP3xXg6dbk|fretti{0UTf}jRcmHSV_aeY6@dmOCpm*Rv>YreQk;YWBGD< zuPzWjZQm+^>5BH%Rqv^xf|_i!h|E>mo@~`+phN#3jGKGiWl~l9j{G(lHIN% z>QuCM;L47672&%Vw-czQY`7)a)!umo)znUyS`ZlbWJh}1ya6seoKFSzkdSQM=6IimNHn*!NN)wDXeCY&!8ZXu4-SKLxEJeR@=E0 zNFH}@l)zM7`|4uw&{9EDwmM{H>s?QFE@hy@ct|GAo$k}6(H#UHMRv{iRdC#q{k|f< zTi4#cD|^~iq;H?xUZC2tZlx8C?@6xX(Lp5Y7jzD<}V4cthe9$rth#a$F}PO$A9*F^2<;lPkveU}K6A g9Wad@KziBl~4$&Y79#yywiBU%!9+1Tc@K6g12wF$_J0JGd*&dAah3d(ylw zO%56sY1s<{vezhPk95S+eT3@H#H(F~guIv259vw?Z?U+hTx% zQ{~=B(X!2rPP1&fhA21a87(>$(by8MCGF5T=xtkV1=A7Y%jjeMjJ?(&Cm#i{OuZ|l zjMPmpNa`^ETs9X05L6(Z%>{WocF_@41u4tk6%DH@JZ718?80`(-g#>`{LNw46xDUt zX>P0<%rjfGO;2yKHWgRYJl!sPI(H0FFF4JX)3K{dvWPMI6-=Cbn9;wumS-A{&tH$i zk3!vCHWnjRWaS9YW0_3bv%EcB_RN~UWYtqaQ?Ap;X6WrKbMCX)6&l8HUc)HPs94l6 zA&p5nOvzyyH#OvtS1@^Ut1`f3f1Up+N?&-bB&gQ>$pL5 zKkhpQzH+k{SBQiQbdD3tcj73q&p1n!LwREN5$g&~F);9gS-tF`4;>RLJ%Lz0d`R64 zsTy-149M{=IYaHhD^}|@Yx$;!t{tOGPe5l!h4dqu6J2tkd5fCg^-%w(nJpSpKQLdJ zaV9@|09A^f-N#Uu9jJbfI6fkcPd~DEP&jT1&W1jIE!1f25=iAoJYAzv&b1FafwThey implement the necessary forwards to make BasicSink/BasicSource work, provided the sub - * classes always call those forwards when overriding them. - * - *

If it's not desirable to use BasicEnergyTe, the delegates like BasicSink can also be used - * directly, provided they receive the forwards like implemented here. - * - *

Example usage, machine with 10k EU buffer, tier 2, 50 EU/tick, 100 tick process time: - *


- * public class MyMachine extends BasicEnergyTe.Sink implements ITickable {
- *     public MyMachine() {
- *         super(10000, 2);
- *     }
- *
- *     {@literal @}Override
- *     public void readFromNBT(NBTTagCompound nbt) {
- *         super.readFromNbt(nbt); // important: keep super call
- *
- *         this.progess = nbt.getInteger("progress");
- *     }
- *
- *     {@literal @}Override
- *     public NBTTagCompound writeToNBT(NBTTagCompound nbt) {
- *         nbt = super.writeToNBT(nbt); // important: keep super call
- *
- *         nbt.setInteger("progress", progress);
- *
- *         return nbt;
- *     }
- *
- *     {@literal @}Override
- *     public void update() {
- *         if (hasWork() && getEnergyBuffer().useEnergy(50) && ++progress >= 100) {
- *             progress = 0;
- *             doWork();
- *         }
- *     }
- *
- *     private int progress;
- * }
- * 
- */ -public class BasicEnergyTe extends TileEntity { - public static class Sink extends BasicEnergyTe { - public Sink(int capacity, int tier) { - energyBuffer = new BasicSink(this, capacity, tier); - } - } - - public static class Source extends BasicEnergyTe { - public Source(int capacity, int tier) { - energyBuffer = new BasicSource(this, capacity, tier); - } - } - - protected BasicEnergyTe() { } - - public T getEnergyBuffer() { - return energyBuffer; - } - - // forwards >> - - @Override - public void onLoad() { - energyBuffer.onLoad(); - } - - @Override - public void invalidate() { - super.invalidate(); - - energyBuffer.invalidate(); - } - - @Override - public void onChunkUnload() { - energyBuffer.onChunkUnload(); - } - - @Override - public void readFromNBT(NBTTagCompound nbt) { - super.readFromNBT(nbt); - - energyBuffer.readFromNBT(nbt); - } - - @Override - public NBTTagCompound writeToNBT(NBTTagCompound nbt) { - return energyBuffer.writeToNBT(super.writeToNBT(nbt)); - } - - // << forwards - - protected T energyBuffer; -} diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.class b/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.class deleted file mode 100644 index 66d017eef03750fc4f1113571987d62b043a6f7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5890 zcma)AXLKA_8NH(&X;!O|WXp256uD}(D?E-J1&o6oTb3OqlHx?N6B$xQyQB5QTf}N5 z+X*F<5FnI<7RxCRAPFU;T9O@;Mu{QR5Xw&uhr@pk91e#Ahj70)TV_{l>>qmb=Iwjm zckfr<=#Brr_%eX4_(KSn$q?3HCWuq=d`KicY~T@j zxm$)uW%#OW{8~L8!`Ef@4H>=}!sB?N0Z-yvGJIRszGL9K4G7~t8J;rmy%3^!T83u~ zJR8JwA#BDy2A((Yf`QW-79}$=JLhK72eO%IH|}ILv<%!~Puo_~PA9DE$L?@qxg8p6 zk7csSxQ5jOX(wl;+_V$R+T%G(En7FqkK7fQ$V_TjSFvX*=O(R`ojYRfp|+z3GLzgI zjM)=*%*~z9pzYOQI%y}HI5C{dWF4w$u;XzjK9cF9Hf}hqq3$X-?dEoB=n7Yer*y|j z=P1e=;j~XpckJytq(Se^#2pRI1H?Ntl^S!hBlcL5D=h=0ojhb`U3t$h>bWB>;dc(W zv8|Rp;aVOhYa;86+hf)qd(w>&5MhcQa;TfIv(&6%<0V1T&=xMrcGKe-t6yN`1cHZm zgfuH84ktQxkDJM~el*V$ixw zdLU!dK_NFiZ6{stx5iAm_sCTG=)rVS{n(Io?D)QHCN;EYgvP1FmmbSm{AI*W^kz~M znW=PqhsX}(?8L(0sj``VrCysLj%D4PGm=qi_Fama3UgEy-jHx|y~W@pZ-!^Xq<>8h zE2A}YqZbc_ux;kH@|8L}MS=_w*}O07I3>yTjB#%>2~nbCLCj7coMZ?~ka?>N{raiW zQeEtbolVdmYb)u}5-F>ngL37LE*`9%6t8M%ub^GAl^WviWI^z{iwNGUBq!aJn=>$P z;0&!pZmI;ZTu6|2Rp|2vq_>+jz?G__VZ(ymRbrHuk?dF5qD}=Tish=2%7?~sjHV$w zMZ>gGV5xu&=dx}(!CV!L!*2TMh$}UYUhUT)M~5?0*_h+4hP;=3%x=o5$oI`6)Wj}a zE5i*Yu0W58cZ0IqOZtYUlF0)ZH=T2`eaBxIshYB8R;k&L2OH6DEF)*O~Z^ib)ga@e>nQ3G0sXPOvbSO#BpYnD`lf zZekn>1HUlwOZ>{jow&=y2XL2xUz>OnzhMxWaPgLj6n<-BT5v8e;H)T=CUTh4u)bV* zj7fOOWM2+N&po{1+mp%a+-#f<&=C$v%uC1Q$)j>^5f+>&U#VM@BPr1WM9v^ zF)0{>cG^xzRxI_mn0)3)We&QNH#(_|w1LG%F{*!Y(9q;g_Q$sFp0?ej*Ik)itUlo~ zK;s#fEsN$&WzyDQ;r_5sR#|`g4)qO<+_vZ7u!f%U;^CbePbCXyRkR^Jvg6d+@S&5mcEaE*Cweb?bsY2YuLR08YItMbhB~xJVdocsE`?b=S)0|9wO&10{nV4?n$K0-xeHfA z!*0Iy^G)Z|h(yEl(4OP8275S$_ypEb!Fu#^)`0*=1AEcOr_AJT)VxiB zx`9ChLk6y=XBr9p0B*<==;c$+n~~FKI7R2q!4xBTxIEYHLIa~f^qbz^ynfLTfY!i8 zwswxYxiCqHBCy*N*hztnr_po@ZD-ItgXPa-(K#$0rM+6_u;iwQK8uEu!c}xP7%f3u z!_UfoET=;^kxCRpJ^{uRT$ht2Dg&IZDepe8H|xZ+^4q+gM$R-0XR&n(otxQlEU&itQd@Rx2&AQ zs#&Zq5o%ILQ(G$?Q4zex~9BO2RUg33WwCbt)$$E^e<1 zWOXHwnW{kS>Og!>@qj!|AWvKX$QUc20ErcWT#?V1kXS_QpQuFhv=2?F7_o6Ud9&Qf ztPw|U$tT+kYMY+vEQ)*ZQ8X4`u8E9NMQ4n$)G2zrME87qh6#Qa8*q-L=p`TiEk#3a zVI&KFNqrqP=5o$?0nXzX$_G@lu;_g7AsG6T&;w5u)p%Y$?-T7Wv?bBCsA;@ftaPL( zdz>~EjvbNCIdsgBkylvAHSm5AA;Vh{Rf)^R}0(}b6>&LRxr<{d>*R~ zw-^H3^%Z*4$w$O+3SDD(g?{p3)P=X}LTQEWBjkgxliQ{sw(E-A3SB~of~wGKr`>?R z67=7&7Jp~k`Uey6pUj?r(YF6qRJ~SqtVs1(o+{xZqo}TBK@`%uBE17aA-yEf{I*<7 zR7aZ#u*n;Ezk!K>_BK_PmTL>kTD!6mKRZ1usjG<8nnkon{dso0d6sxirO^4ho)$!d z7E(~XuD2);)z|g-y;enNs3bI0DYThF7ymz@HS&#^7y1VA$kl3;@B*(PJi{>K>{WyZ zBGI$x(jeCf<1kJ&CQ}#^?;%y^T?BoC7Z$+%|`Is7<`0Y#wc~=CS3KQs3Ro1_5m; zLfSI4Xv?vN!L&(RiEY{{eh{xlueJu)X>AzN+HteiQ4H1=X4f(HX^nnb#F=-`8}*rr zS=+UtUf0<)PLPW(pU8QB-F%8CYE*^rnvALtns?*#>|T=>rptHrMNdY3#x0!G@Ildn G5B(1g5%(|v diff --git a/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java b/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java deleted file mode 100644 index fc913bafe..000000000 --- a/src/api/java/ic2/api/energy/prefab/BasicEnergyTile.java +++ /dev/null @@ -1,309 +0,0 @@ -package ic2.api.energy.prefab; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import net.minecraftforge.common.MinecraftForge; - -import ic2.api.energy.event.EnergyTileLoadEvent; -import ic2.api.energy.event.EnergyTileUnloadEvent; -import ic2.api.energy.tile.IEnergyTile; -import ic2.api.info.ILocatable; -import ic2.api.info.Info; -import ic2.api.item.ElectricItem; - -/** - * Common functionality for BasicSink and BasicSource. - */ -abstract class BasicEnergyTile implements ILocatable, IEnergyTile { - // ********************************** - // *** Methods for use by the mod *** - // ********************************** - - /** - * Constructor for a new BasicSink delegate. - * - * @param parent TileEntity represented by this energy sink. - * @param capacity Maximum amount of eu to store. - * @param tier IC2 tier, 1 = LV, 2 = MV, ... - */ - protected BasicEnergyTile(TileEntity parent, double capacity) { - this((Object) parent, capacity); - } - - protected BasicEnergyTile(ILocatable parent, double capacity) { - this((Object) parent, capacity); - } - - private BasicEnergyTile(Object locationProvider, double capacity) { - this.locationProvider = locationProvider; - this.capacity = capacity; - } - - protected BasicEnergyTile(World world, BlockPos pos, double capacity) { - if (world == null) throw new NullPointerException("null world"); - if (pos == null) throw new NullPointerException("null pos"); - - this.locationProvider = null; - this.world = world; - this.pos = pos; - this.capacity = capacity; - } - - // in-world te forwards >> - - /** - * Forward for the base TileEntity's update(), used for creating the energy net link. - * Either update or onLoad have to be used. - */ - public void update() { - if (!addedToEnet) onLoad(); - } - - /** - * Notification that the base TileEntity is loaded, used for creating the energy net link. - * Either update or onLoad have to be used. - */ - public void onLoad() { - if (!addedToEnet - && !getWorldObj().isRemote - && Info.isIc2Available()) { - MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); - - addedToEnet = true; - } - } - - /** - * Forward for the base TileEntity's invalidate(), used for destroying the energy net link. - * Both invalidate and onChunkUnload have to be used. - */ - public void invalidate() { - onChunkUnload(); - } - - /** - * Forward for the base TileEntity's onChunkUnload(), used for destroying the energy net link. - * Both invalidate and onChunkUnload have to be used. - */ - public void onChunkUnload() { - if (addedToEnet - && !getWorldObj().isRemote - && Info.isIc2Available()) { - MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this)); - - addedToEnet = false; - } - } - - /** - * Forward for the base TileEntity's readFromNBT(), used for loading the state. - * - * @param tag Compound tag as supplied by TileEntity.readFromNBT() - */ - public void readFromNBT(NBTTagCompound tag) { - NBTTagCompound data = tag.getCompoundTag(getNbtTagName()); - energyStored = data.getDouble("energy"); - } - - /** - * Forward for the base TileEntity's writeToNBT(), used for saving the state. - * - * @param tag Compound tag as supplied by TileEntity.writeToNBT() - */ - public NBTTagCompound writeToNBT(NBTTagCompound tag) { - NBTTagCompound data = new NBTTagCompound(); - - data.setDouble("energy", energyStored); - tag.setTag(getNbtTagName(), data); - - return tag; - } - - // << in-world te forwards - // methods for using this adapter >> - - /** - * Get the maximum amount of energy this sink can hold in its buffer. - * - * @return Capacity in EU. - */ - public double getCapacity() { - return capacity; - } - - /** - * Set the maximum amount of energy this sink can hold in its buffer. - * - * @param capacity1 Capacity in EU. - */ - public void setCapacity(double capacity) { - this.capacity = capacity; - } - - /** - * Determine the energy stored in this buffer. - * - * @return amount in EU, may be above capacity - */ - public double getEnergyStored() { - return energyStored; - } - - /** - * Set the stored energy to the specified amount. - * - * This is intended for server -> client synchronization, e.g. to display the stored energy in - * a GUI through getEnergyStored(). - * - * @param amount - */ - public void setEnergyStored(double amount) { - energyStored = amount; - } - - /** - * Determine the free capacity in this buffer. - * - * @return amount in EU - */ - public double getFreeCapacity() { - return capacity - energyStored; - } - - /** - * Add some energy to the output buffer. - * - * @param amount maximum amount of energy to add - * @return amount added/used, NOT remaining - */ - public double addEnergy(double amount) { - if (getWorldObj().isRemote) return 0; - if (amount > capacity - energyStored) amount = capacity - energyStored; - - energyStored += amount; - - return amount; - } - - /** - * Determine if the specified amount of energy is available. - * - * @param amount in EU - * @return true if the amount is available - */ - public boolean canUseEnergy(double amount) { - return energyStored >= amount; - } - - /** - * Use the specified amount of energy, if available. - * - * @param amount amount to use - * @return true if the amount was available - */ - public boolean useEnergy(double amount) { - if (!canUseEnergy(amount) || getWorldObj().isRemote) return false; - - energyStored -= amount; - - return true; - } - - /** - * Charge the supplied ItemStack from this energy buffer. - * - * @param stack ItemStack to charge (null is ignored) - * @return true if energy was transferred - */ - public boolean charge(ItemStack stack) { - if (stack == null || !Info.isIc2Available() || getWorldObj().isRemote) return false; - - double amount = ElectricItem.manager.charge(stack, energyStored, Math.max(getSinkTier(), getSourceTier()), false, false); - - energyStored -= amount; - - return amount > 0; - } - - /** - * Discharge the supplied ItemStack into this energy buffer. - * - * @param stack ItemStack to discharge (null is ignored) - * @param limit Transfer limit, values <= 0 will use the battery's limit - * @return true if energy was transferred - */ - public boolean discharge(ItemStack stack, double limit) { - if (stack == null || !Info.isIc2Available() || getWorldObj().isRemote) return false; - - double amount = capacity - energyStored; - if (amount <= 0) return false; - - if (limit > 0 && limit < amount) amount = limit; - - amount = ElectricItem.manager.discharge(stack, amount, Math.max(getSinkTier(), getSourceTier()), limit > 0, true, false); - - energyStored += amount; - - return amount > 0; - } - - // << methods for using this adapter - - // ****************************** - // *** Methods for use by ic2 *** - // ****************************** - - // ILocatable >> - - @Override - public World getWorldObj() { - if (world == null) initLocation(); - - return world; - } - - @Override - public BlockPos getPosition() { - if (pos == null) initLocation(); - - return pos; - } - - private void initLocation() { - if (locationProvider instanceof ILocatable) { - ILocatable provider = (ILocatable) locationProvider; - world = provider.getWorldObj(); - pos = provider.getPosition(); - } else if (locationProvider instanceof TileEntity) { - TileEntity provider = (TileEntity) locationProvider; - world = provider.getWorld(); - pos = provider.getPos(); - } else { - throw new IllegalStateException("no/incompatible location provider"); - } - } - - // << ILocatable - - protected abstract String getNbtTagName(); - - protected int getSinkTier() { - return 0; - } - - protected int getSourceTier() { - return 0; - } - - private final Object locationProvider; - protected World world; - protected BlockPos pos; - - protected double capacity; - protected double energyStored; - protected boolean addedToEnet; -} diff --git a/src/api/java/ic2/api/energy/prefab/BasicSink.class b/src/api/java/ic2/api/energy/prefab/BasicSink.class deleted file mode 100644 index 6615ef962ceea89ac6ea1fc68706e9704f987aaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4523 zcmbVPYj@Pv72VhKkUhu-92`On*br03LqNeH3B{CvU+uKUNn=AGP1;`1h_UP$X^=Gr z`XKL+2T7XJ2We^3JeqvzT5Z=#n5<^4=6ilr(sQn4X)G&dRzLWRbanPQ`|fk@!(V;< zpZ@|F!6!Kk;i3jt!*UKOc%5kQ?+TksY%b@}fh%3O55HjFU$XfXzy6xd)f}G1bDeme zhhJdxBAb`kyv*hmHrLp^%H}mTud{iB&2=_!vU!Wm+iZTr<{dV_WphKr?=<{g!yg3F zo@KfMq9~9(ZrPT1LZFbJwoT8dS+-en|KG@V!V*(ysVv+gZVDxs%brzS8Ji4f?|6*h{# z&t%Q=Jkw2_&7|F^O_9iUWpwx{0nPM%1%^V|Hi#(DRkmES{nn6~0nJz1fy-9#xP z4JjEdjBXm6nfK;oWk%M>XIp-FdQq-Oqblu+G3&W3hYzJ1TmI~Z$Z72=N~oL80Xu6pmegEu>OHI`{@^LnIZomY6h zB<(ZNXqPO9gOD@f5 z&Y2mTQysfjOncrl=nK_k+^N;6isjL`-U%+Gw`hy z)sZwI>I)jpS@w#oT4m``IkJvDt-fU&b$=u`>onYwIYmoLpeNkg4sq+~$m7pc!>Eml z)v8&M)l+VzQKM~d@-nYlwNAE2PJXYAHLPmcbUDTnMGjaD@=ktiP{%F&h0R}eyoV>) z>2Er|gZ=#UKAR789L9)_4>6+QBOQOo$F!h|<0BzO9kZCzaRz5~Jc)BU&f_T^Kf%*F zo?-J-{7lEsQPd$ZucO3IWqvaG=>jS`7GUXE#FCCGn;ILN=?>gs=coOC0}sD__z+qj zsdW$IB`k2?+MZ#Db;p>%_SJl`13_TNT71h|6c}9lZT;dF7>;*WA^}>c)Js`eubVct z*1`Pxy=DD&6SM&BIy-5bUx$c3cY2QBGy;7|kty}A=ro8a;8QylpGJ!giHAh&$m8kh zrrK9lH-w(3rBBoONDHbaFAHSyyia2f-GYWdjX-~CZe6-p_0w}6!(9N2yEKo6G`}0r{Did35_O|+;Qrwz^uA1zoTO zO2FmV*MAGUr9>*s6BQ(im_}1sn9ghQT^8fl2kf15@}uAq0MaB3W+aqa-|IdwL3=qMQDDDxYKX zKVy-vtH`?V8AKNNA$}A@ITsXAFPx_c`O;?;FN(qcZ2<2ehZ`!6-{gA8P{%a!Vir11 z2TiVHhMv+i`WPM$vKaKsUKyg9i%2yv)-`yUXj`bw;_NbNoW^J8!#GLK}0oqVa z&W+NIt's designed to be attached to a tile entity as a delegate. Functionally BasicSink acts as a - * one-time configurable input energy buffer, thus providing a common use case for machines. - * - *

A simpler alternative is to use {@link BasicSinkTe.Sink}, which requires injecting into the - * type hierarchy (using it as a super class). BasicSink however can be added to any class without - * inheritance, but needs some forwards for keeping its state and registering with the energy net. - * - *

The constraints set by BasicSink like the strict tank-like energy buffering should provide a - * more easy to use and stable interface than using IEnergySink directly while aiming for - * optimal performance. - * - *

Using BasicSink involves the following steps:

    - *
  • create a BasicSink instance in your TileEntity, typically in a field - *
  • forward onLoad (or update), invalidate, onChunkUnload, readFromNBT and writeToNBT to the BasicSink - * instance. - *
  • call useEnergy whenever appropriate. canUseEnergy determines if enough energy is available - * without consuming the energy. - *
  • optionally use getEnergyStored to display the output buffer charge level - *
  • optionally use setEnergyStored to sync the stored energy to the client (e.g. in the Container)
- * - *

Example implementation code: - *


- * public class SomeTileEntity extends TileEntity {
- *     // new basic energy sink, 1000 EU buffer, tier 1 (32 EU/t, LV)
- *     private BasicSink ic2EnergySink = new BasicSink(this, 1000, 1);
- *
- *     {@literal @}Override
- *     public void onLoad() {
- *         ic2EnergySink.onLoad(); // notify the energy sink
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void invalidate() {
- *         ic2EnergySink.invalidate(); // notify the energy sink
- *         ...
- *         super.invalidate(); // this is important for mc!
- *     }
- *
- *     {@literal @}Override
- *     public void onChunkUnload() {
- *         ic2EnergySink.onChunkUnload(); // notify the energy sink
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void readFromNBT(NBTTagCompound tag) {
- *         super.readFromNBT(tag);
- *
- *         ic2EnergySink.readFromNBT(tag);
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void writeToNBT(NBTTagCompound tag) {
- *         super.writeToNBT(tag);
- *
- *         ic2EnergySink.writeToNBT(tag);
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void update() {
- *         if (ic2EnergySink.useEnergy(5)) { // use 5 eu from the sink's buffer this tick
- *             ... // do something with the energy
- *         }
- *         ...
- *     }
- *
- *     ...
- * }
- * 
- */ -public class BasicSink extends BasicEnergyTile implements IEnergySink { - /** - * Constructor for a new BasicSink delegate. - * - * @param parent TileEntity represented by this energy sink. - * @param capacity Maximum amount of eu to store. - * @param tier IC2 tier, 1 = LV, 2 = MV, ... - */ - public BasicSink(TileEntity parent, double capacity, int tier) { - super(parent, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - } - - public BasicSink(ILocatable parent, double capacity, int tier) { - super(parent, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - } - - public BasicSink(World world, BlockPos pos, double capacity, int tier) { - super(world, pos, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - } - - /** - * Set the IC2 energy tier for this sink. - * - * @param tier IC2 Tier. - */ - public void setSinkTier(int tier) { - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - } - - // energy net interface >> - - @Override - public boolean acceptsEnergyFrom(IEnergyEmitter emitter, EnumFacing direction) { - return true; - } - - @Override - public double getDemandedEnergy() { - return Math.max(0, capacity - energyStored); - } - - @Override - public double injectEnergy(EnumFacing directionFrom, double amount, double voltage) { - energyStored += amount; - - return 0; - } - - @Override - public int getSinkTier() { - return tier; - } - - // << energy net interface - - @Override - protected String getNbtTagName() { - return "IC2BasicSink"; - } - - protected int tier; -} diff --git a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.class b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.class deleted file mode 100644 index 8a313fcf61161e1c2b32356c2ff2985ed45d200e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5379 zcmc&%X?qjb89igk8e1OB5`+NQURV{l_#+ zX6GHt&sS~7DthLMpZD#GWjVg>-^?%Z@uYg3nk^J2&TB}{xFt)&)_J-wG^)#%w`49? zII?5jEt-|{rf19V=3vslY}Yl6&)dagd9!BcEywc8H}f^mS}~XN(`MZ+E)wIS0yd=~ zRWm)-)-cu;D7IKMYi5yH+2X8*-kN(|+TF6~o5icA&6)zDSoxENk!%}??X0-@f?)Oq zZ>zmMZ|R`p&l+Z;TwQm)N-6)O*r^EO26@a^P5*L!y5bhEo^|W3BE2d~!*C>`Gns}& z%_VgQBR(-%b^Jxga~cNfmM>%m^P9{D^X04Q-y-iiW`BFx@@K88>6EO}Ni`=dn4KVl zhV5LjihgVGaI|9u;H1;2&XIPfJT*HjQCmv3$0*x%<~+AbrsH6DL~*9gs@ss6)~~r0 z-z-x?0|XT|KseOwHjbTHS+TqjXS(E>*IW3K*;$e0776X>Pkt{f`%7kd!K^a%&g{he z74w>zub56bzvz1cJ*dcuu?4t>!*p7|6k^y8g4B$kS-zrS--e*|)7W3K>&45aCk-Bq zl4<)^HD91na-Eu;xI|)F-Ur^sTb%nFbuLg@Q(T&)f!{Wio+DdZf zJj6*J+`vsE=(_Jn2X|emi;{6a584xYK^mA znu-z~<3gf6%PfhWRNAp_(ux#ZXXbLlxq8m2xF$QHjyRgOooi;rE}1^(A>}&r>RqZ) z3r5m`c;>j@Q7n;t>8L2jz=QZJr!Z7ep;EERX61xeZdAEvoxD-BYJrf3LZ?7#(+#^) zvOLMr&~Q%^%V?debyODUBclfXhUdk+VBkeOC7v&7$h19`w%fi(kvH%F@;d%*;APy= zv1(uquNZJ~#(;xMlHgS_uW1-;Woeaq1XBj?VoJw94Ez(XbN4RH9E)^q;3Ih2z(>K> zmr*oOf@NR@WdoPR*tlZgs+6lpxvD(X@QeWubpt*c2Cj*@F6M^xJ=WDJu(@BLNjaCe z$wczW!IdvGRZD6$9N5f5QL5q4`Xw((Hk^JMhFX~-2Zx3|>*G6CzlPEE?>25H8YZH$ zjs?K2fg(cw~x=JTXQz(M-+P^Il`C0K7UruZdvc)3C7)O-zJB)ka8kQV8;w} zb0$j;BY@l5{077IdzuG0_mHZ2gO`h}9CpbAyvj}T8hAgB&?dpf$lGI5)+7J#hsITR zjP@OXmg0CHN1w?}X4jx)lD9E(7d;p6B5`pI$sN6`NM(|%&{xs7hW+aO8+vv~jPOW0wi!7SJJ82Ip06USwE{tOc zr?3YL*o!3$b8+wEn%$3g(eE*O5GdY_hxlKf-h+qPhCFe@V5{;Z%_h~8wA;%J+wmyh zrf{62LrDCGMS68SrsKT{jnSiTVmzTZc|4Yr?f*Yc4iNPr!aYn*?jtATyC!2tgyT}aL z;vHlL!yNMI3p|B1o>qBsiWj2|*I*lqD!0Lf6l@p<)iXsu4d?M>vx-nHSbGU`;JFCI zQU}D|HpC0hq^1xFNk*O4yhd8Os65?{Pc*69_tP` wzggPATU*o`?%OOloGyOr!~~Cb7tC*@nBZ)8!Th$037+U8m|-{7&hzYl0f)>b?EnA( diff --git a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java b/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java deleted file mode 100644 index 88e9939cc..000000000 --- a/src/api/java/ic2/api/energy/prefab/BasicSinkSource.java +++ /dev/null @@ -1,127 +0,0 @@ -package ic2.api.energy.prefab; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import ic2.api.energy.EnergyNet; -import ic2.api.energy.tile.IEnergySink; -import ic2.api.energy.tile.IEnergySource; -import ic2.api.info.ILocatable; - -/** - * Combination of BasicSink and BasicSource, see their respective documentation for details. - * - *

A subclass still has to implement acceptsEnergyFrom and emitsEnergyTo. - */ -public abstract class BasicSinkSource extends BasicEnergyTile implements IEnergySink, IEnergySource { - public BasicSinkSource(TileEntity parent, double capacity, int sinkTier, int sourceTier) { - super(parent, capacity); - - if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); - if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); - - this.sinkTier = sinkTier; - this.sourceTier = sourceTier; - double power = EnergyNet.instance.getPowerFromTier(sourceTier); - - if (getCapacity() < power) setCapacity(power); - } - - public BasicSinkSource(ILocatable parent, double capacity, int sinkTier, int sourceTier) { - super(parent, capacity); - - if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); - if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); - - this.sinkTier = sinkTier; - this.sourceTier = sourceTier; - double power = EnergyNet.instance.getPowerFromTier(sourceTier); - - if (getCapacity() < power) setCapacity(power); - } - - public BasicSinkSource(World world, BlockPos pos, double capacity, int sinkTier, int sourceTier) { - super(world, pos, capacity); - - if (sinkTier < 0) throw new IllegalArgumentException("invalid sink tier: "+sinkTier); - if (sourceTier < 0) throw new IllegalArgumentException("invalid source tier: "+sourceTier); - - this.sinkTier = sinkTier; - this.sourceTier = sourceTier; - double power = EnergyNet.instance.getPowerFromTier(sourceTier); - - if (getCapacity() < power) setCapacity(power); - } - - /** - * Set the IC2 energy tier for this sink. - * - * @param tier IC2 Tier. - */ - public void setSinkTier(int tier) { - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.sinkTier = tier; - } - - /** - * Set the IC2 energy tier for this source. - * - * @param tier IC2 Tier. - */ - public void setSourceTier(int tier) { - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - double power = EnergyNet.instance.getPowerFromTier(tier); - - if (getCapacity() < power) setCapacity(power); - - this.sourceTier = tier; - } - - // energy net interface >> - - @Override - public double getDemandedEnergy() { - return Math.max(0, capacity - energyStored); - } - - @Override - public double injectEnergy(EnumFacing directionFrom, double amount, double voltage) { - energyStored += amount; - - return 0; - } - - @Override - public int getSinkTier() { - return sinkTier; - } - - @Override - public double getOfferedEnergy() { - return energyStored; - } - - @Override - public void drawEnergy(double amount) { - energyStored -= amount; - } - - @Override - public int getSourceTier() { - return sourceTier; - } - - // << energy net interface - - @Override - protected String getNbtTagName() { - return "IC2BasicSinkSource"; - } - - protected int sinkTier; - protected int sourceTier; -} diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.class b/src/api/java/ic2/api/energy/prefab/BasicSource.class deleted file mode 100644 index fb1c81ef4e3ba7fc740acd1cb94779e0acbf6177..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4746 zcmcInX?GiE6@EsmEsvXpIC1JGw$mn&m8R2%LP?y2dM%1wCtxQbW$RcP%M(j8Vl=Xo z7Rp{qY1zsWAQUKTfpb_6jSuu3_zu5-|I!0I_nnC(kEgEqzz1K=ymO!X-sj%uUHp%K z|MhPGPT{vX9K$EG@Um#+kc8iZru?pp*${IhhXii+;wYZ!#k2TSA3lxea(w-an9mCS zb7DR(E??-u7v<$kVxAZCWic;^`HGkq#e7xFOJZIY^EELl5JMir*TsB8%s0h+OUx@` zzMaK)viNQm-_wxtZOhZ36*Xke+K%m?*HFmMJC<+MY{x2j=8A9lcGa>R-}Y}BOMIMB zkK@zDu`3KP<(4fCyXNV=(5x+6-jcao<;dQ7w`5kYn4T@~;b6*NwHq4lpSMe=46|+< zmScI9n?~KUR?KB%(rnnJMYrjdtZ^n(H$6_P;b>R+Xy_@Kb+g1YNoZO_y6$cWx&B4p zEUi6h)>RUU{4EWK^Q|OoXT>#&lCLkhhRhDW?e{FcuVFG;r484smW``o$0G?hSwW*_ z`m4rd)h(@EavR|sX$8_S6ajR`(vYmXEZUKXPfXA(evriv$+%(pK^d1+dsBJUtA49y z`;8e@@+DWp6YUa&eUMHY#lT~tRI=*6>&23pahkPR*4n9zk3Gf8dsfM^*QMG=TV>lR zriR|KO^|Q9j)vhlY8_K(*j=&wiz_RZXO)BOSe5)3o180q=EmKjRDN1CnK5f_Q-sq` zRA(Isq0nV?VcB0YD+^|gO5K+qo4;Ml!8YSQHX{mGOuJ`CWc#Csyv%$40>x;{j zmEn+HGM&rq(O$FMDyMj`p1a6;*0Zds)>7IU zau+6-G|Wcxc9wmEU)YQ(w^nD{%Hz>O$GEW2o@JJ2J-4R99_=P9mC^4yQ>#s9?XpvK zO){Y%IGVGab+c-hO`mUH62H=6VO~cW3*z%@F|X_R4IX94;?${*jCCyGvW_dbs^i1BrsFAm zM8`+*F&!Tl^9eky!<1ml609UoE2!vLg{|W{)^t?G)WkTF^XNP7BlS%Mq;!-2HWu^IbCH1w$B*uABWm!N~HEdQ6{1V?C3!3NfS9XrLcOyD%g%N z%KOqWXgJQllq?Tk$cFe_zzNz1`SwqaXZd@fa3a46Z6I|U!*3#S?M)=FZ6dWdeFvF= z)E#8+pl1`ke=iKA-azh8=o?7=1$qLf(}g?eA57o6jo!i_z3=%Wqa|^Y_FiOYpQc@A z24#*}IE@O5Trv;w%cDrsUVwpz`72M4@Vcm}r+4#fLOn^=DdP6vJqqz&jt(I4ABIe2 z@mLn`OA_)HMw5!z=~!aB{tv{~NUX*zToS7@L65{5Z%gdV|4wXt3$e2yv462@J*>f8 z;lzVuo7g>&j%yh^(Qa8fY*{*JSw^)i6SOQ7)3S9+;s)jN4B0%3GrWyoz;lY(dDYUn zR?Fsa4(AoKIlLc_tCr0{nwOLmmE_Wl5Hv3XY2KhTFORfp-b5CY9WUMnris+=#46cmI0n4Z5jxQdoxl_Lfcl=G zS}qWwu}br_vKS5Z4x|fz#-86t0^U*qbp=j`0W~~{g%CVNhLTEO;TqA$D{o+r&<}Ew zf3U#gGKW`HnEmR#ua#FHF0yC*-vF2J!7!kq-h*s%QF^b%WRt>&uo!|*hT!Dhy?207 O@B>|d33JuXQ~xglI=7Vo diff --git a/src/api/java/ic2/api/energy/prefab/BasicSource.java b/src/api/java/ic2/api/energy/prefab/BasicSource.java deleted file mode 100644 index dde127fa6..000000000 --- a/src/api/java/ic2/api/energy/prefab/BasicSource.java +++ /dev/null @@ -1,173 +0,0 @@ -package ic2.api.energy.prefab; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import ic2.api.energy.EnergyNet; -import ic2.api.energy.tile.IEnergyAcceptor; -import ic2.api.energy.tile.IEnergySource; -import ic2.api.info.ILocatable; - -/** - * BasicSource is a simple delegate to add an ic2 energy source. - * - *

It's designed to be attached to a tile entity as a delegate. Functionally BasicSource acts as a - * one-time configurable output energy buffer, thus providing a common use case for generators. - * - *

A simpler alternative is to use {@link BasicSinkTe.Source}, which requires injecting into the - * type hierarchy (using it as a super class). BasicSource however can be added to any class without - * inheritance, but needs some forwards for keeping its state and registering with the energy net. - * - *

The constraints set by BasicSource like the strict tank-like energy buffering should provide a - * more easy to use and stable interface than using IEnergySource directly while aiming for - * optimal performance. - * - *

Using BasicSource involves the following steps:

    - *
  • create a BasicSource instance in your TileEntity, typically in a field - *
  • forward onLoad (or update), invalidate, onChunkUnload, readFromNBT ans writeToNBT to the BasicSource - * instance. - *
  • call addEnergy whenever appropriate, using getFreeCapacity may determine if e.g. the generator - * should run - *
  • optionally use getEnergyStored to display the output buffer charge level - *
  • optionally use setEnergyStored to sync the stored energy to the client (e.g. in the Container)
- * - *

Example implementation code: - *


- * public class SomeTileEntity extends TileEntity {
- *     // new basic energy source, 1000 EU buffer, tier 1 (32 EU/t, LV)
- *     private BasicSource ic2EnergySource = new BasicSource(this, 1000, 1);
- *
- *     {@literal @}Override
- *     public void onLoad() {
- *         ic2EnergySource.onLoad(); // notify the energy source
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void invalidate() {
- *         ic2EnergySource.invalidate(); // notify the energy source
- *         ...
- *         super.invalidate(); // this is important for mc!
- *     }
- *
- *     {@literal @}Override
- *     public void onChunkUnload() {
- *         ic2EnergySource.onChunkUnload(); // notify the energy source
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void readFromNBT(NBTTagCompound tag) {
- *         super.readFromNBT(tag);
- *
- *         ic2EnergySource.readFromNBT(tag);
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void writeToNBT(NBTTagCompound tag) {
- *         super.writeToNBT(tag);
- *
- *         ic2EnergySource.writeToNBT(tag);
- *         ...
- *     }
- *
- *     {@literal @}Override
- *     public void update() {
- *         ic2EnergySource.addEnergy(5); // add 5 eu to the source's buffer this tick
- *         ...
- *     }
- *
- *     ...
- * }
- * 
- */ -public class BasicSource extends BasicEnergyTile implements IEnergySource { - /** - * Constructor for a new BasicSource delegate. - * - * @param parent1 Base TileEntity represented by this energy source. - * @param capacity1 Maximum amount of eu to store. - * @param tier1 IC2 tier, 1 = LV, 2 = MV, ... - */ - public BasicSource(TileEntity parent, double capacity, int tier) { - super(parent, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - double power = EnergyNet.instance.getPowerFromTier(tier); - - if (getCapacity() < power) setCapacity(power); - } - - public BasicSource(ILocatable parent, double capacity, int tier) { - super(parent, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - double power = EnergyNet.instance.getPowerFromTier(tier); - - if (getCapacity() < power) setCapacity(power); - } - - public BasicSource(World world, BlockPos pos, double capacity, int tier) { - super(world, pos, capacity); - - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - this.tier = tier; - double power = EnergyNet.instance.getPowerFromTier(tier); - - if (getCapacity() < power) setCapacity(power); - } - - /** - * Set the IC2 energy tier for this source. - * - * @param tier1 IC2 Tier. - */ - public void setSourceTier(int tier) { - if (tier < 0) throw new IllegalArgumentException("invalid tier: "+tier); - - double power = EnergyNet.instance.getPowerFromTier(tier); - - if (getCapacity() < power) setCapacity(power); - - this.tier = tier; - } - - // energy net interface >> - - @Override - public boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing direction) { - return true; - } - - @Override - public double getOfferedEnergy() { - return energyStored; - } - - @Override - public void drawEnergy(double amount) { - energyStored -= amount; - } - - @Override - public int getSourceTier() { - return tier; - } - - // << energy net interface - - @Override - protected String getNbtTagName() { - return "IC2BasicSource"; - } - - protected int tier; -} diff --git a/src/api/java/ic2/api/energy/tile/IChargingSlot.class b/src/api/java/ic2/api/energy/tile/IChargingSlot.class deleted file mode 100644 index 7619107313c60443de5e16dad25d89087f0c4b53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 151 zcmX^0Z`VEs1_mPrPId-%b_Nbc2Dapk#G>?6Mg|rQ7flyN2Cm@z(xT*4x6B-%n2@J4 zNH#MsJvb-7L@z6`ERm5xF*DgnKd~TFKQ%A4D7{j@1gKOWMIj@D07$8RPGVlVzJF3y hYH|r1BLgD?6VPe~21XV}24)5p5Q~8oNHQ_70RSJ+Bwzpl diff --git a/src/api/java/ic2/api/energy/tile/IChargingSlot.java b/src/api/java/ic2/api/energy/tile/IChargingSlot.java deleted file mode 100644 index 2238326ea..000000000 --- a/src/api/java/ic2/api/energy/tile/IChargingSlot.java +++ /dev/null @@ -1,16 +0,0 @@ -package ic2.api.energy.tile; - -/** - * Represents a slot (or set of slots) that can have electric items in them to be charged - * - * @author Chocohead - */ -public interface IChargingSlot { - /** - * Called when the energy component is ticked to fill the slots - * - * @param amount The amount of energy available for the slot(s) - * @return The amount of energy used charging the items in the slot(s) - */ - public double charge(double amount); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class b/src/api/java/ic2/api/energy/tile/IColoredEnergyTile.class deleted file mode 100644 index b364517dfb53a5b133c7504e1a1592b35ee78aeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmZvXJqp4=5QX1pG*KHnOFPlV0b4u&KoBhS0_!@4m1HAfBjjop9>7D1YZ^fsDiC$J>St28YN@lW=equqUerjH7QF^6*2~f2@x>`mC0g!6_oW#6z legCAa)Z`L2Mg~R(CZHo27#LX?8JHPZKr9AUAj!nQ1^`r?D1-n2 diff --git a/src/api/java/ic2/api/energy/tile/IDischargingSlot.java b/src/api/java/ic2/api/energy/tile/IDischargingSlot.java deleted file mode 100644 index 64ea69bd8..000000000 --- a/src/api/java/ic2/api/energy/tile/IDischargingSlot.java +++ /dev/null @@ -1,17 +0,0 @@ -package ic2.api.energy.tile; - -/** - * Represents a slot (or set of slots) that can have electric items in them to be discharged - * - * @author Chocohead - */ -public interface IDischargingSlot { - /** - * Called when the energy component is ticked to empty the slots - * - * @param space The amount of free space for energy that can be stored - * @param ignoreLimit Whether to ignore the discharge limit of the item in the slot(s) - * @return The amount of energy discharged from the items in the slot(s) - */ - public double discharge(double space, boolean ignoreLimit); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class b/src/api/java/ic2/api/energy/tile/IEnergyAcceptor.class deleted file mode 100644 index 5347aea0ce9b412c900e9f5969a7629e0793de8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 271 zcmaKny9&ZU5Jm6!ijPLY-oi#32W+h@5)cFnt?bri3>(Zw){Wq=S@;2dl(@cHiy4N? zxg6&HxZVIv(TUKE(2CF|^pw_e^rzU0OD~BlazZj%8a-uoG%W9!y*UUkK1`e&@5RlQ zRy^m%igs%6xeN@)w#*ZyjZJ6cEup#aQchiT2`-9^VS#%C+oq+{-d$wxmoafe!caD&|85flCgyDv#G4+ zhcsit@pu*Fhu_T9LJ=-gJ&>wMCD%En^KSXqONfJ8W-3qQ(`3fl5iT}#4z=dOg%IZ( sT%&pF9NUOMX!+Mh$6q??5VjBjUPYtZjqWts#cs{_g8J@#|F>}P4L6i_y#N3J diff --git a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java b/src/api/java/ic2/api/energy/tile/IEnergyConductor.java deleted file mode 100644 index 08dab8896..000000000 --- a/src/api/java/ic2/api/energy/tile/IEnergyConductor.java +++ /dev/null @@ -1,53 +0,0 @@ -package ic2.api.energy.tile; - -/** - * Tile entities which conduct energy pulses without buffering (mostly cables) have to implement this - * interface. - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public interface IEnergyConductor extends IEnergyAcceptor, IEnergyEmitter { - /** - * Energy loss for the conductor in EU per block. - * - * @return Energy loss - */ - double getConductionLoss(); - - /** - * Amount of energy the insulation will handle before shocking nearby players and mobs. - * - * @return Insulation energy absorption in EU - */ - double getInsulationEnergyAbsorption(); - - /** - * Amount of energy the insulation will handle before it is destroyed. - * Ensure that this value is greater than the insulation energy absorption + 64. - * - * @return Insulation-destroying energy in EU - */ - double getInsulationBreakdownEnergy(); - - /** - * Amount of energy the conductor will handle before it melts. - * - * @return Conductor-destroying energy in EU - */ - double getConductorBreakdownEnergy(); - - /** - * Remove the conductor's insulation if the insulation breakdown energy was exceeded. - * - * @see #getInsulationBreakdownEnergy() - */ - void removeInsulation(); - - /** - * Remove the conductor if the conductor breakdown energy was exceeded. - * - * @see #getConductorBreakdownEnergy() - */ - void removeConductor(); -} - diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.class deleted file mode 100644 index a7394c85565766f40b805547b16e84416096bae7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 266 zcmaKny9xq93`K8zt*!`yA0Sw1W59MRi&X@{LMyv*h|7pOE90!-uUYs3ev~*qYKw#r z&dni@=j{$)f_8*vgjR%@(2?Bub85w9*G)l~50^$ySe*>ZXUX0ig%@99s< diff --git a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java b/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java deleted file mode 100644 index 10fbeabe5..000000000 --- a/src/api/java/ic2/api/energy/tile/IEnergyEmitter.java +++ /dev/null @@ -1,26 +0,0 @@ -package ic2.api.energy.tile; - -import net.minecraft.util.EnumFacing; - -/** - * For internal/multi-block usage only. - * - * @see IEnergySource - * @see IEnergyConductor - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public interface IEnergyEmitter extends IEnergyTile { - /** - * Determine if this emitter can emit energy to an adjacent receiver. - * - * The TileEntity in the receiver parameter is what was originally added to the energy net, - * which may be normal in-world TileEntity, a delegate or an IMetaDelegate. - * - * @param receiver receiver, may also be null or an IMetaDelegate - * @param side side the energy is to be sent to - * @return Whether energy should be emitted - */ - boolean emitsEnergyTo(IEnergyAcceptor receiver, EnumFacing side); -} - diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.class b/src/api/java/ic2/api/energy/tile/IEnergySink.class deleted file mode 100644 index 0ca5330260f88a7a65adeaa373c67e5501b4e222..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 290 zcmaJ+OG*Pl5Pg+NGHT-Q1TJ(DHx^{;DliEI1Q+oFZKoV6&U8Z4BjjpXcmNM2)=Usw zxu|+j@58IF@53j6DK2x2bDZb6AY7M{3aMRK%X%IpmU}`rxi1JKV^$j8UsPguTN1_^ zHsaH-@NV)HByp`ld~|P#o1_)bLsKuD*HAtdMVoZC+BVV4LMtI$EsyRt`eEZf9N|X& zl-*8Qx&mw=!hd9DYK2_6Q1bI@+kkNUk7?$;?9w(4351?aW`AdWLLURbaEQFa6Py}j J4Q=-@`T<`6OLG7K diff --git a/src/api/java/ic2/api/energy/tile/IEnergySink.java b/src/api/java/ic2/api/energy/tile/IEnergySink.java deleted file mode 100644 index 827425467..000000000 --- a/src/api/java/ic2/api/energy/tile/IEnergySink.java +++ /dev/null @@ -1,45 +0,0 @@ -package ic2.api.energy.tile; - -import net.minecraft.util.EnumFacing; - -/** - * Allows a tile entity (mostly a machine) to receive energy. - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public interface IEnergySink extends IEnergyAcceptor { - /** - * Determine how much energy the sink accepts. - * - * Make sure that injectEnergy() does accepts energy if demandsEnergy() returns anything > 0. - * - * @note Modifying the energy net from this method is disallowed. - * - * @return max accepted input in eu - */ - double getDemandedEnergy(); - - /** - * Determine the tier of this energy sink. - * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. - * - * @note Modifying the energy net from this method is disallowed. - * @note Return Integer.MAX_VALUE to allow any voltage. - * - * @return tier of this energy sink - */ - int getSinkTier(); - - /** - * Transfer energy to the sink. - * - * It's highly recommended to accept all energy by letting the internal buffer overflow to - * increase the performance and accuracy of the distribution simulation. - * - * @param directionFrom direction from which the energy comes from - * @param amount energy to be transferred - * @return Energy not consumed (leftover) - */ - double injectEnergy(EnumFacing directionFrom, double amount, double voltage); -} - diff --git a/src/api/java/ic2/api/energy/tile/IEnergySource.class b/src/api/java/ic2/api/energy/tile/IEnergySource.class deleted file mode 100644 index 41ca6cff4a692202e1cf28888067c0857dab97b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 260 zcmaKnO%4G;5QSfvq5Ts#U}ZKsaRww-7R0{Ilt~LiI*quRg#$R0C^NCJv8bx#)%Q}b zp0E1@z!)8crb0`hP3WfV7uzj6PNo^V^hOAV(S%S>oVk9ba5#z9gqFa|N}{HYck&KcT&#`UjLCA5`y6mg>c3$FV02{@A7m>pi;) cfl!hPThe value will be limited to the source tier's power multiplied with the packet count - * (see {@link IMultiEnergySource}, default 1). - * - * @note Modifying the energy net from this method is disallowed. - * - * @return Energy offered this tick - */ - double getOfferedEnergy(); - - /** - * Draw energy from this source's buffer. - * - *

If the source doesn't have a buffer, this may be a no-op. - * - * @param amount amount of EU to draw, may be negative - */ - void drawEnergy(double amount); - - /** - * Determine the tier of this energy source. - * 1 = LV, 2 = MV, 3 = HV, 4 = EV etc. - * - * @note Modifying the energy net from this method is disallowed. - * - * @return tier of this energy source - */ - int getSourceTier(); -} - diff --git a/src/api/java/ic2/api/energy/tile/IEnergyTile.class b/src/api/java/ic2/api/energy/tile/IEnergyTile.class deleted file mode 100644 index 087633b0f6b6b81af268a1c5e8da0754bc123f1a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 123 zcmX^0Z`VEs1_mPrc6J6-*SyrC^vVz*PcJL6ERm5x zJ~P=!Kd~TFKNT#aUjmfUM^XmV1X8GqvZvjfs1NV^N$e>v>(+_(hK6(CBTWin)T2%CG)}Yaa!#!|b z@5d8Bh=q%}3y-jDFRHKd{jI4~&V-2{oCxcJyDw^`st@YQn&9|x6hs8?sCu1oBr9{@ z#J{&>V6A1&yD}Y8!d7OXNE<1*W?kGxXC(1QA*@D8RB2s^BMg(LW`woX+N07Fr^c385EPi(fKL)m0G&M$cHC42zW_xwD@Y{;7GXDsrZ5!s}fs a+BFG;nm+~90zw@D;Io0ICxo!#Xng?V0Yt0- diff --git a/src/api/java/ic2/api/energy/tile/IHeatSource.java b/src/api/java/ic2/api/energy/tile/IHeatSource.java deleted file mode 100644 index c442d10fd..000000000 --- a/src/api/java/ic2/api/energy/tile/IHeatSource.java +++ /dev/null @@ -1,23 +0,0 @@ -package ic2.api.energy.tile; - -import net.minecraft.util.EnumFacing; - -public interface IHeatSource { - - /* - * Return max heat transmission peer Tick (only theoretical bandwidth not available amount) - */ - int maxrequestHeatTick(EnumFacing directionFrom); - - /* - * @param requested amount of heat to transfer - * - * @return transmitted amount of heat - * - * example: You Request 100 units of heat but the Source have only 50 units left - * - * requestHeat(100) : return 50 : so 50 units of heat remove from HeatSource - */ - - int requestHeat(EnumFacing directionFrom, int requestheat); -} diff --git a/src/api/java/ic2/api/energy/tile/IKineticSource.class b/src/api/java/ic2/api/energy/tile/IKineticSource.class deleted file mode 100644 index 05257b06fc6f622126d026067f9474aa14d0b53f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 273 zcmaivy9&ZU5Jm6!ijPLn&Q2R`9I&-k2nrVZ1M4z|)nwJU5&bm_KfsR?H>45-tATUx zg)^`B;|XAbR)9u;CZU(8TPo*FF79BgIHSc%8r?TW9|-;7(lbtcqEoeVoH-No%x1}4 zX=9`5C?s@$?FoZ_+b|zD*T*c?GB>dhI^m*lDByUnuF6XoJz;e+T$r&}5dLlw+Ig2_ gWg}i~_o7{mKq&cVfl`G~Mg{Pc`7ezCP2T_j diff --git a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java b/src/api/java/ic2/api/energy/tile/IMetaDelegate.java deleted file mode 100644 index 1bb9b1e92..000000000 --- a/src/api/java/ic2/api/energy/tile/IMetaDelegate.java +++ /dev/null @@ -1,34 +0,0 @@ -package ic2.api.energy.tile; - -import java.util.List; - -/** - * Interface for grouping multi-block structures to a single energy net delegate. - * - * The energy net uses TileEntity to refer to a specific xyz+world position. If multiple of those - * positions should belong to the same functional structure, i.e. they consume or produce energy - * only once for the whole multi-block instead of once per every single block, this interface - * allows to do so. - * - * The tile entity implementing IMetaDelegate has to be added/removed to/from the energy net - * instead of every single sub-TileEntity. The energy net interaction will be handled by the - * IMetaDelegate TileEntity as well. - * - * The sub tile array TileEntity[] just provides optional connectivity (IEnergyAcceptor, - * IEnergyEmitter) and mandatory position (x, y, z, World) data. - * If the connectivity data on the sub tile is missing, the meta delegate is queried instead. - * - * See ic2/api/energy/usage.txt for an overall description of the energy net api. - */ -public interface IMetaDelegate extends IEnergyTile { - /** - * Get the sub-Tiles belonging to this Meta Tile. - * - * @note The list has to be consistent between the EnergyNet Load and Unload events. - * @note The list must have at least 1 element. - * @note The parent tile implementing IMetaDelegate isn't automatically included. - * - * @return sub-Tile array - */ - List getSubTiles(); -} diff --git a/src/api/java/ic2/api/energy/tile/IMultiEnergySource.class b/src/api/java/ic2/api/energy/tile/IMultiEnergySource.class deleted file mode 100644 index 09b4b0f78e0d75e244def583247a905c6732372c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 266 zcmX^0Z`VEs1_mPrUUmj9b_Q;C1|CKR$>P+!6yMUElFWjfRM))JqV&pu#N_PMl43>% zW)00KMh4mR)Dmn89CPza^Gd*~JQ*3dg7Zs@l2hF>b5a=@#67_pAjUx?^s*Am5*ZoP zGLwz;6ALo+Q^8j0mjKo4W2$Ck5CEyy&q>Tn*Y{7#N=*h@q=;27vL$Sc42%p+K+FvE bCld=J0}BHy0|Ss|V_*l0Ffwp}#2GjNQ=>_J diff --git a/src/api/java/ic2/api/energy/tile/IMultiEnergySource.java b/src/api/java/ic2/api/energy/tile/IMultiEnergySource.java deleted file mode 100644 index ef63f1927..000000000 --- a/src/api/java/ic2/api/energy/tile/IMultiEnergySource.java +++ /dev/null @@ -1,24 +0,0 @@ -package ic2.api.energy.tile; - -/** - * Allows an {@link IEnergySource} to emit more than one EU packet per tick. - * Note: support for this will be dropped in a future version of IC2. - * @author Aroma1997 - */ -public interface IMultiEnergySource extends IEnergySource -{ - - /** - * If you want your machine to emit more than one EU packets per tick return true here. - * @return if the machine in its current state can emit more than one EU packet per tick. - */ - public boolean sendMultipleEnergyPackets(); - - /** - * If {@link #sendMultipleEnergyPackets()} returned true, this will get called. - * The value returned by this method will determine the amount of EU packets, this machine can emit. - * @return the amount of EU packets, this machine can emit per tick. - */ - public int getMultipleEnergyPacketAmount(); - -} \ No newline at end of file diff --git a/src/api/java/ic2/api/energy/tile/IOverloadHandler.class b/src/api/java/ic2/api/energy/tile/IOverloadHandler.class deleted file mode 100644 index 46ed18ca7092b2cbcfdce8ea70454ea4494e3e1c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 161 zcmX^0Z`VEs1_mPrPId-%b_Nbc2Cn=(|FYDgoczQTMg|rQPt7QxSa5!6QF5wVW=<+2 zgQzD=-Xk$DB`38=FDtPuk&!_qGucQ#u^>}FH7~U&y;8pfs9GOgEhB>fNVR@WVqUtw ke^ORzatRwF10w?y&=Cv_j4X@{%nU3b76U7gWMW_g0BJ-ho&W#< diff --git a/src/api/java/ic2/api/energy/tile/IOverloadHandler.java b/src/api/java/ic2/api/energy/tile/IOverloadHandler.java deleted file mode 100644 index ebaeb9e83..000000000 --- a/src/api/java/ic2/api/energy/tile/IOverloadHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -package ic2.api.energy.tile; - -/** - * Complete control for when an {@link IEnergySink} is overloaded. - */ -public interface IOverloadHandler { - - /** - * Called when overloaded. This will override the default explosion. - * The default explosion will therefore NOT happen, when you return true here. - * If you return false, you can use this as a onExplode hook, but still let the default explosion happen. - * @note Will set the block to air and cause an explosion of power 2.5 if false is returned - * @param tier The tier of power, that was injected into the energy sink, that caused it to explode. - * @return Whether the default explosion should be cancelled. - */ - boolean onOverload(int tier); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/energy/usage.txt b/src/api/java/ic2/api/energy/usage.txt deleted file mode 100644 index bad72a93d..000000000 --- a/src/api/java/ic2/api/energy/usage.txt +++ /dev/null @@ -1,148 +0,0 @@ --------------------------------- --- Energy Network Description -- --------------------------------- - -There are currently three different types of energy network blocks: -- energy sources, e.g. generators or the output side of a storage block/transformer -- energy sinks, e.g. machines or the input side of a storage block/transformer -- conductors, e.g. cables - -Note that storage blocks or transformers are both sources and sinks. - -All those blocks have to have a tile entity which has to implement the interface corresponding to -its function and also post events to the Forge event bus. - -The energy generation, distribution and consumption is strictly limited to the simulating (server) -side, use the proper side checks before posting the related events. One possibility is to check for -FMLCommonHandler.instance().getEffectiveSide().isClient() being false. - -The energy network works by calculating the energy flow between the sources which offer energy -through getOfferedEnergy() and the sinks which request energy through demandedEnergyUnits(). -Conductors will carry the energy over a distance. Once the energy distribution is calculated, the -energy net will update the sources and sinks through drawEnergy() and injectEnergyUnits() respectively. - - ---------------------------- --- Energy Network Events -- ---------------------------- - -The energy network currently requires 2 events to manage its internal representation of the grids: - --- EnergyTileLoadEvent -- - -For all energy network tiles (sources, sinks, conductors) you have to post an EnergyTileLoadEvent. - -The event has to be posted as soon as the implementing tile entity is fully loaded, usually after -loading the chunk which contains it or after the user placing the block. - -The energy net implementation will use the event to add it to its energy grid map, taking it into -account for further energy transfers. - -You can detect the loading by either using the 1st iteration of update() or by waiting for -the next world tick after TileEntity.validate(). The 2nd approach is obviously more sophisticated -and requires to use some tick queuing mechanism. - -The event can by posted as following: - MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this)); - --- EnergyTileUnloadEvent -- - -Another event every energy tile has to post is the EnergyTileUnloadEvent. - -The event has to be posted as soon as the implementing tile entity is being unloaded, either by -unloading the containing chunk or by destroying the block containing it. - -It's possible to detect the unloading by triggering on both the beginning of -TileEntity.invalidate() and the beginning of TileEntity.onChunkUnload(). - -It is important that the tile entity is still properly linked to the world while posting the unload -event, otherwise the energy net can't find all affected connections. - - --------------------------------------- --- Participating Block Requirements -- --------------------------------------- - -The energy net blocks have to do the following to work properly: - --- energy source -- - -An energy source has to post the following events: - - EnergyTileLoadEvent on load - - EnergyTileUnloadEvent on unload - -Additionally the interface IEnergySource has to be implemented. - --- energy sink -- - -An energy sink has to post the following events: - - EnergyTileLoadEvent on load - - EnergyTileUnloadEvent on unload - -Additionally the interface IEnergySink has to be implemented. - --- energy conductor -- - -An energy conductor has to post the following events: - - EnergyTileLoadEvent on load - - EnergyTileUnloadEvent on unload - -Additionally the interface IEnergyConductor has to be implemented. - --- general --- -Optionally, you can implement the interface IColoredEnergyTile, which allows for some basic color-based -connectivity. This can be used for IEnergyConductors, but is not limited to them. - - ------------------------------- --- Energy Network Delegates -- ------------------------------- - -A delegate is a separate object which performs tasks for the original object, in this case handling -the energy net interaction. - -The TileEntity instances used by the events don't have to be the same as the in-world TileEntity -instance for the corresponding position, it can be delegated to a separate TileEntity instance. -This separate instance (delegate) needs to have its world and xyz coordinate fields set to match -the in-world instance. The delegate implements the energy net interfaces and is added and removed -to/from the energy net through EnergyTileLoadEvent and EnergyTileUnloadEvent. - -Separating the interfaces through a delegate allows to isolate the IC2 API usage into separate -classes an potentially share common code like an input buffer with battery discharging outside the -class hierarchy. -It's even possible to use an ic2 energy net delegate alongside an in-world TileEntity which isn't -designed to work with ic2 energy at all, like making a furnace electric by receiving energy through -a delegate and adding the corresponding fuel amount to the in-world furnace TileEntity. - -Getting the in-world TileEntity for a delegate involves calling World.getBlockTileEntity() with the -delegate's world and xyz coordinate information. - - ------------------- --- Multi Blocks -- ------------------- - -Multi blocks are a group of blocks which act as one functional entity. - -The IMetaDelegate interface groups multiple TileEntity instances (=sub tiles) representing the -individual blocks to a single Energy Net relevant node. The sub tiles may be normal in-world or -delegate TileEntity instances. - -The meta delegate is added to energy net once for the whole multi block structure and implements -the energy net interfaces as well. The sub tiles may optionally implement IEnergyEmitter and/or -IEnergyAcceptor to specify their connectivity rules independently, otherwise the meta delegate will -be queried. - - --------------------------------------------------- --- How to implement/add your own energy network -- --------------------------------------------------- - -If you want to create an alternative way of distributing energy, e.g. to have different -distribution rules or to use energy networks provided by other mods, you can register to the energy -tile events and use the interfaces to handle the energy distribution yourself. It's no longer -required to use conversion blocks. - -IC2's EnergyNet itself is built on top of the api events and interfaces, providing their default -use case. - diff --git a/src/api/java/ic2/api/event/ExplosionEvent.class b/src/api/java/ic2/api/event/ExplosionEvent.class deleted file mode 100644 index 59a2f8c0df6c02ff8e3af7ccba13331d16b43a3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1038 zcmaJ<%Z?I36g|bG8?YT@MigWoGCqKw(N4yN3yg^lm`p-kpuu%bQ$U%1kfvdD?+=;S zF>&Ds_)*4Ng$w8foBOC+_uO-C)t|q=egn9`c?m_F7E!<>WgaW@M46|`w3KO^=$Nn> z3=zaK{>pGP2t@4oG7xUWC$Y0Wclx^AWysFM1;a_|)-sl!UBm8xyx`&Jj(;x-TS3~EuxS7+M|>GLFjUC z#3QNl|A)DFCTWq!1Lz7A)Mhu!pjRJE&OL$AN{rC^H=HQpnKR`fuye>s@R})Z3tK?Rx3X z2u=FZMf&>&DvA_E6~#+?qNY8u)1C-wPaMh9{~|5-$lj;y2eQ-;wC%H>VD@=}jQuP@ z)~@9eU(X< x8kEr_9O8(kt4J}==tyzT>PWHA=}7T6bfgrRI#L=6)N@Q(1}At(-XOFl@DDY#{apY6 diff --git a/src/api/java/ic2/api/event/ExplosionEvent.java b/src/api/java/ic2/api/event/ExplosionEvent.java deleted file mode 100644 index 7d670aa97..000000000 --- a/src/api/java/ic2/api/event/ExplosionEvent.java +++ /dev/null @@ -1,40 +0,0 @@ -package ic2.api.event; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.World; - -import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.eventhandler.Cancelable; - -@Cancelable -public class ExplosionEvent extends WorldEvent { - public ExplosionEvent(World world, Entity entity, - Vec3d pos, - double power, - EntityLivingBase igniter, - int radiationRange, double rangeLimit) { - super(world); - - this.entity = entity; - this.pos = pos;; - this.power = power; - this.igniter = igniter; - this.radiationRange = radiationRange; - this.rangeLimit = rangeLimit; - } - - /** - * Entity representing the explosive, may be null. - */ - public final Entity entity; - public final Vec3d pos; - public final double power; - /** - * Entity causing the explosion, may be null. - */ - public final EntityLivingBase igniter; - public final int radiationRange; - public final double rangeLimit; -} diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserExplodesEvent.class deleted file mode 100644 index ea9d54941face6edb1646086ae33f788ed7be46c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1120 zcmcgrT~8B16g^Y=xvkWqWl_X0sz6KK$ZL%cP*$5X#;C!Bw`n`V!gjZrU5fgzd}vI3 z@CO)wlkv+RRA0+? zv2z+~f8e||XX}DXB@)h5=~8Fc8+*aQwv1HEbvyg}uIp~>38Z(z0h5=z%=Y4B*i-tA z?D=FCx?x}Xds2JGJ|oldp%)n+W%RCTc%Y))F{=^wbeR8ad1FS2eMUw@<+GOZY^ll9$DGlO8F2NQt0%cQBd5g< zlHJo`y$(-wU%8$cefjsS9v#WCETM?a5^~6wP%wvuyg=h0<}0xDw`hTb|MI7u}Xi*v0QDruR78#vN&=PL2M#J4? zRp|sR6B*qaZc)*6QNwNAVIKzFB{KEb*khhm8+4z@O3*4%k=iv{DLlXeZ;M&YG%6_k E1bNpVQ2+n{ diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserHitsBlockEvent.class deleted file mode 100644 index 1b3b0d955e13a3d05d25e23be903ee7abf3e8e7e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1264 zcmcgrTTc@~6#l04Lbr=3SPLQ|7lkgDExclUfY3UVUcf>^#u{a&g=za!JOzZaU|?5Rn11+s}gQ34C2Y7e4br!E5> zol;>bRvpt0ZPRh!&TVBM9;hVIi^dooeG_4;A6IW%Yl)ln6f2-cg;>M_Z&Z&;4W2C4R>*J-KvnQVph zWvXEU86L}6bA0hJo3=FxJ>8%^;>S8otQrS>;vwK3Mv;p5LzyIsinba$*zsjo`-=0v z?XjgRBic#uoE1u7ZfNt%`q3rOd=)2cLnqD;RsJa_O*H4Uk-+Lzb(fT-j#x&g#6H(G z=iFIp@ypqZl{_O#;!wa*@4BH$bYE@Lr6(N~rUaZL(~ARD*DT%SZ>n2wWna3O!nTVd z92X_HE+%lz#Uz{SxFN9dFG2~-{HM<7S?;EE-GzYp7ID|+mxYiRp>xrQC z#L;?sQ<$c@n-qPgF3#4x^^MI+wvsF7%Z2jzX9#b$I6%gmbp{yo%I*MJuRJk8&a0FL z$bX`q49aBh(gwf_n*94tHn+M)NcwW6=Wc zVa%dMnwGU_iBQg>Wvn1?(S4f6XV&n55VNmY?nR53J?l{8J0&d`u@bCFjW3&`3|1-1 PU=6e69omFdoI&v?DrP%_ diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserHitsEntityEvent.class deleted file mode 100644 index deec489bf41def58d010192d8af8be7e0e771554..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 975 zcmcgq!EVz)6r2rC9H*gy(ljomKxq-QP%QNt#GzFqB3WEOLCS5DZj)^tJJ@alcRqz5 z;DC@g@Bw@jVs=xBHiAlAxOm^&H}mGb@&5Sv?K^-yJgmUMeGk{L;o^adO#yGH^TRmT z`3HgZFjjdm(y{8N@;DEay$@#PraH_Bxz!LV;>Kj#YXP$t+Vu1)=Wm1#+wdW$J+?S?JcE_%x?zJrG!%8~dU)w3`Ad z&4vjji^-Id0*~exmmIrb3K^-42i#Az7>|>wVK4Neq<^}fDtXGeMVlJx{WwZ8Ju%2G zk=aN^)HA<&)?1+RIyp=Gs-=xxwcp!4JCPGvg^R5!iYN)}{*w;^{@?Hdga7hswmaD1 z19$k~xxQKAJaSQH?lJqsZ-uA7^W^Dn!)X-jrMg=$e}&jt^}e9+nYDsNEV2{u4mXjZ zfgB6Wj%Qp{QDep~xWT%x(Gt}PHoApn%k@#mik-%1hZW9a7(Q0*Tt04Njc%K}JB-RU XT4&8;pS#QoxQ9ia6)KpmuEYBUpy~nj diff --git a/src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class b/src/api/java/ic2/api/event/LaserEvent$LaserShootEvent.class deleted file mode 100644 index 08d6cbc30513a2ad7b311dc7c372007bcf479463..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 994 zcmcgr%Wl&^6g?C2avIuF2yrPblon{i!%~G{5yYZZBSnhXqzY1Y6L*>naXgXjCh!6L z2|vIBA+g{C_$b5~2c%+&iWRavb06p4IrnJh`;V{R036^!1$k^cxPp5n?3A!8-~=*O zQ9Dr+fvrxc5^thIwhlPe$7M zzk>N>q+^S=BX>u}B*!zd6R5VsP(??SB31-6I@&+*626KLuh(GbbB?hnL|lXvK<1hC@y*TC}HTZmX9Df$_(Ok&zPINiHs*IAfLq*u<8m_y5>CcRZCkD7eb|jKYc4_vWgP!S5ZJwVDDcg5^(

_A{ kl$VPQ+$J*{+oV-atu5vp_PIkZhr3wjUf~ILs;h8*0*wU*f&c&j diff --git a/src/api/java/ic2/api/event/LaserEvent.class b/src/api/java/ic2/api/event/LaserEvent.class deleted file mode 100644 index 8c8a55cf12802e5dc67f560dac6b26820bb6adea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1347 zcmah|TTc@~6#k~PU0PO=OXVgAh(H(0Dqc__CPHW=X?ze<6XMIV4DHD74B1_Z{wyCF z6CZpw{wU*_*+yFoHJfwUnKS2{?>jR;e|`H7U=uq<6j3RlfDNr&tsZFgP^(R?9%=R1 z!V?QmEo?E2*SwfVuSF8?%S0rf_gh>h4EBMPJlYGqIOeg1XAEP10(S%DpP4ud&lyI| z#{Q@CK%MZov;Kl%*sLEml}b8E3zUvWaZ^!&*_z~u8w$z&$U9A3s!G+}w25tooVuh2 z7*_hl)kI6k#x7;mCn8TaI0LJaf37a|>7irY>u$uovzT@c7z$iB8jF^WJfg@rA9Sih)i}ctnjA%B=W13K7iBn^V zR%3}-V~Jd2iC<$G4P$}MEz;i)WGExB;jDcHbJp9)IF&XAoQZ53S!W{GM$Rea+sHd5 zs}0L34Yo1(g-&E}kMy!RJ&zn^E7Hm^mZ+=yG}UFQu|nS}Dk#$`@FA^4yUX-PHO($F zp2m_fo<=iZJdG!7JdG%4JdG)DJdMgSp2jsuXUg=KfrB-&dBV3&_6Er!Wf`K{Hpxwr PVUk-UBP63FV<`Lv{((;i diff --git a/src/api/java/ic2/api/event/LaserEvent.java b/src/api/java/ic2/api/event/LaserEvent.java deleted file mode 100644 index 6564a1a25..000000000 --- a/src/api/java/ic2/api/event/LaserEvent.java +++ /dev/null @@ -1,118 +0,0 @@ -package ic2.api.event; - -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.eventhandler.Cancelable; - -/** - * A bunch of Events to handle the power of the Mining Laser. - */ -@Cancelable -public class LaserEvent extends WorldEvent { - // the Laser Entity - public final Entity lasershot; - - // the following variables can be changed and the Laser will adjust to them - - // the Player firing the Laser. If the Laser gets "reflected" the Player could change. - public EntityLivingBase owner; - // Range of the Laser Shot. Determine the amount of broken blocks, as well, as each broken block will subtract ~1F from range. - public float range, power; - public int blockBreaks; - // Determines whether the laser will explode upon hitting something - public boolean explosive, smelt; - - public LaserEvent(World world, Entity lasershot, EntityLivingBase owner, float range, float power, int blockBreaks, boolean explosive, boolean smelt) { - super(world); - - this.lasershot = lasershot; - this.owner = owner; - this.range = range; - this.power = power; - this.blockBreaks = blockBreaks; - this.explosive = explosive; - this.smelt = smelt; - } - - /** - * Event when the Laser is getting shot by a Player. - * - * The Item is the Laser Gun which the "Player" has shot - */ - public static class LaserShootEvent extends LaserEvent { - ItemStack laserItem; - - public LaserShootEvent(World world, Entity lasershot, EntityLivingBase owner, float range, float power, int blockBreaks, boolean explosive, boolean smelt, ItemStack laseritem) { - super(world, lasershot, owner, range, power, blockBreaks, explosive, smelt); - - this.laserItem = laseritem; - } - } - - /** - * Event when the Laser is exploding for some Reason. - * - * The Laser will no longer exist after this Event is posted as it either Explodes or despawns after the Event is fired. - */ - public static class LaserExplodesEvent extends LaserEvent { - // explosion strength, even that can be changed! - public float explosionPower, explosionDropRate, explosionEntityDamage; - - public LaserExplodesEvent(World world, Entity lasershot, EntityLivingBase owner, float range, float power, int blockBreaks, boolean explosive, boolean smelt, float explosionpower1, float explosiondroprate1, float explosionentitydamage1) { - super(world, lasershot, owner, range, power, blockBreaks, explosive, smelt); - - this.explosionPower = explosionpower1; - this.explosionDropRate = explosiondroprate1; - this.explosionEntityDamage = explosionentitydamage1; - } - } - - /** - * Event when the Laser is hitting a Block - * x, y and z are the Coords of the Block. - * - * Canceling this Event stops the Laser from attempting to break the Block, what is very useful for Glass. - * Use lasershot.setDead() to remove the Shot entirely. - */ - public static class LaserHitsBlockEvent extends LaserEvent { - // targeted block, even that can be changed! - public BlockPos pos; - public EnumFacing side; - // removeBlock determines if the Block will be removed. dropBlock determines if the Block should drop something. - public boolean removeBlock, dropBlock; - public float dropChance; - - public LaserHitsBlockEvent(World world, Entity lasershot, EntityLivingBase owner, float range, float power, int blockBreaks, boolean explosive1, boolean smelt1, BlockPos pos, EnumFacing side, float dropChance, boolean removeBlock, boolean dropBlock) { - super(world, lasershot, owner, range, power, blockBreaks, explosive1, smelt1); - - this.pos = pos; - this.side = side; - this.removeBlock = removeBlock; - this.dropBlock = dropBlock; - this.dropChance = dropChance; - } - } - - /** - * Event when the Laser is getting at a Living Entity - * - * Canceling this Event ignores the Entity - * Use lasershot.setDead() to remove the Shot entirely. - */ - public static class LaserHitsEntityEvent extends LaserEvent { - // the Entity which the Laser has shot at, even the target can be changed! - public Entity hitEntity; - - public LaserHitsEntityEvent(World world, Entity lasershot, EntityLivingBase owner, float range, float power, int blockBreaks, boolean explosive, boolean smelt, Entity hitentity) { - super(world, lasershot, owner, range, power, blockBreaks, explosive, smelt); - - this.hitEntity = hitentity; - } - } -} diff --git a/src/api/java/ic2/api/event/RetextureEvent.class b/src/api/java/ic2/api/event/RetextureEvent.class deleted file mode 100644 index be92cb32a76f80cb1268c004943fbf22b19c5721..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2143 zcmaJ?-&Y$&6#j;U%qDIM1Zau<0aj~afv#37Dz(~TP&6O{QW1YGn+dGl?B;AXwSDwI z@Wlsx@~Kb0=rIS6o>N{t$8-Fn)O%-*kVVMD%>8EWow@UU_iq0D>(|EsuA^4KlenEn z8FwTW47^!D29-P(@s`Bf29^qts2F(1z`F*j29^!17fvYL! z9d@zxroE*7*V&OGvMsMh0pqCveR?HmHx?b&3wFsd*Yur-DiW|#t}2MV_@SL_+ZByg zwJ${(k*e#f1PWwsI+5oDu|TQ%g>&DreJ9wp*W)O;Lb9_?XPB&o&<~^KwjX;<-%}A$ z(6_xLAe|=Tnt&i~ayPxei*E^0m`tVhWf=K2`!0|3sjdH^F6D6&Un#dVOR4Qsm`Qn_ zc;7LWQi16VwwIbci# zr|H@1K4osNsaQRT+mWg;Z}_$w zHX31&ykXA?YQBo>1t)No&lJp?n1*9w3KqTiklmHG@2`el5UZ&2z*SAYg>npNc|yOB z<8~yrO}HF7ei*vs`)b$mb(J59H6zssW0gcxBj}@aCnu-2l1|O*^`r@l+CJ=iOs-EGOl0 zM0H&tBv+5GeZ)avqId6j2MS#2bvdCW1TOaar8+=hvUmUFCKMPvR5AGoQB9oo9pT;@ zojm^O;&sDot!c%H>oWZ}0C^0t3}g+l5_%>v^h|o_nIzFOsiJ2RM$e=T&BQ+}Jqs$o z8N#!)_&fd66lnFpn%;-7G9C0y|AFFf$ZVCe`{+NI{u#M%c|mTKjD6$}X1d!2-k$BE zCm5BpU1(~U>%yXjvJ1~>XmsI#hWRcWWN6KFFl5bkP_oL|4u-9Ae+MI0IoH9cRhAu` zwaP{Z=d5zRgRvj!2^n0YaSbCh4x%47=wT&{VVE91f;o($g0tAbIqJGGL`3XYMD5o^ z>NiB`cSPRzRNs$?v>%A}pNQ07sLCHxk=t})J)sHD;dw$t82xX*KqRuo!t`m2rO9ZE z#mQ=m<>}WJ3zX9qOC+_$A{p9Zneup%Y#aH%DaC@s4T+Z|<|JO0ctzq>ZOm)?CcUy) WJi|Y_{51;e!!5i{bB@w_1NaAM)H@RZ diff --git a/src/api/java/ic2/api/event/RetextureEvent.java b/src/api/java/ic2/api/event/RetextureEvent.java deleted file mode 100644 index 195f0d3f4..000000000 --- a/src/api/java/ic2/api/event/RetextureEvent.java +++ /dev/null @@ -1,54 +0,0 @@ -package ic2.api.event; - -import net.minecraft.block.state.IBlockState; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -import net.minecraftforge.event.world.WorldEvent; -import net.minecraftforge.fml.common.eventhandler.Cancelable; - -@Cancelable -public class RetextureEvent extends WorldEvent { - public RetextureEvent(World world, BlockPos pos, IBlockState state, EnumFacing side, EntityPlayer player, - IBlockState refState, String refVariant, EnumFacing refSide, int[] refColorMultipliers) { - super(world); - - if (world == null) throw new NullPointerException("null world"); - if (world.isRemote) throw new IllegalStateException("remote world"); - if (pos == null) throw new NullPointerException("null pos"); - if (state == null) throw new NullPointerException("null state"); - if (side == null) throw new NullPointerException("null side"); - if (refState == null) throw new NullPointerException("null refState"); - if (refVariant == null) throw new NullPointerException("null refVariant"); - if (refSide == null) throw new NullPointerException("null refSide"); - if (refColorMultipliers == null) throw new NullPointerException("null refColorMultipliers"); - - this.pos = pos; - this.state = state; - this.side = side; - this.player = player; - this.refState = refState; - this.refVariant = refVariant; - this.refSide = refSide; - this.refColorMultipliers = refColorMultipliers; - } - - // target block - public final BlockPos pos; - public final IBlockState state; - public final EnumFacing side; - - // player causing the action, may be null - public final EntityPlayer player; - - // referenced block (to grab the texture from) - public final IBlockState refState; - public final String refVariant; - public final EnumFacing refSide; - public final int[] refColorMultipliers; - - // set to true to confirm the operation - public boolean applied = false; -} diff --git a/src/api/java/ic2/api/event/TeBlockFinalCallEvent.class b/src/api/java/ic2/api/event/TeBlockFinalCallEvent.class deleted file mode 100644 index 98ae85734060d6321bb5a611e99aeed7e84782cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 348 zcma)&y-ou$5QJwh_XEd45OlN%2`Dh61yK-@>O@17-f?`y;Iol&@?KO(6g&VAh1feN zDX^u{&L?YjKjP1RSf_D diff --git a/src/api/java/ic2/api/event/TeBlockFinalCallEvent.java b/src/api/java/ic2/api/event/TeBlockFinalCallEvent.java deleted file mode 100644 index 3b1958d4f..000000000 --- a/src/api/java/ic2/api/event/TeBlockFinalCallEvent.java +++ /dev/null @@ -1,20 +0,0 @@ -package ic2.api.event; - -import net.minecraftforge.fml.common.eventhandler.Event; - -import ic2.api.info.ITeBlock; - -/** This event is a notification for an internal event you might will to subscribe to if you're using ITeBlock, hence it is empty. - *

- * For more information such as why this event exists, when it's posted, and how to react to it properly, see {@link ITeBlock}. - *

- * - * @see ITeBlock - * - * @since IC2 2.6.67 - * @version 1.0 - * - * @author Chocohead - */ -public final class TeBlockFinalCallEvent extends Event { -} \ No newline at end of file diff --git a/src/api/java/ic2/api/info/IInfoProvider.class b/src/api/java/ic2/api/info/IInfoProvider.class deleted file mode 100644 index 95ce6945f7e50185d31acf76156bea84f4c92d39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmaivy$ZrW5QJy_N&G{^(oQRFJg~LZKtNCkSlFHCCY;8L92db?v+x0YDDeavE1OxE znU7_julobQ4DArj5G_JCW4APHv)fkYB@>3@m0>5&+OV=RbwWEni`Yxzq&m$f3qr?3 zQOWri8T~C$+bF#L?R(ksQ1=lS-W!fcsGRy@K9opLZO;u=9^6B z`MN&_F)Km2PFmA0p7n$`!d(Q*9KXJ)1izyvU3i9mG`-x>}|z&YHE|I{w9kP6@CPcE@2z aNna-rD&YW7i3n9hK+qcM!6C$@kH#A@C_L!^ diff --git a/src/api/java/ic2/api/info/ILocatable.java b/src/api/java/ic2/api/info/ILocatable.java deleted file mode 100644 index 47bc34428..000000000 --- a/src/api/java/ic2/api/info/ILocatable.java +++ /dev/null @@ -1,24 +0,0 @@ -package ic2.api.info; - -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Interface for things, that have a location. - * The function names are the way they are, because of obfuscation issues. - * See https://github.com/md-5/SpecialSource/issues/12 - * @author Aroma1997 - */ -public interface ILocatable { - - /** - * @return the position of the object. - */ - BlockPos getPosition(); - - /** - * @return the world of this object. - */ - World getWorldObj(); - -} diff --git a/src/api/java/ic2/api/info/ITeBlock.class b/src/api/java/ic2/api/info/ITeBlock.class deleted file mode 100644 index 5de8990ad49e7841807584230b6c128b0503a959..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 110 zcmX^0Z`VEs1_mPrc6J6Use the internal one not this! - *

- * You may be asking, why would an internal interface need documenting? Well, the answer is so people can use TileEntityBlock. - * That class is the base for all IC2 tile entities, so by being able to use that you're level to IC2. - * Many methods are protected in there too, as they're only designed to be called by BlockTileEntity (which is the block all IC2 tile entities will be on), - * by being able to extend it means all those methods you can now extend and be confident they will be called correctly. - *

- *

- * Because it allows effectively level control to IC2 itself, this gives you near total control of your tile entities: - *

- * You can pick whether each of your tile entity items show up in creative, and the order in which they do.
- * There is a proper separation between each registered ITeBlock by resource location, rather than everything being inserted into a single enum. - * You also receive your own instance of BlockTileEntity and ItemBlockTileEntity rather than having to use IC2's own one.
- * All the language keys and blockstate file are in your own assets (which you can, and in fact have to, pick). - * You can have custom item models with non-standard model locations. - *
- * The event allows you to properly register your own version of TeBlock in a way that will be as fully supported as is physically possible. - * It's not in the actual API itself as it's heavily dependent on internal classes, so you have this instead. - * This is also probably the most documented thing in the entire IC2 API. I'm too kind really. ;) - *

- *
- *

- * So that's all well and good, but what you really want is an example of how to do it properly. Good idea, let's go. - *


- *import net.minecraftforge.common.MinecraftForge;
- *import net.minecraftforge.fml.common.Mod;
- *import net.minecraftforge.fml.common.Mod.EventHandler;
- *import net.minecraftforge.fml.common.event.FMLConstructionEvent;
- *import net.minecraftforge.fml.common.event.FMLInitializationEvent;
- *import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- *
- *import ic2.api.event.TeBlockFinalCallEvent;
- *import ic2.core.block.TeBlockRegistry;
- *
- *{@literal @}Mod(modId="ExampleIC2Addon")
- *public class ExampleIC2Addon {
- *	{@literal @}EventHandler
- *	public void start(FMLConstructionEvent event) {
- *		MinecraftForge.EVENT_BUS.register(this);
- *	}
- *
- *	{@literal @}SubscribeEvent
- *	public void register(TeBlockFinalCallEvent event) {
- *		TeBlockRegistry.addAll(MyTeBlock.class, MyTeBlock.IDENTITY);
- *
- *		MinecraftForge.EVENT_BUS.unregister(this);
- *	}
- *
- *	{@literal @}EventHandler
- *	public void init(FMLInitializationEvent event) {
- *		MyTeBlock.buildDummies();
- *	}
- *}
- *
- *
- *import net.minecraft.block.material.Material;
- *import net.minecraft.creativetab.CreativeTabs;
- *import net.minecraft.item.EnumRarity;
- *import net.minecraft.item.ItemStack;
- *import net.minecraft.tileentity.TileEntity;
- *import net.minecraft.util.EnumFacing;
- *import net.minecraft.util.ResourceLocation;
- *
- *import ic2.core.block.BlockTileEntity;
- *import ic2.core.block.ITeBlock;
- *import ic2.core.block.TileEntityBlock;
- *import ic2.core.item.block.ItemBlockTileEntity;
- *import ic2.core.ref.TeBlock.DefaultDrop;
- *import ic2.core.ref.TeBlock.HarvestTool;
- *import ic2.core.ref.TeBlock.ITePlaceHandler;
- *import ic2.core.util.Util;
- *
- *public enum MyTeBlock implements ITeBlock {
- *	my_machine_name(MyMachineTileEntity.class, 0, false, Util.noFacings, false, HarvestTool.Pickaxe, DefaultDrop.Machine, 5, 10, EnumRarity.UNCOMMON, Material.IRON, false);
- *
- *	private MyTeBlock(Class teClass, int ID,
- *			boolean hasActive, Set{@literal <}EnumFacing{@literal >} possibleFacings, boolean canBeWrenched,
- *			HarvestTool tool, DefaultDrop drop,
- *			float hardness, float explosionResistance, EnumRarity rarity, Material material, boolean isTransparent) {
- *		this.teClass = teClass;
- *		this.ID = ID;
- *		this.hasActive = hasActive;
- *		this.possibleFacings = possibleFacings;
- *		this.canBeWrenched = canBeWrenched;
- *		this.tool = tool;
- *		this.drop = drop;
- *		this.hardness = hardness;
- *		this.explosionResistance = explosionResistance;
- *		this.rarity = rarity;
- *		this.material = material;
- *		this.isTransparent = isTransparent;
- *
- *		TileEntity.addMapping(block.teClass, IDENTITY.getResourceDomain() + ':' + block.getName());
- *	}
- *
- *	{@literal @}Override
- *	public boolean hasItem() {
- *		return teClass != null && itemMeta != -1;
- *	}
- *
- *	{@literal @}Override
- *	public String getName() {
- *		return name();
- *	}
- *
- *	{@literal @}Override
- *	public ResourceLocation getIdentifier() {
- *		return IDENTITY;
- *	}
- *
- *	{@literal @}Override
- *	public Class getTeClass() {
- *		return teClass;
- *	}
- *
- *	{@literal @}Override
- *	public boolean hasActive() {
- *		return hasActive;
- *	}
- *
- *	{@literal @}Override
- *	public int getId() {
- *		return ID;
- *	}
- *
- *	{@literal @}Override
- *	public float getHardness() {
- *		return hardness;
- *	}
- *
- *	{@literal @}Override
- *	public HarvestTool getHarvestTool() {
- *		return tool;
- *	}
- *
- *	{@literal @}Override
- *	public DefaultDrop getDefaultDrop() {
- *		return drop;
- *	}
- *
- *	{@literal @}Override
- *	public float getExplosionResistance() {
- *		return explosionResistance;
- *	}
- *
- *	{@literal @}Override
- *	public boolean allowWrenchRotating() {
- *		return canBeWrenched;
- *	}
- *
- *	{@literal @}Override
- *	public Set{@literal <}EnumFacing{@literal >} getSupportedFacings() {
- *		return possibleFacings;
- *	}
- *
- *	{@literal @}Override
- *	public EnumRarity getRarity() {
- *		return rarity;
- *	}
- *
- *	{@literal @}Override
- *	public Material getMaterial() {
- *		return material;
- *	}
- *
- *	{@literal @}Override
- *	public boolean isTransparent() {
- *		return isTransparent;
- *	}
- *
- *	{@literal @}Override
- *	public void setPlaceHandler(ITePlaceHandler handler) {
- *		this.placeHandler = handler;
- *	}
- *
- *	{@literal @}Override
- *	public ITePlaceHandler getPlaceHandler() {
- *		return placeHandler;
- *	}
- *
- *	public static void buildDummies() {
- *		for (MyTeBlock block : values()) {
- *			//System.out.printf("Building %s (with teClass %s)%n", block.getName(), block.teClass);
- *			if (block.teClass != null) {
- *				try {
- *					block.dummyTe = block.teClass.newInstance();
- *				} catch (Exception e) {
- *					e.printStackTrace();
- *				}
- *			}
- *		}
- *	}
- *
- *	{@literal @}Override
- *	public TileEntityBlock getDummyTe() {
- *		return dummyTe;
- *	}
- *
- *	private final Class teClass;
- *	private final int ID;
- *	private final boolean hasActive;
- *	private final Set{@literal <}EnumFacing{@literal >} possibleFacings;
- *	private final boolean canBeWrenched;
- *	private final HarvestTool tool;
- *	private final DefaultDrop drop;
- *	private final float hardness;
- *	private final float explosionResistance;
- *	private final EnumRarity rarity;
- *	private final Material material;
- *	private final boolean isTransparent;
- *	private TileEntityBlock dummyTe;
- *	private ITePlaceHandler placeHandler;
- *
- *	public static final ResourceLocation IDENTITY = new ResourceLocation("ExampleIC2Addon", "machines");
- *}
- *  
- * And that's it, you now have my_machine_name registered with the MyMachineTileEntity tile entity class, - * the language key to translate it's name being ExampleIC2Addon.machines.my_machine_name and - * the blockstate being in machines.json file in your mod's assets. - *

- *
- *

- * But hang on, what are all the parameters of our new enum and what does ITeBlock do with them? What are dummy tile entities for? - * Don't worry, it's quite simple (once you know it at least). - *

- *

- * First we'll start on what {@link TeBlockFinalCallEvent} is. It's posted on the {@link MinecraftForge#EVENT_BUS} just before the blocks are built, - * after which point any further attempts to register ITeBlocks will fail, as we can't inject them late due to the model generating. - * It is best to hook into this to register your ITeBlocks, as it will be guaranteed to be posted at the right time. - *

- * In terms of ITeBlock, there's quite a bit of information it needs in order to function. We'll go through each parameter (or getter method most cases too) in turn: - *

    - *
  • name: The name the new tile entity. This is important as the localisation and resource names depend on it, as well as some network syncing code.
  • - *
  • teClass: The class of your tile entity, it must extend TileEntityBlock otherwise it would miss critical methods to work. - * If extending that is a problem then using ITeBlock isn't what you should be doing.
  • - *
  • itemMeta: The ID of the new instance. This is utterly critical, as it's the thing used to detect which ITeBlock an item is. - * That's very important as the tile entity class is worked out by the ID when a block's being placed in ItemBlockTileEntity. - * Changing this will cause everyone's items to change and there is no stopping that if you do. - * The ID you pick should start at 0, and go up to {@link Short#MAX_VALUE}. - * Use -1 if the tile entity doesn't have an item form (or is placed using an item other than ItemBlockTileEntity).
  • - *
  • identifier: The resource location associated with the ITeBlock. - * The language keys, translations and internal mappings all use this, so it's best to store it as a static final variable and use that. - *
  • hasActive: If the tile entity has an active state too, which is based off whether TileEntityBlock#getActive() returns true or not. - * The models for that will be at name_active, you can check te.json for an example if you wish.
  • - *
  • supportedFacings: A set of EnumFacings that the block can face, used for rotating by the wrench for example. - * IC2 has some useful constants relating to that in Util (allFacings, horizontalFacings, downSideFacings and noFacings).
  • - *
  • allowWrenchRotating: Whether the tile entity can be rotated with a wrench (for {@link IWrenchable}).
  • - *
  • harvestTool: The tool used to harvest the tile entity, currently only None, Pickaxe, Shovel and Axe. - * More can be added on request, but support has to be specifically added, so there's no nice way via EnumHelper unfortunately.
  • - *
  • defaultDrop: The item(s) that will drop when the block is broken using the correct tool. Currently only Self, None, Generator, Machine, and AdvMachine. - * Like harvestTool, more can be added upon request.
  • - *
  • hardness: The hardness the block should have with the tile entity, IC2 normally uses 5.
  • - *
  • explosionResistance: The explosionResistance the block should have with the tile entity, IC2 normally uses 10.
  • - *
  • rarity: The EnumRarity that the item will have for the tile entity.
  • - *
  • material: The {@link Material} that the block representing the tile entity should have. Maximum of 8 different ones per ITeBlock registration.
  • - *
  • isTransparent: Whether the block should be rendered with {@link BlockRenderLayer#CUTOUT} or {@link BlockRenderLayer#SOLID} - * (which controls whether transparency can be in the texture).
  • - *
  • placeHandler: Custom placement logic, used for things like Reactor Chambers within IC2 itself. - * Returning null for this uses the default logic (placing like a normal block).
  • - *
  • dummyTe: An instance of the tile entity never registered to the world (don't try doing that) used for getting additional information about the Tile Entity. - * Mostly an internal thing, only exposed in case your Tile Entity uses a special constructor.
  • - *
- * IMPORTANT THINGS TO NOTE - *
- *
Getting your instance of BlockTileEntity and ItemBlockTileEntity
- *
For BlockTileEntity, use {@link TeBlockRegistry#get(ResourceLocation)}.
- * For ItemBlockTileEntity, use {@link BlockTileEntity#getItem()}.
- *
Using a custom item model for your ITeBlock
- *
Implement ITeBlockSpecialItem along with ITeBlock, then the item model will be what's provided rather than the block model.
- *
The default implementation for adding ITeBlocks to creative
- *
The default logic adds all registered ITeBlocks that return true for {@link ic2.core.ref.TeBlock#hasItem()}.
- *
- * More will be added to this list if questions keep re-occurring, or are about a suitably important topic. - *

- *
- *

- * There, that should be everything you need to utilise ITeBlock to add your own tile entities using IC2's very flexible framework. - * I'll be happy to answer any questions you have on it, your best bet is to ask me (Chocohead) on the IC2 forums, - * although if you post in the support section other people might be able to help before I see your post. - * I'll certainly take suggestions too, this is mostly just based on what IC2 uses/needs, so there might well be things missed that might be useful. - *
- * Goodness I spent too long on this again... - *

- * - * - * @see {@link TeBlockFinalCallEvent} for the event you'll need to subscribe to. - * @see {@link ic2.core.ref.TeBlock} for how all the IC2 implements {@link ITeBlock}. - * @see {@link ic2.core.ref.TeBlock.HarvestTool} for the currently available tools (you'll need this for adding new tile entities). - * @see {@link ic2.core.ref.TeBlock.DefaultDrop} for the currently available drops (you'll need this for adding new tile entities too). - * @see {@link ic2.core.block.ITeBlock.ITeBlockCreativeRegisterer} for customising what blocks are added to creative past the default implementation - * @see {@link ic2.core.ref.TeBlock.ITePlaceHandler} for making your own block placement handler (example in {@link ic2.core.item.ItemHandlers#reactorChamberPlace}). - * @see {@link ic2.core.util.Util} for the useful facings you might want for supportedFacings. - * @see {@link ic2.core.block.TileEntityBlock} for the base tile entity. - * @see {@link ic2.core.block.BlockTileEntity} for the base block (you'll never need to construct this yourself). - * @see {@link ic2.core.item.block.ItemBlockTileEntity} for the base item (you shouldn't need to construct this yourself either). - * @see {@link ITeBlockSpecialItem} for the interface used to have a custom item location. - * - * - * @since IC2 2.7.14 - * @version 2.0 - * - * @author Chocohead - */ -public interface ITeBlock { -} \ No newline at end of file diff --git a/src/api/java/ic2/api/info/Info.class b/src/api/java/ic2/api/info/Info.class deleted file mode 100644 index 9682d4754144ddaf8aace5bbc16d6b0d8be7606b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1325 zcmb7DSx*yD6#j0Zv>k@6EJ_6hL2N-8#a(bIZ6Oo8g%)CXA(!d2T%67{)1m*x|GiQ$kue}ExJxiR7`i7p`ZTEIThV* zdfYZlhG=%5x433;yQUR(_f5m2C^em1-^pY%sq%)NVwld_rl-|~Z5l4GdfI^}EG^CJ zyk?f11J^JqB`Q<$o9{9^nfJwPp`;h`41LnMkxc8!vTqL-3sSl0n!JSFa6IAITG1DT z+mkD#cl2~8(URv1yC#WJJINLo7T>j~nc)k~tU8Wma$7>I2wQls8M@+$Er#xtQ=!;_ zEcKH=sPCF?`7Aq{bqsE8aaTyY?dkUc*U$RFf#f| z9ydPZc%uy%UNNjTALVR%YeI65$W1NEWvIA;2^Hgrh44bfOU$UahU+0Lt60G+6|eCo zgtsb^SXGfiT15tH)E-e}82XDS!{Fr|Q`jF@dr~yb-Lsi(aqEB>&30_P>bNyitJW>e zaO!nhQC2qTGW3cjU6gN8%cJoNJ817o&Lk{;pIkhi=v?|gplQH~t5Bc;dqh`F74oI> z#%8Ll=hqn)u2jR%r9uOHyt!d=W6!L#;TGfn0U$dJwdB|eRfe(ncH+Vm&My(u^gXNe zrH2tgANom)U;u-@975EW!)-azmZKQ+{d52%6?qjTyTIg;&^t+%Mv{>X&VL5`L`ncR z>Fx2I5!@nOJqy4Tk&tC?V}?93xk1q~IdO!*Hz@R;pzH7m-KPjHpQ7gop%a8ZLW!Ls za*ROikb=AX0%Hi09;03+FhZUwDs`8j&kK%V6tlQPF>~|_A<*{&<8%rXbWVNFuT70b am1A@>!k7G+53dk2PH5f5yxTIkriU_7PENWO1(8|)0MavbK$l2ziA$M)V_N=mzy;rhK&$Z1gt+jek zS|IAm=M77sJ1@daazd+=nt>qNhJsF=c5}y0)?#&XBilv%#_U zimjzsVaTWoMU-LnRA)0eBw3kgV(U( zk)ZVdz=x|UMPU5TkOEyk_L|)F`OLXw01%+{fv@y zipGQd4%JI7G(o6iS9%pHy}RkGg9c@xz}rvM<=Fy|PHvG0zK2HUa3a|v;X_0!N86Uw zb?XHyQk={QIleJ?7~hKNM>~a*MLnMX+g)#AflpfJ6A$v)cA=Z62zvZ|R516;_W0YU<~*#m?HUL(#!hrnlOYbh4!4A2)& z?Y;T=RqQb#2-RypM*<0m^ZzY@CCp;kFE~utIJ;K`RV#Bihx6Po@TVjA9T5!^)e?<4vi0X38GOVw#vp*2Zg08_sJ`36V4 diff --git a/src/api/java/ic2/api/item/ElectricItem.java b/src/api/java/ic2/api/item/ElectricItem.java deleted file mode 100644 index 19e5fc1b9..000000000 --- a/src/api/java/ic2/api/item/ElectricItem.java +++ /dev/null @@ -1,59 +0,0 @@ -package ic2.api.item; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.item.ItemStack; - -/** - * Allows for charging, discharging and using electric items (IElectricItem). - */ -public final class ElectricItem { - /** - * IElectricItemManager to use for interacting with IElectricItem ItemStacks. - * - * This manager will act as a gateway and delegate the tasks to the final implementation - * (rawManager or a custom one) as necessary. - */ - public static IElectricItemManager manager; - - /** - * Standard IElectricItemManager implementation, only call it directly from another - * IElectricItemManager. Use manager instead. - */ - public static IElectricItemManager rawManager; - - /** - * Register an electric item manager for items not implementing IElectricItem. - * - * This method is only designed for special purposes, implementing IElectricItem or - * ISpecialElectricItem instead of using this is faster. - * - * Managers used with ISpecialElectricItem shouldn't be registered. - * - * @param manager Manager to register. - */ - public static void registerBackupManager(IBackupElectricItemManager manager) { - backupManagers.add(manager); - } - - /** - * Get the electric item manager suitable for the supplied item stack. - * - * This method is for internal use only. - * - * @param stack ItemStack to be handled. - * @return First suitable electric item manager. - */ - public static IBackupElectricItemManager getBackupManager(ItemStack stack) { - for (IBackupElectricItemManager manager : backupManagers) { - if (manager.handles(stack)) return manager; - } - - return null; - } - - - private static final List backupManagers = new ArrayList(); -} - diff --git a/src/api/java/ic2/api/item/HudMode.class b/src/api/java/ic2/api/item/HudMode.class deleted file mode 100644 index 200362d969f904e5999d3107da221fc0a792a9f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1904 zcmZ`(VOQH^6n@gAO&S7&SlG(I$wb$7jyfDV1(DJg=~h4u!*%n^+a^M`kaF6TGr#&@ zreFM^pxcffclOyIHFrs?{lAf?{jbR&%b}Z1Tc^9(oj&=Q9)J3jEXfK zm+&Po>wHt=|L+`EcB@}XJQ^}tf-mJG+yeNd%B0+1^E@G`wK4h(R+WUNx&DG8o zCBXoR9CUKn5Knj_sQXJTFA{|4DD`+nRlm2tG+5+i8U)>H_c|?S&E-}Z(U8sY#2C2B zV?JZxTilnB88nRsuAyPzIvyB!8&?cuF==3mmuX%e;|CfrGp za3@g+VX{`VPqH+?=p-vmwvIFx1qttwb(MDh=|_;BA@K_GuVhJhpVm}(Clme}auNO( z65*+CDuowFzJkK|#2ffLofv%-3SkZjZUdn>;yPrife?l3Q_qnq-1r0PZzmihbjy)b zP%#7z%r!xt%y=WLi=XC*RYo!N`j8^sq%UW`p4BM7;ldHLr%;ujp~$}wP>!WI9Mbkv z9FAx|B1{sAp%of^+&baA6Y*t;FZ~ocZTe5=(2m7uGcno}-oAr0K{l3G!&W&ErL3*+huYg^acwjUZ1QJQ}Etv>*b{90oI<)aXj1*TI=(*Ffy~5 z5W4e8;IH{K6XOeOO6igvCsK@3zA>S1O{_V$pQyibLZ>w7j9sEv+ce~bf4uG9&H TN|MG+xFt=v!#Sb=&2v(H22 diff --git a/src/api/java/ic2/api/item/IBackupElectricItemManager.java b/src/api/java/ic2/api/item/IBackupElectricItemManager.java deleted file mode 100644 index 2ae254acd..000000000 --- a/src/api/java/ic2/api/item/IBackupElectricItemManager.java +++ /dev/null @@ -1,12 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - -/** - * This interface specifies a manager applicable to items not implementing IElectricItem. - * - * The manager implementing this has to be registered with ElectricItem.registerBackupManager(). - */ -public interface IBackupElectricItemManager extends IElectricItemManager { - boolean handles(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/IBlockCuttingBlade.class b/src/api/java/ic2/api/item/IBlockCuttingBlade.class deleted file mode 100644 index 6602efc17aacfd62f89fc9e20f7083383450bd02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 188 zcmZXOI}U5)3A%KbJW%+k7R6d$!= z!ZL|Xt;$2^oVIyvWX8KfJ|tnKRV3tH{}O*1VKIopNSlkxwP57}0>SJ50pt@#@P~zQ HPY=Nt?R7Go diff --git a/src/api/java/ic2/api/item/IBlockCuttingBlade.java b/src/api/java/ic2/api/item/IBlockCuttingBlade.java deleted file mode 100644 index 0c2e53deb..000000000 --- a/src/api/java/ic2/api/item/IBlockCuttingBlade.java +++ /dev/null @@ -1,7 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - -public interface IBlockCuttingBlade { - int getHardness(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/IBoxable.class b/src/api/java/ic2/api/item/IBoxable.class deleted file mode 100644 index e28c75435afbbaa68311f3d877590af70bedd474..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmXYrF$%&!5JmrJOjHmo^Z<6+xRBN^g%A)dVr4g3N7)kdE=m9Z diff --git a/src/api/java/ic2/api/item/IBoxable.java b/src/api/java/ic2/api/item/IBoxable.java deleted file mode 100644 index 3204a3844..000000000 --- a/src/api/java/ic2/api/item/IBoxable.java +++ /dev/null @@ -1,14 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - - -public interface IBoxable { - /** - * Determine whether an item can be stored in a toolbox or not. - * - * @param stack item to be stored - * @return Whether to store the item in the toolbox or not - */ - public abstract boolean canBeStoredInToolbox(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/IC2Items.class b/src/api/java/ic2/api/item/IC2Items.class deleted file mode 100644 index 95a0eb820192576d419a25e076d946714ae38f72..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1727 zcma)7ZF3V<6n<`!W|Pg9my{N%wN^z*QksP*Dh;9~1r4MWXsO^A=XSG+3;R+x+x`px zfWHE9CPkUiZ#v^|avYz#*^*=;;FojHJ$vqRp7V0={`JqVzX7P>fsPqe^C-eB-~uk{ z)M`3D#79b8%Hv~vQoyIUtYZ~*4OcXLrlWvr4p-Isxe{L}v8F@EH4P07>jF8)??uwL zY=P4)$Eulf&oQ0I_RMCJa_vsDE|9(A_)c_HAYCf&2xJ;ToBqdJj&I-I_jc`YTkg8F z6kCBM-5nV^YM&T0(RWU761`DV_&uU)T{}{`zKVgUt-a~TUgZal`=LB+{7&nEdv`^B9?*M*wk>x zz+K!ESQr+w>AH4Tx@(qY_j=dEFbLV+;pai)uI)Q++vb;P$3F-j+wG-J7?l zeFHn#RGhvRm>r+IgtfqlA?oJtBimxzDr3!mWkn`%lZh5ElD5SoAaM58n5{s@nUvVy z|KrIKEJ`bK4(!qX2vlEte$<~RCtsAs?*wL(f_HIabN$<`?)DFP2Gm0X;$ z>J4l>ZGXQnU0%o8(PX1NAMoGF%u4Dd3fD^2S{<$bPA~nY4 zDAW!v@`;<_mwYq31A*)@qTi8AwCOa$W5K)3!|`NYlCq Display name -Otherwise, it is displayed like that: -itemname Display name -You can access ItemStacks of Items without variants using the variant null - - -================================================= -Items -================================================= - -boat: -boat,broken_rubber Damaged Rubber Dinghy -boat,rubber Rubber Dinghy -boat,carbon Carbon Fiber Canoe -boat,electric Electric Boat - -crushed: -crushed,copper Crushed Copper Ore -crushed,gold Crushed Gold Ore -crushed,iron Crushed Iron Ore -crushed,lead Crushed Lead Ore -crushed,silver Crushed Silver Ore -crushed,tin Crushed Tin Ore -crushed,uranium Crushed Uranium Ore - -purified: -purified,copper Purified Crushed Copper Ore -purified,gold Purified Crushed Gold Ore -purified,iron Purified Crushed Iron Ore -purified,lead Purified Crushed Lead Ore -purified,silver Purified Crushed Silver Ore -purified,tin Purified Crushed Tin Ore -purified,uranium Purified Crushed Uranium Ore - -dust: -dust,bronze Bronze Dust -dust,clay Clay Dust -dust,coal Coal Dust -dust,coal_fuel Hydrated Coal Dust -dust,copper Copper Dust -dust,diamond Diamond Dust -dust,energium Energium Dust -dust,gold Gold Dust -dust,iron Iron Dust -dust,lapis Lapis Lazuli Dust -dust,lead Lead Dust -dust,lithium Lithium Dust -dust,obsidian Obsidian Dust -dust,silicon_dioxide Silicon Dioxide -dust,silver Silver Dust -dust,stone Stone Dust -dust,sulfur Sulfur Dust -dust,tin Tin Dust -dust,small_bronze Tiny Pile of Bronze Dust -dust,small_copper Tiny Pile of Copper Dust -dust,small_gold Tiny Pile of Gold Dust -dust,small_iron Tiny Pile of Iron Dust -dust,small_lapis Tiny Pile of Lapis Dust -dust,small_lead Tiny Pile of Lead Dust -dust,small_lithium Tiny Pile of Lithium Dust -dust,small_obsidian Tiny Pile of Obsidian Dust -dust,small_silver Tiny Pile of Silver Dust -dust,small_sulfur Tiny Pile of Sulfur Dust -dust,small_tin Tiny Pile of Tin Dust -dust,tin_hydrated Hydrated Tin Dust - -ingot: -ingot,alloy Mixed Metal Ingot -ingot,bronze Bronze Ingot -ingot,copper Copper Ingot -ingot,lead Lead Ingot -ingot,silver Silver Ingot -ingot,steel Steel Ingot -ingot,tin Tin Ingot - -plate: -plate,bronze Bronze Plate -plate,copper Copper Plate -plate,gold Gold Plate -plate,iron Iron Plate -plate,lapis Lapis Lazuli Plate -plate,lead Lead Plate -plate,obsidian Obsidian Plate -plate,steel Steel Plate -plate,tin Tin Plate -plate,dense_bronze Dense Bronze Plate -plate,dense_copper Dense Copper Plate -plate,dense_gold Dense Gold Plate -plate,dense_iron Dense Iron Plate -plate,dense_lapis Dense Lapis Lazuli Plate -plate,dense_lead Dense Lead Plate -plate,dense_obsidian Dense Obsidian Plate -plate,dense_steel Dense Steel Plate -plate,dense_tin Dense Tin Plate - -casing: -casing,bronze Bronze Item Casing -casing,copper Copper Item Casing -casing,gold Gold Item Casing -casing,iron Iron Item Casing -casing,lead Lead Item Casing -casing,steel Steel Item Casing -casing,tin Tin Item Casing - -nuclear: -nuclear,uranium Enriched Uranium Nuclear Fuel -nuclear,uranium_235 Uranium 235 -nuclear,uranium_238 Uranium 238 -nuclear,plutonium Plutonium -nuclear,mox MOX Nuclear Fuel -nuclear,small_uranium_235 Tiny Pile of Uranium 235 -nuclear,small_uranium_238 Tiny Pile of Uranium 238 -nuclear,small_plutonium Tiny Pile of Plutonium -nuclear,uranium_pellet Pellets of Enriched Uranium Nuclear Fuel -nuclear,mox_pellet Pellets of MOX Nuclear Fuel -nuclear,rtg_pellet Pellets of RTG Fuel -nuclear,depleted_uranium Fuel Rod (Depleted Uranium) -nuclear,depleted_dual_uranium Dual Fuel Rod (Depleted Uranium) -nuclear,depleted_quad_uranium Quad Fuel Rod (Depleted Uranium) -nuclear,depleted_mox Fuel Rod (Depleted MOX) -nuclear,depleted_dual_mox Dual Fuel Rod (Depleted MOX) -nuclear,depleted_quad_mox Quad Fuel Rod (Depleted MOX) - -misc_resource: -misc_resource,ashes Ashes -misc_resource,iridium_ore Iridium Ore -misc_resource,iridium_shard Iridium Shard -misc_resource,matter UU-Matter -misc_resource,resin Sticky Resin -misc_resource,slag Slag -misc_resource,iodine Iodine - -block_cutting_blade: -block_cutting_blade,iron Block Cutting Blade (Iron) -block_cutting_blade,steel Block Cutting Blade (Steel) -block_cutting_blade,diamond Block Cutting Blade (Diamond) - -crafting: -crafting,rubber Rubber -crafting,circuit Electronic Circuit -crafting,advanced_circuit Advanced Circuit -crafting,alloy Advanced Alloy -crafting,iridium Iridium Reinforced Plate -crafting,coil Coil -crafting,electric_motor Electric Motor -crafting,heat_conductor Heat Conductor -crafting,copper_boiler Copper Boiler -crafting,fuel_rod Fuel Rod (Empty) -crafting,tin_can Tin Can -crafting,small_power_unit Small Power Unit -crafting,power_unit Power Unit -crafting,carbon_fibre Raw Carbon Fibre -crafting,carbon_mesh Raw Carbon Mesh -crafting,carbon_plate Carbon Plate -crafting,coal_ball Coal Ball -crafting,coal_block Compressed Coal Ball -crafting,coal_chunk Coal Chunk -crafting,industrial_diamond Industrial Diamond -crafting,plant_ball Plantball -crafting,bio_chaff Bio Chaff -crafting,compressed_hydrated_coal H. Coal -crafting,scrap Scrap -crafting,scrap_box Scrap Box -crafting,cf_powder CF Powder -crafting,pellet CF Pellet -crafting,raw_crystal_memory Crystal Memory (raw) -crafting,iron_shaft Shaft (Iron) -crafting,steel_shaft Shaft (Steel) -crafting,wood_rotor_blade Wood Rotor Blade -crafting,iron_rotor_blade Iron Rotor Blade -crafting,steel_rotor_blade Steel Rotor Blade -crafting,carbon_rotor_blade Carbon Rotor Blade -crafting,steam_turbine_blade Steam Turbine Blade -crafting,steam_turbine Steam Turbine -crafting,jetpack_attachment_plate Jetpack Attachment Plate -crafting,coin Industrial Credit - -crystal_memory: -crystal_memory Crystal Memory - -upgrade_kit: -upgrade_kit,mfsu MFSU Upgrade Kit - -crop_res: -crop_res,coffee_beans Coffee Beans -crop_res,coffee_powder Coffee Powder -crop_res,fertilizer Fertilizer -crop_res,grin_powder Grin Powder -crop_res,hops Hops -crop_res,weed Weed - -terra_wart: -terra_wart Terra Wart - -re_battery: -re_battery RE-Battery - -advanced_re_battery: -advanced_re_battery Advanced RE-Battery - -energy_crystal: -energy_crystal Energy Crystal - -lapotron_crystal: -lapotron_crystal Lapotron Crystal - -single_use_battery: -single_use_battery Single-Use Battery - -charging_re_battery: -charging_re_battery Charging RE Battery - -advanced_charging_re_battery: -advanced_charging_re_battery Advanced Charging Battery - -charging_energy_crystal: -charging_energy_crystal Charging Energy Crystal - -charging_lapotron_crystal: -charging_lapotron_crystal Charging Lapotron Crystal - -heat_storage: -heat_storage 10k Coolant Cell - -tri_heat_storage: -tri_heat_storage 30k Coolant Cell - -hex_heat_storage: -hex_heat_storage 60k Coolant Cell - -plating: -plating Reactor Plating - -heat_plating: -heat_plating Heat-Capacity Reactor Plating - -containment_plating: -containment_plating Containment Reactor Plating - -heat_exchanger: -heat_exchanger Heat Exchanger - -reactor_heat_exchanger: -reactor_heat_exchanger Reactor Heat Exchanger - -component_heat_exchanger: -component_heat_exchanger Component Heat Exchanger - -advanced_heat_exchanger: -advanced_heat_exchanger Advanced Heat Exchanger - -heat_vent: -heat_vent Heat Vent - -reactor_heat_vent: -reactor_heat_vent Reactor Heat Vent - -overclocked_heat_vent: -overclocked_heat_vent Overclocked Heat Vent - -component_heat_vent: -component_heat_vent Component Heat Vent - -advanced_heat_vent: -advanced_heat_vent Advanced Heat Vent - -neutron_reflector: -neutron_reflector Neutron Reflector - -thick_neutron_reflector: -thick_neutron_reflector Thick Neutron Reflector - -iridium_reflector: -iridium_reflector Iridium Neutron Reflector - -rsh_condensator: -rsh_condensator RSH-Condensator - -lzh_condensator: -lzh_condensator LZH-Condensator - -uranium_fuel_rod: -uranium_fuel_rod Fuel Rod (Uranium) - -dual_uranium_fuel_rod: -dual_uranium_fuel_rod Dual Fuel Rod (Uranium) - -quad_uranium_fuel_rod: -quad_uranium_fuel_rod Quad Fuel Rod (Uranium) - -mox_fuel_rod: -mox_fuel_rod Fuel Rod (MOX) - -dual_mox_fuel_rod: -dual_mox_fuel_rod Dual Fuel Rod (MOX) - -quad_mox_fuel_rod: -quad_mox_fuel_rod Quad Fuel Rod (MOX) - -lithium_fuel_rod: -lithium_fuel_rod Fuel Rod (Lithium) - -tfbp: -tfbp,blank TFBP - Empty -tfbp,chilling TFBP - Chilling -tfbp,cultivation TFBP - Cultivation -tfbp,desertification TFBP - Desertification -tfbp,flatification TFBP - Flatification -tfbp,irrigation TFBP - Irrigation -tfbp,mushroom TFBP - Mushroom - -bronze_axe: -bronze_axe Bronze Axe - -bronze_hoe: -bronze_hoe Bronze Hoe - -bronze_pickaxe: -bronze_pickaxe Bronze Pickaxe - -bronze_shovel: -bronze_shovel Bronze Shovel - -bronze_sword: -bronze_sword Bronze Sword - -containment_box: -containment_box Containment Box - -cutter: -cutter Cutter - -debug_item: -debug_item Debug Item - -foam_sprayer: -foam_sprayer CF Sprayer -foam_sprayer,ic2construction_foam CF Sprayer - -forge_hammer: -forge_hammer Forge Hammer - -frequency_transmitter: -frequency_transmitter Frequency Transmitter - -meter: -meter EU-Reader - -remote: -remote Dynamite-O-Mote - -tool_box: -tool_box Tool Box - -treetap: -treetap Treetap - -wrench: -wrench Wrench - -barrel: -barrel Empty Booze Barrel - -booze_mug: -booze_mug Zero - -mug: -mug,empty Stone Mug -mug,cold_coffee Cold Coffee -mug,dark_coffee Dark Coffee -mug,coffee Coffee - -crop_stick: -crop_stick Crop - -cropnalyzer: -cropnalyzer Cropnalyzer - -crop_seed_bag: -crop_seed_bag * Seeds - -weeding_trowel: -weeding_trowel Weeding Trowel - -advanced_scanner: -advanced_scanner OV Scanner - -chainsaw: -chainsaw Chainsaw - -diamond_drill: -diamond_drill Diamond Drill - -drill: -drill Mining Drill - -electric_hoe: -electric_hoe Electric Hoe - -electric_treetap: -electric_treetap Electric Treetap - -electric_wrench: -electric_wrench Electric Wrench - -iridium_drill: -iridium_drill Iridium Drill - -mining_laser: -mining_laser Mining Laser - -nano_saber: -nano_saber Nano Saber - -obscurator: -obscurator Obscurator - -scanner: -scanner OD Scanner - -wind_meter: -wind_meter Windmeter - -painter: -painter Painter -painter,black Black Painter -painter,blue Blue Painter -painter,brown Brown Painter -painter,cyan Cyan Painter -painter,gray Dark Grey Painter -painter,green Green Painter -painter,light_blue Light Blue Painter -painter,light_gray Light Grey Painter -painter,lime Lime Painter -painter,magenta Magenta Painter -painter,orange Orange Painter -painter,pink Pink Painter -painter,purple Purple Painter -painter,red Red Painter -painter,white White Painter -painter,yellow Yellow Painter - -fluid_cell: -fluid_cell Universal Fluid Cell -fluid_cell,ic2air Universal Fluid Cell -fluid_cell,ic2biogas Universal Fluid Cell -fluid_cell,ic2biomass Universal Fluid Cell -fluid_cell,ic2construction_foam Universal Fluid Cell -fluid_cell,ic2coolant Universal Fluid Cell -fluid_cell,ic2distilled_water Universal Fluid Cell -fluid_cell,ic2heavy_water Universal Fluid Cell -fluid_cell,ic2hot_coolant Universal Fluid Cell -fluid_cell,ic2hot_water Universal Fluid Cell -fluid_cell,ic2hydrogen Universal Fluid Cell -fluid_cell,ic2oxygen Universal Fluid Cell -fluid_cell,ic2pahoehoe_lava Universal Fluid Cell -fluid_cell,ic2steam Universal Fluid Cell -fluid_cell,ic2superheated_steam Universal Fluid Cell -fluid_cell,ic2uu_matter Universal Fluid Cell -fluid_cell,ic2weed_ex Universal Fluid Cell -fluid_cell,lava Universal Fluid Cell -fluid_cell,water Universal Fluid Cell - -cable: -cable,type:copper,insulation:0 Copper Cable -cable,type:copper,insulation:1 Insulated Copper Cable -cable,type:glass,insulation:0 Glass Fibre Cable -cable,type:gold,insulation:0 Gold Cable -cable,type:gold,insulation:1 Insulated Gold Cable -cable,type:gold,insulation:2 2x Ins. Gold Cable -cable,type:iron,insulation:0 HV Cable -cable,type:iron,insulation:1 Insulated HV Cable -cable,type:iron,insulation:2 2x Ins. HV Cable -cable,type:iron,insulation:3 3x Ins. HV Cable -cable,type:tin,insulation:0 Tin Cable -cable,type:tin,insulation:1 Insulated Tin Cable -cable,type:detector,insulation:0 EU-Detector Cable -cable,type:splitter,insulation:0 EU-Splitter Cable - -upgrade: -upgrade,overclocker Overclocker Upgrade -upgrade,transformer Transformer Upgrade -upgrade,energy_storage Energy Storage Upgrade -upgrade,redstone_inverter Redstone Signal Inverter Upgrade -upgrade,ejector Ejector Upgrade -upgrade,advanced_ejector Advanced Ejector Upgrade -upgrade,pulling Pulling Upgrade -upgrade,advanced_pulling Advanced Pulling Upgrade -upgrade,fluid_ejector Fluid Ejector Upgrade -upgrade,fluid_pulling Fluid Pulling Upgrade - -advanced_batpack: -advanced_batpack Adv.Batpack - -alloy_chestplate: -alloy_chestplate Composite Vest - -batpack: -batpack BatPack - -bronze_boots: -bronze_boots Bronze Boots - -bronze_chestplate: -bronze_chestplate Bronze Chestplate - -bronze_helmet: -bronze_helmet Bronze Helmet - -bronze_leggings: -bronze_leggings Bronze Leggings - -cf_pack: -cf_pack CF Backpack -cf_pack CF Backpack - -energy_pack: -energy_pack Energypack - -hazmat_chestplate: -hazmat_chestplate Hazmat Suit - -hazmat_helmet: -hazmat_helmet Scuba Helmet - -hazmat_leggings: -hazmat_leggings Hazmat Suit Leggings - -jetpack: -jetpack Jetpack -jetpack Jetpack - -jetpack_electric: -jetpack_electric Electric Jetpack - -lappack: -lappack Lappack - -nano_boots: -nano_boots NanoSuit Boots - -nano_chestplate: -nano_chestplate NanoSuit Bodyarmor - -nano_helmet: -nano_helmet NanoSuit Helmet - -nano_leggings: -nano_leggings NanoSuit Leggings - -nightvision_goggles: -nightvision_goggles Nightvision Goggles - -quantum_boots: -quantum_boots QuantumSuit Boots - -quantum_chestplate: -quantum_chestplate QuantumSuit Bodyarmor - -quantum_helmet: -quantum_helmet QuantumSuit Helmet - -quantum_leggings: -quantum_leggings QuantumSuit Leggings - -rubber_boots: -rubber_boots Rubber Boots - -solar_helmet: -solar_helmet Solar Helmet - -static_boots: -static_boots Static Boots - -filled_tin_can: -filled_tin_can (Filled) Tin Can - -iodine_tablet: -iodine_tablet Iodine Tablet - -rotor_wood: -rotor_wood Kinetic Gearbox Rotor (Wood) - -rotor_iron: -rotor_iron Kinetic Gearbox Rotor (Iron) - -rotor_carbon: -rotor_carbon Kinetic Gearbox Rotor (Carbon) - -rotor_steel: -rotor_steel Kinetic Gearbox Rotor (Steel) - -dynamite: -dynamite Dynamite - -dynamite_sticky: -dynamite_sticky Sticky Dynamite - - -================================================= -Blocks: -================================================= - -te: -te,itnt Industrial TNT -te,nuke Nuke -te,generator Generator -te,geo_generator Geothermal Generator -te,kinetic_generator Kinetic Generator -te,rt_generator Radioisotope Thermoelectric Generator -te,semifluid_generator Semifluid Generator -te,solar_generator Solar Panel -te,stirling_generator Stirling Generator -te,water_generator Water Mill -te,wind_generator Wind Mill -te,electric_heat_generator Electric Heater -te,fluid_heat_generator Liquid Fuel Firebox -te,rt_heat_generator Radioisotope Heat Generator -te,solid_heat_generator Solid Fuel Firebox -te,electric_kinetic_generator Electric Motor -te,manual_kinetic_generator Manual Kinetic Generator -te,steam_kinetic_generator Steam Turbine -te,stirling_kinetic_generator Stirling Kinetic Generator -te,water_kinetic_generator Water Turbine -te,wind_kinetic_generator Wind Turbine -te,nuclear_reactor Nuclear Reactor -te,reactor_access_hatch Reactor Access Hatch -te,reactor_chamber Reactor Chamber -te,reactor_fluid_port Reactor Fluid Port -te,reactor_redstone_port Reactor Redstone Port -te,condenser Condenser -te,fluid_bottler Bottling Plant -te,fluid_distributor Fluid Distributor -te,fluid_regulator Fluid Regulator -te,liquid_heat_exchanger Liquid Heat Exchanger -te,pump Pump -te,solar_distiller Solar Distiller -te,steam_generator Steam Boiler -te,item_buffer Item Buffer -te,luminator_flat Luminator -te,magnetizer Magnetizer -te,sorting_machine Electric Sorting Machine -te,teleporter Teleporter -te,terraformer Terraformer -te,tesla_coil Tesla Coil -te,canner Fluid/Solid Canning Machine -te,compressor Compressor -te,electric_furnace Electric Furnace -te,extractor Extractor -te,iron_furnace Iron Furnace -te,macerator Macerator -te,recycler Recycler -te,solid_canner Solid Canning Machine -te,blast_furnace Blast Furnace -te,block_cutter Block Cutting Machine -te,centrifuge Thermal Centrifuge -te,fermenter Fermenter -te,induction_furnace Induction Furnace -te,metal_former Metal Former -te,ore_washing_plant Ore Washing Plant -te,advanced_miner Advanced Miner -te,crop_harvester Crop Harvester -te,cropmatron Crop-Matron -te,miner Miner -te,matter_generator Mass Fabricator -te,pattern_storage Pattern Storage -te,replicator Replicator -te,scanner Scanner -te,energy_o_mat Energy-O-Mat -te,personal_chest Personal Safe -te,trade_o_mat Trade-O-Mat -te,chargepad_batbox Charge Pad (BatBox) -te,chargepad_cesu Charge Pad (CESU) -te,chargepad_mfe Charge Pad (MFE) -te,chargepad_mfsu Charge Pad (MFSU) -te,batbox BatBox -te,cesu CESU -te,mfe MFE -te,mfsu MFSU -te,electrolyzer Electrolyzer -te,lv_transformer LV-Transformer -te,mv_transformer MV-Transformer -te,hv_transformer HV-Transformer -te,ev_transformer EV-Transformer -te,tank Tank -te,chunk_loader Chunk Loader -te,item_buffer_2 Compact Item Buffer -te,rci_rsh Reactor Coolant Injector (RSH) -te,rci_lzh Reactor Coolant Injector (LZH) -te,creative_generator Creative Generator -te,steam_repressurizer Steam Re-Pressurizer -te,industrial_workbench Industrial Workbench -te,batch_crafter Batch Crafter - -resource: -resource,basalt Basalt -resource,copper_ore Copper Ore -resource,lead_ore Lead Ore -resource,tin_ore Tin Ore -resource,uranium_ore Uranium Ore -resource,bronze_block Bronze Block -resource,copper_block Copper Block -resource,lead_block Lead Block -resource,steel_block Steel Block -resource,tin_block Tin Block -resource,uranium_block Uranium Block -resource,reinforced_stone Reinforced Stone -resource,machine Basic Machine Casing -resource,advanced_machine Advanced Machine Casing -resource,reactor_vessel Reactor Pressure Vessel - -leaves: -leaves Rubber Tree Leaves - -rubber_wood: -rubber_wood Rubber Wood - -sapling: -sapling Rubber Tree Sapling - -scaffold: -scaffold,wood Scaffold -scaffold,reinforced_wood Reinforced Scaffold -scaffold,iron Iron Scaffold -scaffold,reinforced_iron Reinforced Iron Scaffold - -foam: -foam,normal Construction Foam -foam,reinforced Reinforced Construction Foam - -fence: -fence,iron Iron Fence - -sheet: -sheet,resin Resin Sheet -sheet,rubber Rubber Sheet -sheet,wool Wool Sheet - -glass: -glass,reinforced Reinforced Glass - -wall: -wall,black Construction Foam Wall (Black) -wall,blue Construction Foam Wall (Blue) -wall,brown Construction Foam Wall (Brown) -wall,cyan Construction Foam Wall (Cyan) -wall,gray Construction Foam Wall (Gray) -wall,green Construction Foam Wall (Green) -wall,light_blue Construction Foam Wall (Light Blue) -wall,light_gray Construction Foam Wall (Light Gray) -wall,lime Construction Foam Wall (Lime) -wall,magenta Construction Foam Wall (Magenta) -wall,orange Construction Foam Wall (Orange) -wall,pink Construction Foam Wall (Pink) -wall,purple Construction Foam Wall (Purple) -wall,red Construction Foam Wall (Red) -wall,white Construction Foam Wall (White) -wall,yellow Construction Foam Wall (Yellow) - -mining_pipe: -mining_pipe,pipe Mining Pipe - -reinforced_door: -reinforced_door Reinforced Door - - */ diff --git a/src/api/java/ic2/api/item/ICustomDamageItem.class b/src/api/java/ic2/api/item/ICustomDamageItem.class deleted file mode 100644 index 80020b8490b6b3dc9041520697c12ce05bad5070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmah_Jx>Bb5PgFu=QnC$X`+?axCt$tqRA!@3la;vaWh^P@0JTU5cz8s{s4cJaUm3N z4b6Nc@4b0%e*eCI0CaJd;v~f>p_7X~&T5^MeJ(i{!p+?vh?>#|aZ~uWo>pz(=RV{QTuU!|BOHw; zv#FD3U&L@%cJt6O)cu&}Ot|*0Yq;|3v`rM@e2Fs!huplpkHu-5KxoBp0!c#HLlOtV T{<^o3uJ!{QMntp`YYWH!kKJ$Z diff --git a/src/api/java/ic2/api/item/ICustomDamageItem.java b/src/api/java/ic2/api/item/ICustomDamageItem.java deleted file mode 100644 index 4470fa0db..000000000 --- a/src/api/java/ic2/api/item/ICustomDamageItem.java +++ /dev/null @@ -1,56 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * ICustomDamageItem allows items to have custom damage handling without the massive overhead of - * Item.getDamage() / Item.setDamage(), which turn ItemStack.getItemDamage into virtual calls. - * - * The custom damage value is typically stored in the item stacks nbt data. - * - * If an Item implements ICusomDamageItem, the normal ItemStack damage won't be changed by IC2. - * It's up to the implementer to potentially manipulate it for suitable visual effect on the - * rendered damage bar or to provide a suitable item renderer. - * - * Item.isDamageable() still applies. - * - * @author Player - */ -public interface ICustomDamageItem { - /** - * Retrieve the custom damage value for the supplied item stack. - * - * @param stack ItemStack to be queried. - * @return Custom damage value. - */ - int getCustomDamage(ItemStack stack); - - /** - * Retrieve the maximum custom damage value for the supplied item stack. - * @param stack ItemStack to be queried. - * @return Custom damage value limit. - */ - int getMaxCustomDamage(ItemStack stack); - - /** - * Set the custom damage value for the supplied item stack. - * - * @param stack ItemStack to be manipulated. - * @param damage New damage value. - */ - void setCustomDamage(ItemStack stack, int damage); - - /** - * Increase the custom damage value for the supplied item stack. - * - * It's up to the implementation to not apply any damage, e.g. based on some randomness or - * properties of src. - * - * @param stack ItemStack to be manipulated. - * @param damage Extra damage to be applied. - * @param src Entity damaging the item, may be null. - * @return true if damage was applied. - */ - boolean applyCustomDamage(ItemStack stack, int damage, EntityLivingBase src); -} diff --git a/src/api/java/ic2/api/item/IDebuggable.class b/src/api/java/ic2/api/item/IDebuggable.class deleted file mode 100644 index 13c992baf8f97543f6017e2e6d95905ae026ca91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 191 zcmX^0Z`VEs1_mPrZgvJvb_Om+2A<4fm(--v^z_7}oK!{zW)00KpkR7x30O2FwW5TP zK}18-Co8cmQ9ma!FI_*lq$o2l-I|esD>%QjC^^+F6QohV6Jd-VNHHUWL}s#)equqU zer8E(u0E1HP&L9h|D>$cAxI}B0x48|Ee)+^!%LbM!Lg|(}72ANWJXc2>r`NgIL|e^-!EE_vQLeS|i$~SCk(f0Tcyc3xzj?ZS>b#VrQ+p-R$JR HYY%(BR4P|o diff --git a/src/api/java/ic2/api/item/IElectricItem.java b/src/api/java/ic2/api/item/IElectricItem.java deleted file mode 100644 index b94634a63..000000000 --- a/src/api/java/ic2/api/item/IElectricItem.java +++ /dev/null @@ -1,42 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - -/** - * Provides the ability to store energy on the implementing item. - * - * The item should have a maximum damage of 13. - */ -public interface IElectricItem { - /** - * Determine if the item can be used in a machine or as an armor part to supply energy. - * - * @return Whether the item can supply energy - */ - boolean canProvideEnergy(ItemStack stack); - - /** - * Get the item's maximum charge energy in EU. - * - * @return Maximum charge energy - */ - double getMaxCharge(ItemStack stack); - - /** - * Get the item's tier, lower tiers can't send energy to higher ones. - * - * Batteries are Tier 1, Advanced Batteries are Tier 2, Energy Crystals are Tier 3, Lapotron - * Crystals are Tier 4. - * - * @return Item's tier - */ - int getTier(ItemStack stack); - - /** - * Get the item's transfer limit in EU per transfer operation. - * - * @return Transfer limit - */ - double getTransferLimit(ItemStack stack); -} - diff --git a/src/api/java/ic2/api/item/IElectricItemManager.class b/src/api/java/ic2/api/item/IElectricItemManager.class deleted file mode 100644 index dc89a3a67e5e78406028afd35b2ad96dc5a203f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcma))%}xR_6opR}X9Q93UzeI_WaA`kS*bvr1mXg8!LHUi7H2x76r!)@!Uyo7jCTse z#Fz}5o;11VyT4!GAD;l~IP!7eaCs>;kHSWE0d&#;Wmf9Ec}6?M7{RYH14YrLp_IE>kRpn z2Qk-C(6fe$Y%us4K}jkrceWwr>!lMTWLw2FrQ@&_OFRhWnSX>2wPfr&Vk_-N7!A K820F0!Tt~MOU$kS diff --git a/src/api/java/ic2/api/item/IElectricItemManager.java b/src/api/java/ic2/api/item/IElectricItemManager.java deleted file mode 100644 index 3c890d88f..000000000 --- a/src/api/java/ic2/api/item/IElectricItemManager.java +++ /dev/null @@ -1,126 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.item.ItemStack; - -/** - * This interface specifies a manager to handle the various tasks for electric items. - * - * The default implementation does the following: - * - store and retrieve the charge - * - handle charging, taking amount, tier, transfer limit, canProvideEnergy and simulate into account - * - replace item IDs if appropriate (getChargedItemId() and getEmptyItemId()) - * - update and manage the damage value for the visual charge indicator - * - * Implementation hints: - * - operations require the tier to be at least as high as the item being manipulated - * - ignoreTransferLimit = true should allow the total charge to be transferred in one pass - * - externally = false should always allow discharging - * - all simulated operations should be deterministic and repeatable until a non-simulated - * operation happens or the item had a chance to be manipulated elsewhere. - * - usually getCharge(stack) mirrors - * discharge(stack, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, false, true) - * - usually getMaxCharge(stack) mirrors - * getCharge(stack) + charge(stack, Double.POSITIVE_INFINITY, Integer.MAX_VALUE, true, true) - * - * @note If you're implementing your own variant (ISpecialElectricItem), you can delegate to the - * default implementations through ElectricItem.rawManager. The default implementation is designed - * to minimize its dependency on its own constraints/structure and delegates most work back to the - * more atomic features in the gateway manager. - */ -public interface IElectricItemManager { - /** - * Charge an item with a specified amount of energy. - * - * @param stack electric item's stack - * @param amount max amount of energy to charge in EU - * @param tier tier of the charging device, has to be at least as high as the item to charge - * @param ignoreTransferLimit ignore any transfer limits, infinite charge rate - * @param simulate don't actually change the item, just determine the return value - * @return Energy transferred into the electric item - */ - double charge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean simulate); - - /** - * Discharge an item by a specified amount of energy - * - * The externally parameter is used to prevent non-battery-like items from providing power. For - * example discharge slots set externally to true, but items using energy for themselves don't. - * Special cases like the nano saber hitting armor will discharge with externally = false. - * - * @param stack electric item's stack - * @param amount max amount of energy to discharge in EU - * @param tier tier of the discharging device, has to be at least as high as the item to discharge - * @param ignoreTransferLimit ignore any transfer limits, infinite discharge rate - * @param externally use the supplied item externally, i.e. to power something else as if it was a battery - * @param simulate don't actually discharge the item, just determine the return value - * @return Energy retrieved from the electric item - */ - double discharge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean externally, boolean simulate); - - /** - * Determine the charge level for the specified item. - * - * @param stack ItemStack containing the electric item - * @return charge level in EU - */ - double getCharge(ItemStack stack); - - /** - * Determine the charge level for the specified item. - * - * The item may not actually be chargeable to the returned level, e.g. if it is a - * non-rechargeable single use battery. - * - * @param stack ItemStack containing the electric item - * @return maximum charge level in EU - */ - double getMaxCharge(ItemStack stack); - - /** - * Determine if the specified electric item has at least a specific amount of EU. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * BatPacks are not taken into account. - * - * @param stack electric item's stack - * @param amount minimum amount of energy required - * @return true if there's enough energy - */ - boolean canUse(ItemStack stack, double amount); - - /** - * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * - * @param stack electric item's stack - * @param amount amount of energy to discharge in EU - * @param entity entity holding the item, may be null - * @return true if the operation succeeded - */ - boolean use(ItemStack stack, double amount, EntityLivingBase entity); - - /** - * Charge an item from the BatPack a player is wearing. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * use() already contains this functionality. - * - * @param stack electric item's stack - * @param entity entity holding the item - */ - void chargeFromArmor(ItemStack stack, EntityLivingBase entity); - - /** - * Get the tool tip to display for electric items. - * - * @param stack ItemStack to determine the tooltip for - * @return tool tip string or null for none - */ - String getToolTip(ItemStack stack); - - /** - * Get the tier of the specified item. - * @param stack the item to get the tier from. - * @return The tier of the item. - */ - int getTier(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/IItemAPI.class b/src/api/java/ic2/api/item/IItemAPI.class deleted file mode 100644 index 18bc079bd2c212b045a2fc6b43fd1997b2b09617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 443 zcmbV}O>V+45QX2+l<*hIhC8$i7>O;bB7_tPM5Ua-vE0ZI0tzmNW6=X}D8wZEEnrb~ z;~ClWzIl2+9QVHf26*!k_-GS?#JEwq*2~B#X9%aiP*nbBJ}>C zz3modBU=CD+DvRJNd;ly=<_S=7l9GFRu5QhET0vZM?&YG=R95*?WzPqMZN*>Ji-e+ WX$Y^VmeohCtaUVGg3y$+g4PM8%Yi`v diff --git a/src/api/java/ic2/api/item/IItemAPI.java b/src/api/java/ic2/api/item/IItemAPI.java deleted file mode 100644 index 9b72459d0..000000000 --- a/src/api/java/ic2/api/item/IItemAPI.java +++ /dev/null @@ -1,55 +0,0 @@ -package ic2.api.item; - -import net.minecraft.block.Block; -import net.minecraft.block.state.IBlockState; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * A simple interface for the ItemAPI. - * @author Aroma1997 - * - */ -public interface IItemAPI { - - /** - * Get the default blockstate for a specific block name and variant.
- * For machines etc, you might want to make your detection a bit more fuzzy, - * because the BlockState also contains properties like the facing and the active - * state of a machine. - * @param name The name of the block. - * @param variant The variant of the block. - * @return The default state of the block with that variant. - */ - IBlockState getBlockState(String name, String variant); - - /** - * Get an ItemStack for a specific item name. - * - * @param name - * item name - * @param variant - * the variant/subtype for the Item. - * @return The item or null if the item does not exist or an error occurred - */ - ItemStack getItemStack(String name, String variant); - - /** - * Get a Block for a specific block name. - * - * @param name - * block name - * @return The Block or null if the block does not exist or an error occurred - */ - Block getBlock(String name); - - /** - * Get an Item for a specific block name. - * - * @param name - * item name - * @return The Item or null if the block does not exist or an error occurred - */ - Item getItem(String name); - -} diff --git a/src/api/java/ic2/api/item/IItemHudInfo.class b/src/api/java/ic2/api/item/IItemHudInfo.class deleted file mode 100644 index 4602f697b718365b0d5a8abe670ee41241590dad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmb7;GqylVCc$X z{g&*{pO2^CKL81yLqs8BLR?wd4ExNL9bvu5ofXxxv!>UjC>GnQ%$Gv6Ii%ZVUh5yN z2H{5K{4FUVD!6i5hTan1@7;gB@*3?bRY=dSO5Z#)F1n#N_JbP_on;q+o8#(opD<^W qDE-AZ!G8mUmr-#Adds info to {@link IItemHudProvider}s for the given stack. - * Return an empty list not null if no info is given.

- * - *

-	 *	{@literal @}override
-	 *	public List{@literal <}String{@literal >} getHudInfo(ItemStack stack, boolean advanced) {
-	 *		List{@literal <}String{@literal >} info = new LinkedList{@literal <}String{@literal >}();
-	 *		info.add("I am a cool item");
-	 *		info.add("and have cool info.");
-	 * 		return info;
-	 * 	}
-	 *	
- * - * @param stack The stack to get information for - * @param advanced Whether the HUD is in extended or advanced display mode - * @return A list of strings to draw in the overlay - */ - public List getHudInfo(ItemStack stack, boolean advanced); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/item/IItemHudProvider$IItemHudBarProvider.class b/src/api/java/ic2/api/item/IItemHudProvider$IItemHudBarProvider.class deleted file mode 100644 index f8ee4fcbd4536e205077e4e92033d09512365213..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmaJ+&1%9x5dOxWL{kHTc=S;4pqDP@+M5M2AT;0;Y}ZlN##J^OAI^gh(1((4BwmX2 z^35>w{mlH_E>{2v;t-t>FNAoRX&kh98=OBAk_iXl-WM4YuKqKOtm!NLZr7xZ zZy=O$G53b=Y%Y{u9kxz-G1UuAIR0V&Eg~FNGL>sLQ4cRuHi2;Yr{%O}Y<(pn5E}A8 cpwT2mhyj@`w5tu0@4km!nTaTOq?%Ft3#rX$&Hw-a diff --git a/src/api/java/ic2/api/item/IItemHudProvider.java b/src/api/java/ic2/api/item/IItemHudProvider.java deleted file mode 100644 index baeb68306..000000000 --- a/src/api/java/ic2/api/item/IItemHudProvider.java +++ /dev/null @@ -1,46 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; - -/** - * An interface to show that an {@link Item} can display the HUD overlay if worn. - * - * @author Chocohead - */ -public interface IItemHudProvider { - /** - * Whether the given stack should display the HUD overlay. - * - * @param stack The stack currently being worn - * @return Whether the HUD overlay should be drawn - */ - boolean doesProvideHUD(ItemStack stack); - - /** - * Gets the current {@link HudMode} of the worn stack (probably stored as NBT) - * - * @param stack The stack currently being worn - * @return The HUD overlay mode - */ - HudMode getHudMode(ItemStack stack); - - /** - *

Override the percent shown by the HUD overlay for the applied item.

- * - *

By default, {@link IElectricItem}s have the percentage charged shown, - * damageable items have their {@link Item#getDurabilityForDisplay(ItemStack)} values shown - * and items that don't apply to either aren't shown at all.

- * - * @author Chocohead - */ - public static interface IItemHudBarProvider { - /** - * Get the percent to show in the overlay HUD for the given stack. - * - * @param stack The stack to get the percent for. - * @return A number between 0 and 100, less than 0 will not render the item at all. - */ - int getBarPercent(ItemStack stack); - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class b/src/api/java/ic2/api/item/IKineticRotor$GearboxType.class deleted file mode 100644 index 4c6ab9db614f136d3ad60d6095365e3602a6cfee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1125 zcmb7DZEw<06n-u(6iUY!FdaBwrZ{<-RB(O~varm}5D7~LvMhcowPKgjE~PB`uaqUu zXf*rmk20Ry5eHEdyiM-Sz2`aSdCp6J{QUAAKn0r-h*+2L067Us2?ZGnihSD$V?ie4 z21h&$V~L+72`WSIaJ#d6zz}_IXl~DW*Li1LgtCMR!}@$(R$Hb_TaxfANKf#a2>7pZLM(hn@B$*o z2WIdYdQmP>xPevQPNgCgXDmaY50DDQ)pLYC`sQi6D|ZRExpds|F>45u+_j027A3-0 z=_|yege06Je1?dBkwyO!4Spk&Fs1=J632+P&%ij_WpXiJM2d>Ej0_b)1BgOZ^DJd7f$+C{Gl%g5a z@F$O8!`dCK8or$AG>SVH4QrJIaJmv~v;HKI?(J#<4OV+ECh}DZ9Itm1sC@VM zp)_OvVK5=Z0%z;{SEuI$1TyaDfm~J~2M=(#gWUx4C?r@+`BI8y>^VgSm89-t+hN{0 KZMl=ZJo*CNd#hsr diff --git a/src/api/java/ic2/api/item/IKineticRotor.java b/src/api/java/ic2/api/item/IKineticRotor.java deleted file mode 100644 index a61d1622c..000000000 --- a/src/api/java/ic2/api/item/IKineticRotor.java +++ /dev/null @@ -1,23 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public interface IKineticRotor { - int getDiameter(ItemStack stack); - - ResourceLocation getRotorRenderTexture(ItemStack stack); - - float getEfficiency(ItemStack stack); - - int getMinWindStrength(ItemStack stack); - - int getMaxWindStrength(ItemStack stack); - - boolean isAcceptedType(ItemStack stack, GearboxType type); - - public static enum GearboxType { - WATER, - WIND, - } -} diff --git a/src/api/java/ic2/api/item/IMetalArmor.class b/src/api/java/ic2/api/item/IMetalArmor.class deleted file mode 100644 index 426278ae3f8ae70040b8b67ea394f3c7bcaa0388..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 217 zcmZ9GJqp4=6olu+n5bA-dIW7;NSn$+A*d*%vs;&^Y|J0)D&%Sw9>7D1Ne}`y!wlcR z%=`0v0SGYk;rkd6#`?BnE7PUP3Pae;wmDmo>7133XDhVjOhmQBR;p|GM>)6JR-#O0 z#YU{!bZA33KN3c9aW{(BI%UEn>V_7Hd`QAnt3b$7|5iF)x0{AYWquL+Q^Lx61cFna P2goJ#;5H8ZS{-;_nNvO= diff --git a/src/api/java/ic2/api/item/IMetalArmor.java b/src/api/java/ic2/api/item/IMetalArmor.java deleted file mode 100644 index 16ffd24e5..000000000 --- a/src/api/java/ic2/api/item/IMetalArmor.java +++ /dev/null @@ -1,20 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; - -/** - * Armor items implementing this can be considered metal armor. - * - * Currently used for determining which boots can be used to slide up a magnetic pole. - */ -public interface IMetalArmor { - /** - * Determine if the given armor piece is metal armor. - * - * @param itemstack Armor piece as worn by the player - * @param player The player - * @return Whether the armor piece is metal armor - */ - public boolean isMetalArmor(ItemStack itemstack, EntityPlayer player); -} diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.class b/src/api/java/ic2/api/item/ISpecialElectricItem.class deleted file mode 100644 index b21e26d120f01793f4e260be912d1a4c63334865..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmZvXF$%&!5JmsQn5dPlrJXh|q)jObfrv#;FfL=*xQQXG9?rr8cqnlLDHLoz1OM@c z|9U^301`}N#4#p>St;(o4VTgpwyV4mr)txP?)dDKaZ;#ftWH&zIXtY}3Ww%_cg;yV+TzqUUhVcw(4a#O0~sq*h40wM4t0162s Lg#CrF&j8T}Q0zcx diff --git a/src/api/java/ic2/api/item/ISpecialElectricItem.java b/src/api/java/ic2/api/item/ISpecialElectricItem.java deleted file mode 100644 index 14218d8c1..000000000 --- a/src/api/java/ic2/api/item/ISpecialElectricItem.java +++ /dev/null @@ -1,13 +0,0 @@ -package ic2.api.item; - -import net.minecraft.item.ItemStack; - -public interface ISpecialElectricItem { - /** - * Supply a custom IElectricItemManager. - * - * @param stack ItemStack to get the manager for - * @return IElectricItemManager instance - */ - IElectricItemManager getManager(ItemStack stack); -} diff --git a/src/api/java/ic2/api/item/ITeBlockSpecialItem.class b/src/api/java/ic2/api/item/ITeBlockSpecialItem.class deleted file mode 100644 index 5d2b1a280a88b1ab81cff56dd8048b403b4b5dbd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 325 zcmah_u}(rk5S#_%DK;iFmfC5QeSD5pM5hUK6+0tBJBqY?HP;&7)3Y zHk11|!qrOCb7<7ff{|o{C&+)YU#`Yk^@*eUMx#bvxL`Ki7E?Z2zvwRPqtTxe6T+ZA zB2U&S;d=V24@FdO)mU*Q;b<)fA>3FqX4%?P^uN5^pfK5qU-5jgR+IV!LMJ~6==2C( Q^nkq2(9Z~=Dmc!+0izjWD*ylh diff --git a/src/api/java/ic2/api/item/ITeBlockSpecialItem.java b/src/api/java/ic2/api/item/ITeBlockSpecialItem.java deleted file mode 100644 index 7d9ca63eb..000000000 --- a/src/api/java/ic2/api/item/ITeBlockSpecialItem.java +++ /dev/null @@ -1,35 +0,0 @@ -package ic2.api.item; - -import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.item.ItemStack; - -import ic2.api.info.ITeBlock; - -/** - * Change the default icon for an {@link ITeBlock} by implementing this. - * - * @since IC2 2.6.85 - * @version 1.0 - * - * @see {@link ITeBlock} for more information - * - * @author Chocohead - */ -public interface ITeBlockSpecialItem { - /** - * Should the model be delegated to the {@link ITeBlock} or the default used? - * - * @param stack The itemstack being rendered - * @return Whether the {@link ITeBlock} will return an {@link ModelResourceLocation} - */ - boolean doesOverrideDefault(ItemStack stack); - - /** - * The {@link ModelResourceLocation} for the given stack. - * Will still use the default even if {@link #doesOverrideDefault(ItemStack)} returns true if this returns null. - * - * @param stack The itemstack being rendered - * @return The model location to be used - */ - ModelResourceLocation getModelLocation(ItemStack stack); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/item/ITerraformingBP.class b/src/api/java/ic2/api/item/ITerraformingBP.class deleted file mode 100644 index d244d1fc5c6b02f1564e9145553f8e0013a952ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512 zcmb7>y-ve06ot<%p=rbKz{tWz7c6znR(_;NNJJC~i2=zN6WlsZ<=%k$27M+59)O2J zxDgCwfiCCz%Ab9%k3T-&-T@4;7h@;JE+Hv2pH^;Omzr>NeCafc(m1WWd}3i(mm&)? zW~rv>;Ed1<2d*k_Thzc$< diff --git a/src/api/java/ic2/api/item/ITerraformingBP.java b/src/api/java/ic2/api/item/ITerraformingBP.java deleted file mode 100644 index 9b27279fe..000000000 --- a/src/api/java/ic2/api/item/ITerraformingBP.java +++ /dev/null @@ -1,42 +0,0 @@ -package ic2.api.item; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -/** - * Allows an item to act as a terraformer blueprint. - */ -public interface ITerraformingBP { - /** - * Get the energy consumption per operation of the blueprint. - * @param stack TODO - * - * @return Energy consumption in EU - */ - double getConsume(ItemStack stack); - - /** - * Get the maximum range of the blueprint. - * Should be a divisor of 5. - * @param stack TODO - * - * @return Maximum range in blocks - */ - int getRange(ItemStack stack); - - boolean canInsert(ItemStack stack, EntityPlayer player, World world, BlockPos pos); - - /** - * Perform the terraforming operation. - * @param stack TODO - * @param world world to terraform - * @param x X position to terraform - * @param z Z position to terraform - * @param yCoord Y position of the terraformer - * - * @return Whether the operation was successful and the terraformer should consume energy. - */ - boolean terraform(ItemStack stack, World world, BlockPos pos); -} diff --git a/src/api/java/ic2/api/item/ItemWrapper.class b/src/api/java/ic2/api/item/ItemWrapper.class deleted file mode 100644 index 5454f5effb4687138c583cb8d368fbacb325101c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2403 zcmb_eZBrXn7(F*HEJ>C^X`s+zTPl^j0IO6{8$^M&icL}k1Y2J(>6&ic>}HmYQ+^7+ zz%Tt`ooU4nPCMf#e}pss4QG5gce5dwG-EsC&gAZW?tSj_oafwg@8;LPe)<`}Jiba| z2yZ4Zh__OB8&{GjU{UqnNnr`^rtlt?RkNaDHH8GOD%WcouBV{m{UkoXnuZTG+z`-r z-TQLaHrIT!wkI%EthhC!>bh0iG}x`V4qvuyR(zw>uzjm0>jiLcTrWg->;FtuI*J}- z>sz!O%U=?RX0qD?u~qjDiyJHwbGcF5HN7oGlfZD%tw?)YdX}=o!I*#7B70{#s$qdU zo~+kRPnF}DRcp^Ty|6}s%b6FYB|xUg6BzHgRzM3kRp4|7q87gb>56n#%uV0*%sXq& zmh0MFBrw?%)21&g-xRX91>$?ED{!tCgr=*&K+q}4dO(wgqJ|O~Y!T7k0fB{{c{?T2 zUR6+Z#HA8QH}}WfsB&wsZ42D!nXHMtqb}3&Eq~vr+j8IZjBA0l9vA@~$=Z>U1p1m@ z0=ef8BGA8Bu|xSKH{FI;F|S)nY(q-;p@in{$#12O(-_ln62ltGI&NZJ!$&$cu&HAU zA8Xjwv4c;@vyNN1t>aUCCNT2ML#AU2mvoF^SYYhm9&NI877DP*+p_1${UWcO*5yrwRyXE~xb9Wa5H zXeDqC=flNU5oJPpJVYdyKSVT&opy|5FqcM(092gOrY|lKta@}@#LJA7P+AWoKB7;I zbLHG4#EJ~dsPPC6(I-%vIfN!~fC+Z`1)d;Lp3NO18R1ww_Tam}f6qTf;sC>WP92+w zK48Qsi2#3nY{w91Z+rV boxableItems = ArrayListMultimap.create(); - private static final Multimap metalArmorItems = ArrayListMultimap.create(); - - public static void registerBoxable(Item item, IBoxable boxable) { - boxableItems.put(item, boxable); - } - - public static boolean canBeStoredInToolbox(ItemStack stack) { - Item item = stack.getItem(); - // use customs first to allow for overriding behavior - for (IBoxable boxable : boxableItems.get(item)) { - if (boxable.canBeStoredInToolbox(stack)) return true; - } - - if (item instanceof IBoxable && ((IBoxable) item).canBeStoredInToolbox(stack)) return true; - - return false; - } - - public static void registerMetalArmor(Item item, IMetalArmor armor) { - metalArmorItems.put(item, armor); - } - - public static boolean isMetalArmor(ItemStack stack, EntityPlayer player) { - Item item = stack.getItem(); - // use customs first to allow for overriding behavior - for (IMetalArmor metalArmor : metalArmorItems.get(item)) { - if (metalArmor.isMetalArmor(stack, player)) return true; - } - - if (item instanceof IMetalArmor && ((IMetalArmor) item).isMetalArmor(stack, player)) return true; - - return false; - } -} diff --git a/src/api/java/ic2/api/network/ClientModifiable.class b/src/api/java/ic2/api/network/ClientModifiable.class deleted file mode 100644 index dea7b6fc1a63553ec6f9a944c007bb581102bcc9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 400 zcmah_Jx>Bb5PhTKDSlyLVT{pOP`U}NmBAw+0X64oW3`+kSzLC>v4`QWS?~k=QN%e5 z&lnPmot>HY=Ht!h@?!y@g~JH@5e_0W2=xbFR;WUrm`K?mdAlyKfFIm&7`RQd-{2?yyUlq*7QrfnhZoBvSny*1ff3Zmrk zHtqIf!s+UgROdqu!n|0G$Ck%3KAlgvoZsojy&GB8WG$s9MmY}eK7Uhx~A-UNYb{Hwg&?f(OC-WF2LU%*rsEeK!w2KpraCu31#1 zp}YC0qMH8w+wB32Fc9bnbOm|>eL}nNHki5g$^}9ct7KlmS@71a2+#3kt$(!KXt$Cl z_;ysaywQuwS&tL-k1F3VPHv5?nPs_8&4=9>!a#lctl*e&zFZprdJH1G*mNZI)=FnW zk@;_Vts->K2Ti}$Cgsz6C9;`(*Fh_{&6)Kt*)$Ifn*>6QtB#2O5k-Usn!FGM?#g+O PRyo^vUr>?MzcW`AXPQCjbc7-u4w@mBEqU%_Nwk{1{>Ye0C zj!b+N3=iyFsEc&8HF#GQrGM*h0)(rzJHq8&h`*Kz?cFeh^9^OaO2@yMA_Ac%F9Yfg baf62713~K^2@~URhdDx1=7eLZHMD*JGaq8Z diff --git a/src/api/java/ic2/api/network/INetworkCustomEncoder.java b/src/api/java/ic2/api/network/INetworkCustomEncoder.java deleted file mode 100644 index 86885139c..000000000 --- a/src/api/java/ic2/api/network/INetworkCustomEncoder.java +++ /dev/null @@ -1,36 +0,0 @@ -package ic2.api.network; - -import java.io.IOException; - -/** - * Allow extensions to {@link ic2.core.network.DataEncoder} for encoding custom data types not already handled by IC2. - * Register this to DataEncoder itself using #addNetworkEncoder(Class, INetworkCustomEncoder). - * - * @author Chocohead - */ -public interface INetworkCustomEncoder { - /** - * Encode the given instance into the buffer - * - * @param buffer The network buffer - * @param instance The instance being encoded - * - * @throws IOException Because {@link ic2.core.network.DataEncoder#encode(IGrowingBuffer, Object, boolean)} does. - */ - void encode(IGrowingBuffer buffer, Object instance) throws IOException; - - /** - * @param buffer The network buffer - * - * @return The instance the information on the network represents - * - * @throws IOException Because {@link ic2.core.network.DataEncoder#decode(IGrowingBuffer, ic2.core.network.DataEncoder.EncodedType)} does. - */ - Object decode(IGrowingBuffer buffer) throws IOException; - - /** - * @return false the type accesses the world or otherwise requires to be run on the main thread, - * true if it doesn't. - */ - boolean isThreadSafe(); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.class b/src/api/java/ic2/api/network/INetworkDataProvider.class deleted file mode 100644 index e0773c4767444199669bc57a4702a51d6098b700..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 248 zcmZvXF$%&!6h!B1G$uA;XD_0S3uz-(A_$^FPOv6R_%S51+34LYJb;H1*J!8R%x8u- z|M9%t0R-r~@Lc$WVXDkdnQN&}Dp|A2lgb{avu!3XQq+cXvE|By1TW&Wkfzp(F!>2A zK80Kssfdi`A`O?epe((^ZnFy=TA^30<6j1m8`gh4Z_ eq3n;DicOb5XxX0tatLiW)_1IHp=*`fsNM?&aYTCn diff --git a/src/api/java/ic2/api/network/INetworkDataProvider.java b/src/api/java/ic2/api/network/INetworkDataProvider.java deleted file mode 100644 index f5a3d24b9..000000000 --- a/src/api/java/ic2/api/network/INetworkDataProvider.java +++ /dev/null @@ -1,21 +0,0 @@ -package ic2.api.network; - -import java.util.List; - -/** - * Tile entities which want to synchronized specific fields between client and server have to implement this. - * - * The fields don't update themselves, a field update must be sent every time a synchronized field changes. - */ -public interface INetworkDataProvider { - /** - * Get the list of synchronized fields. - * - * If a name contains =, the name will be split into the actual name and the value, avoiding a - * field read. - * - * @return Names of the synchronized fields - */ - List getNetworkedFields(); -} - diff --git a/src/api/java/ic2/api/network/INetworkItemEventListener.class b/src/api/java/ic2/api/network/INetworkItemEventListener.class deleted file mode 100644 index 30dcc22e0979c10999c8caadba4e6b439bfb43a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmZ{f!HU8_5JamrYt)1I1)kT74PHG*2!vG-yw47;OcEzDwu-;D2S31%T6Pllw6K?= zi{^DzzrMeo0G1e~NK*_6lg59D-kVTmH}Og+-U~0vC+Ecmb5M3FC(fhn)YxkEXB!!( z4?frCA%U~bZ9B8d=X=6<*Ia{@wX20N%YU=lb6sBHE-GHaqBJ){m^-^CIL0UxNuj8D=7?x3>OTq=E4W?p^Tjl z1Zh~fnUhKH`R+Zv{r>s<0#L_E5tSm21+H(ICirTr7Ls#oD4)(H8w`e!tE45U$0}SbwIz@+tl- zsr_g|rW?AOi|-XHfvRuY+&ndxI-_Y4QPXZo;52+7{um{Lwlb@2;}UO0SbA6E#v{K+bB3KV#nz&N>2B%@ALqN)?p*rZw}>O DUCqRL diff --git a/src/api/java/ic2/api/network/INetworkManager.java b/src/api/java/ic2/api/network/INetworkManager.java deleted file mode 100644 index 81a55f778..000000000 --- a/src/api/java/ic2/api/network/INetworkManager.java +++ /dev/null @@ -1,30 +0,0 @@ -package ic2.api.network; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -/** - * This is just here for the API functions. - * Do not implement by yourself. - * - * @see NetworkHelper - * - * @author Aroma1997 - * - */ -public interface INetworkManager { - - void updateTileEntityField(TileEntity te, String field); - - void initiateTileEntityEvent(TileEntity te, int event, boolean limitRange); - - void initiateItemEvent(EntityPlayer player, ItemStack stack, int event, boolean limitRange); - - void initiateClientTileEntityEvent(TileEntity te, int event); - - void initiateClientItemEvent(ItemStack stack, int event); - - void sendInitialData(TileEntity te); - -} diff --git a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.class b/src/api/java/ic2/api/network/INetworkTileEntityEventListener.class deleted file mode 100644 index d7f438676332088f60d2b00168bc7c07afbdc3ca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 191 zcmX^0Z`VEs1_mPrPId-%b_Nbc2EP0}ztocQ{Gx2vvedj1Mg|rQPt7n!2Cm@z(xT*4 zx6GVWMg|p6sG1NU*EO#sv!oKN+9$KPBsDL!NG~g~ERm5xKQq}#Kd~TFKM!J}J^^iv u3<4mH`ZH7XjS*gh-Y>W(y3`{^LGB7Z*FfuSRuz*+$tU!{9feio-*fo&= diff --git a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java b/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java deleted file mode 100644 index fbb4753c5..000000000 --- a/src/api/java/ic2/api/network/INetworkTileEntityEventListener.java +++ /dev/null @@ -1,14 +0,0 @@ -package ic2.api.network; - -/** - * Allows a tile entity to receive network events received from the server. - */ -public interface INetworkTileEntityEventListener { - /** - * Called when a network event is received. - * - * @param event Event ID - */ - void onNetworkEvent(int event); -} - diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.class b/src/api/java/ic2/api/network/INetworkUpdateListener.class deleted file mode 100644 index db801296f1c3662237736515c3dfc0612bfb7b9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 191 zcmX^0Z`VEs1_mPrPId-%b_Nbc2LAj!ztocQ{G#m8f|SIPR7M6-4WF#UvPAuy#JqI< z;F6-uymV{LFh&Nh;QZ2} diff --git a/src/api/java/ic2/api/network/INetworkUpdateListener.java b/src/api/java/ic2/api/network/INetworkUpdateListener.java deleted file mode 100644 index 09414ae38..000000000 --- a/src/api/java/ic2/api/network/INetworkUpdateListener.java +++ /dev/null @@ -1,14 +0,0 @@ -package ic2.api.network; - -/** - * Allows a tile entity to receive field sync updates received from the server. - */ -public interface INetworkUpdateListener { - /** - * Called when a field is synchronized. - * - * @param field field synchronized - */ - void onNetworkUpdate(String field); -} - diff --git a/src/api/java/ic2/api/network/NetworkHelper.class b/src/api/java/ic2/api/network/NetworkHelper.class deleted file mode 100644 index 87e27c3be007743610fef988d688c3073bc7dfe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2956 zcma)8TXWk)6#mw^sFu|xahkNW>6J7%PKao@*QLpT8`ykVra_@FEF%ExJ82M%3F?@S*t7yZ=NsPbdt`yCbt*3XUX^Iu-(6F zRT)k-5l6h&guNQj_N}cJxi97|TTD5=142kvZzCx@zMbE}jVo3zi?5GZLVv%)KJq;_cH9Uu-8jj$of{FxjG`Lt*a9@LmA&Nmm z6~2Ns4eNNoFi;y2hHZ;7w=bKfs8**u&-G;W#YSU8$PC>z_u1up!j!GwFqvw1w}U1O zW4jwq7xEKPBq-S%^i?`cz_ogazBmmv5}uK_xWC42`ULi6>O8^<$_+2# zJblso>4!lAs;p(&sj{%?nFNz9LhAs%>GWju?8rU=`;9gUoS?NcI6R4ywAVrdoWf~( zOUf>y6X|TAjqHJ*r$}s~?J3%`BU|WbLk&m`46dLX69HI%=z!-jNRH%+a~LAHr0mNG zb{_2n45VwY#|O61+1`YEi~Mf~xTiypXSit$BO3&s#t24Vgr+9aiOj6FM2x|w$k8dH_toUc7_~$JY50y#EskbYv+6?;z!G75QD>aaRJ(1u^ zIc+1@>-3bFcV#z``VPtlv_~5__=t|$f-*Z4+}hVr@C{PaAH)@^;zSTr5{Z9tOu?i=|C%De H1g8H7BV*nc diff --git a/src/api/java/ic2/api/network/NetworkHelper.java b/src/api/java/ic2/api/network/NetworkHelper.java deleted file mode 100644 index 9e7bcfea1..000000000 --- a/src/api/java/ic2/api/network/NetworkHelper.java +++ /dev/null @@ -1,170 +0,0 @@ -package ic2.api.network; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.Loader; -import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.relauncher.Side; - -import ic2.api.info.Info; - -/** - * Provides methods to initiate events and synchronize tile entity fields in SMP. - * - * The methods are transparent between singleplayer and multiplayer - if a method is called in - * singleplayer, the associated callback will be locally executed. The implementation is different - * between the client and server versions of IC2. - * - * You'll usually want to use the server->client methods defined here to synchronize information - * which is needed by the clients outside the GUI, such as rendering the block, playing sounds or - * producing effects. Anything which is only visible inside the GUI should be synchronized through - * the Container class associated to the GUI in Container.updateProgressBar(). - * - * All methods in this class use the current effective side to determine the Network Manager to use. - * If you do not want it to use the effective side, use {@link #getNetworkManager(Side)} to get the - * Network Manager for a specific side. - */ -public final class NetworkHelper { - // server -> client - - - /** - * Schedule a TileEntity's field to be updated to the clients in range. - * - * The updater will query the field's value during the next update, updates happen usually - * every 2 ticks. If low latency is important use initiateTileEntityEvent instead. - * - * IC2's network updates have to get triggered every time, it doesn't continuously poll/send - * the field value. Just call updateTileEntityField after every change to a field which needs - * network synchronization. - * - * The following field data types are currently supported: - * - int, int[], short, short[], byte, byte[], long, long[] - * - float, float[], double, double[] - * - boolean, boolean[] - * - String, String[] - * - ItemStack - * - NBTBase (includes NBTTagCompound) - * - Block, Item, Achievement, Potion, Enchantment - * - BlockPos, ChunkCoordIntPair - * - TileEntity (does not sync the actual tile entity, instead looks up the tile entity by its position in the client world) - * - World (does not sync the actual world, instead looks up the world by its dimension ID) - * - * Once the update has been processed by the client, it'll call onNetworkUpdate on the client- - * side TileEntity if it implements INetworkUpdateListener. - * - * If this method is being executed on the client (i.e. Singleplayer), it'll just call - * INetworkUpdateListener.onNetworkUpdate (if implemented by the te). - * - * @param te TileEntity to update - * @param field Name of the field to update - */ - public static void updateTileEntityField(TileEntity te, String field) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).updateTileEntityField(te, field); - } - - /** - * Immediately send an event for the specified TileEntity to the clients in range. - * - * If this method is being executed on the client (i.e. Singleplayer), it'll just call - * INetworkTileEntityEventListener.onNetworkEvent (if implemented by the te). - * - * @param te TileEntity to notify, should implement INetworkTileEntityEventListener - * @param event Arbitrary integer to represent the event, choosing the values is up to you - * @param limitRange Limit the notification range to (currently) 20 blocks instead of the - * tracking distance if true - */ - public static void initiateTileEntityEvent(TileEntity te, int event, boolean limitRange) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).initiateTileEntityEvent(te, event, limitRange); - } - - /** - * Immediately send an event for the specified Item to the clients in range. - * - * The item should implement INetworkItemEventListener to receive the event. - * - * If this method is being executed on the client (i.e. Singleplayer), it'll just call - * INetworkItemEventListener.onNetworkEvent (if implemented by the item). - * - * @param player EntityPlayer holding the item - * @param stack ItemStack containing the item - * @param event Arbitrary integer to represent the event, choosing the values is up to you - * @param limitRange Limit the notification range to (currently) 20 blocks instead of the - * tracking distance if true - */ - public static void initiateItemEvent(EntityPlayer player, ItemStack stack, int event, boolean limitRange) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).initiateItemEvent(player, stack, event, limitRange); - } - - /** - * Send initial TileEntity data to the clients. Requires the te to implement - * {@link INetworkDataProvider}. - * @param te The te to send the initial data for. - */ - public static void sendInitialData(TileEntity te) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).sendInitialData(te); - } - - - // client -> server - - /** - * Immediately send an event for the specified TileEntity to the server. - * - * This method doesn't do anything if executed on the server. - * - * @param te TileEntity to notify, should implement INetworkClientTileEntityEventListener - * @param event Arbitrary integer to represent the event, choosing the values is up to you - */ - public static void initiateClientTileEntityEvent(TileEntity te, int event) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).initiateClientTileEntityEvent(te, event); - } - - /** - * Immediately send an event for the specified Item to the clients in range. - * - * The item should implement INetworkItemEventListener to receive the event. - * - * This method doesn't do anything if executed on the server. - * - * @param stack ItemStack containing the item - * @param event Arbitrary integer to represent the event, choosing the values is up to you - */ - public static void initiateClientItemEvent(ItemStack stack, int event) { - getNetworkManager(FMLCommonHandler.instance().getEffectiveSide()).initiateClientItemEvent(stack, event); - } - - /** - * This will return the NetworkManager for the given side. - * @param side the side to get the NetworkManager for. - * @return The NetworkManager for the given side. - */ - public static INetworkManager getNetworkManager(Side side) { - if (side.isClient()) { - return clientInstance; - } - else { - return serverInstance; - } - } - - private static INetworkManager serverInstance; - private static INetworkManager clientInstance; - - /** - * Sets the internal INetworkManager instance. - * ONLY IC2 CAN DO THIS!!!!!!! - */ - public static void setInstance(INetworkManager server, INetworkManager client) { - ModContainer mc = Loader.instance().activeModContainer(); - if (mc == null || !Info.MOD_ID.equals(mc.getModId())) { - throw new IllegalAccessError(); - } - serverInstance = server; - clientInstance = client; - } -} - diff --git a/src/api/java/ic2/api/reactor/IBaseReactorComponent.class b/src/api/java/ic2/api/reactor/IBaseReactorComponent.class deleted file mode 100644 index 2c33a15c6ba60c070d31fddbdf1da361c861d351..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 225 zcmZvXF$%&!6h!B1OjHo8?FDUIuuZ2R1O&x&cHi|Y8j|HKE+F;r;011oUrz# zQ_1E7@pwz - * Items already in the reactor won't get spilled out. This only gets called, - * when placing the item in. - * @param stack The given reactor component. - * @param reactor The specific reactor to place the item in. - * @return If the item is accepted in the reactor. - */ - boolean canBePlacedIn(ItemStack stack, IReactor reactor); - -} diff --git a/src/api/java/ic2/api/reactor/IReactor.class b/src/api/java/ic2/api/reactor/IReactor.class deleted file mode 100644 index 7878499fb08cb51c36a261b3b6474a84cbe6a2a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 737 zcmZ8f%TC)s6uko}ZW1VzHoW?PLR*|oM`GI*qKU8sLV~o5?uPMoG~jq5Gp^v*y66Y= zqpBWH#ud%NK6B4K_c6!*{paT|B08eOh~7u^A)=3h+GBPnw&W2DI*j{g1v@!01?y5} zPCAn_7tXi`Il^(^kDmoas5)ik1TDt>1o2%Hx8kJ#4TMV5nV=@1=%C_U-OsoVAi7e91~XTMh~?#}5~kn^xFz>rvwC z|0!JH3v9p=jks=xS+z5XY@r0hcK9_>|fnJJj{K9Qc*MKMS}@Yd-&+);+!m@k{FYc!M@QZqc^K9eU;QHNElp UHuT-4Js-cT5qs_9y+8+l0ky}j+yDRo diff --git a/src/api/java/ic2/api/reactor/IReactor.java b/src/api/java/ic2/api/reactor/IReactor.java deleted file mode 100644 index 963cfa951..000000000 --- a/src/api/java/ic2/api/reactor/IReactor.java +++ /dev/null @@ -1,148 +0,0 @@ -package ic2.api.reactor; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -import ic2.api.info.ILocatable; - -/** - * Interface implemented nuclear reactors, expected to be a {@link TileEntity}, but does not have to be. - */ -public interface IReactor extends ILocatable { - /** - * Return the tile entity representing the reactor core. - *
- * If null, {@link #getReactorWorld()} and {@link #getReactorPos()} can still be used if it's world and/or position are desired. - * - * @return the reactor core's TE or null. - */ - public TileEntity getCoreTe(); - - /** - * Get the reactor's heat. - * - * @return The reactor's heat - */ - public int getHeat(); - - /** - * Set the reactor's heat. - * - * @param heat reactor heat - */ - public void setHeat(int heat); - - /** - * Increase the reactor's heat. - * - * Use negative values to decrease. - * - * @param amount amount of heat to add - * @return The reactor's heat after adding the specified amount - */ - public int addHeat(int amount); - - /** - * Get the reactor's maximum heat before exploding. - * - * @return Maximum heat value - */ - public int getMaxHeat(); - - /** - * Set the reactor's stored maxHeat variable. - * Used by plating to increase the reactors MaxHeat capacity. - * Needs to be called during each cycle process. - */ - public void setMaxHeat(int newMaxHeat); - - /** - * add Heat to a EmitHeat Buffer - * for use in Reactor operation.. need to be use - * for all Componetents with self-cooling - * no more magic heat disappear - */ - - - public void addEmitHeat(int heat); - - /** - * Get's the reactor's HEM (Heat Effect Modifier) - * Basic value is 1.0F. - * Reducing the value causes a weakening/reduction of the heat-based sideeffects of reactors - * (F.e. water evaporation, melting, damaging entitys, etc) - * - * @return HEM - */ - public float getHeatEffectModifier(); - - /** - * Set's the reactor's HEM - * Needs to be called during each cycle process. - */ - public void setHeatEffectModifier(float newHEM); - - /** - * Get the reactor's energy output. - * - * @return Energy output, not multiplied by the base EU/t value - */ - public float getReactorEnergyOutput(); - - /** - * Get the reactor's energy output. - * - * @return Energy output, multiplied with base EU/t value and MainConfig.get().getFloat("balance/energy/generator/nuclear") - */ - public double getReactorEUEnergyOutput(); - - /** - * Add's the given amount of energy to the Reactor's output. - * - * @return Energy output after adding the value, not multiplied by the base EU/t value - */ - public float addOutput(float energy); - - /** - * Get the item at the specified grid coordinates. - * - * @param x X position of the item, out of bounds returns null - * @param y Y position of the item, out of bounds returns null - * @return The item or null if there is no item - */ - public ItemStack getItemAt(int x, int y); - - /** - * Set the item at the specified grid coordinates. - * - * @param x X position of the item, out of bounds is a no-op - * @param y Y position of the item, out of bounds is a no-op - * @param item The item to set. - */ - public void setItemAt(int x, int y, ItemStack item); - - /** - * Explode the reactor. - */ - public void explode(); - - /** - * Get the reactor's tick rate (game ticks per reactor tick). - * - * @return Tick rate - */ - public int getTickRate(); - - /** - * Get whether the reactor is active and supposed to produce energy - * @return Whether the reactor is active - */ - public boolean produceEnergy(); - - // TODO: add the rs modifier capability to the api somehow - - /** - * @return true if the reactor is FluidCooled - */ - public boolean isFluidCooled(); -} diff --git a/src/api/java/ic2/api/reactor/IReactorChamber.class b/src/api/java/ic2/api/reactor/IReactorChamber.class deleted file mode 100644 index 4fe583e524bd61af98986aed5a03031751ed215d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 210 zcmZ{ey$ZrG6ot>#+G<@y90k{QG0@df5DJ2zgWz@>LQRRSq}7LW@Bw@%F~vGM9r(_7 ze_rp$6F`D-fKh;uFwIr7S1g;#re)o5DHUNJ#ak^C!B;Kpw-jk-tq8uZk8BK~AH^p^ zc&Khxs*N^oboTSsXTD_0E(^XhVexNWrx7NtC=8dm*ky&1jZYx-+_yl_bGP6DE(h=( JAp|YQ@Btrue if the chamber is a reactor wall opposed to an actual chamber of items - *
- * eg: {@link TileEntityReactorChamberElectric} returns false, but {@link TileEntityReactorVessel} returns true - * - * @return If the chamber is a wall or not - */ - public boolean isWall(); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.class b/src/api/java/ic2/api/reactor/IReactorComponent.class deleted file mode 100644 index 8a7a6fccd9cba6cc7dba5ba9e507ffc929eb4c26..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 765 zcmb_aO-}+b5S=2jf{2L9-Ghl-Y{Hf3K_amUMkCP!2a};0u(;dZbi0P%=D{D}k1`Gm zaxr>9n{?hZnfE$h?;o#k0MLeJ0Q&(P1aK&zmbh3`ns%Qs8j%xle$uz(Wn?UAhhr~| zr${O`1CRQ-(>J;;F)`8+Y9BkP?iNl*sbT9uKm)a=#NRu#CW~&fFeL$xYpedAjp8$G z4Fyy++5x9SSA<@`+1mdpHJ7VQ$Y0~^AH)>*n8mu8b7cKOu#BN6xA6bcZ`ES;hOy%? zBdh6hmV|L?Vk@AtcKxj$S3ig|r>SQ`9$oWmz}+}XV#`IGPVof=9R0Kjt3Uzud8iE0 zPUOvKN}5M={Ec>jDJ_?1MJ)*sP~f}4D;pFA6k!v9u>?VmTTsri0^2!Om$(D9{Jjfx LW(wG2TY$zVX|d_j diff --git a/src/api/java/ic2/api/reactor/IReactorComponent.java b/src/api/java/ic2/api/reactor/IReactorComponent.java deleted file mode 100644 index 7916cc17b..000000000 --- a/src/api/java/ic2/api/reactor/IReactorComponent.java +++ /dev/null @@ -1,98 +0,0 @@ -package ic2.api.reactor; - -import net.minecraft.item.ItemStack; - -/** - * Design custom Reactor components by implementing this Interface - * Items implementing the interface will not be ejected from Reactors in their clean-up - * and can/will be interacted with by other elements, f.e. Uranium Cells. - * - * All IC2 ReactorComponents implement and use this Interface - * - */ -public interface IReactorComponent extends IBaseReactorComponent { - /** - * Called by reactor upon iterating through it's inventory (every cycle). - * Perform all necessary calculation/interaction here - * - * @param stack Reference to the specific instance of called ItemStack - * @param reactor Reference to the Reactor - * @param x X-coordinate of the stack in the grid - * @param y Y-coordinate of the stack in the grid - * @param heatrun every Stack will cycle 2 time (true, false) first run for heat, sec for Eu calculation - */ - public void processChamber(ItemStack stack, IReactor reactor, int x, int y, boolean heatrun); - - /** - * Can be called by Uranium-Components who attempt to generate energy by pulsing to other components. - * Uranium-Uranium interaction (f.e.) uses this method. - * @param stack Reference to the specific instance of called ItemStack - * @param reactor Reference to the Reactor - * @param pulsingStack Reference to the specific instance of pulsing ItemStack - * @param youX X-coordinate of your stack in the grid - * @param youY Y-coordinate of your stack in the grid - * @param pulseX X-coordinate of pulsing stack in the grid - * @param pulseY Y-coordinate of pulsing stack in the grid - * @param heatrun true for only create heat not EU, false for only EU not heat - * @return true if this component reacts to the pulse (and pulse is therefore meant to produce heat) - */ - public boolean acceptUraniumPulse(ItemStack stack, IReactor reactor, ItemStack pulsingStack, int youX, int youY, int pulseX, int pulseY, boolean heatrun); - - /** - * Called by components to determine whether your component can be heated. - * @param stack Reference to the specific instance of iterated ItemStack - * @param reactor Reference to the Reactor - * @param x X-coordinate of the stack in the grid - * @param y Y-coordinate of the stack in the grid - * @return true if your component can take heat - */ - public boolean canStoreHeat(ItemStack stack, IReactor reactor, int x, int y); - - /** - * Called by heat-switches to determine how much heat to distribute into which direction. - * Please return the maximum capacity of your heat-containing component here. - * @param stack Reference to the specific instance of iterated ItemStack - * @param reactor Reference to the Reactor - * @param x X-coordinate of the stack in the grid - * @param y Y-coordinate of the stack in the grid - * @return Maximum heat - */ - public int getMaxHeat(ItemStack stack, IReactor reactor, int x, int y); - - /** - * Called by heat-switches to determine how much heat to distribute into which direction. - * Please return the current amount of heat stored in this component - * @param stack Reference to the specific instance of iterated ItemStack - * @param reactor Reference to the Reactor - * @param x X-coordinate of the stack in the grid - * @param y Y-coordinate of the stack in the grid - * @return Current Heat - */ - public int getCurrentHeat(ItemStack stack, IReactor reactor, int x, int y); - - /** - * Called by components to distribute heat to your component. - * Perform heating-calculations and increase your heat (dmg) level accordingly. - * This method will as well be called to REDUCE heat, by providing a negative amount. - * - * @param stack Reference to the specific instance of iterated ItemStack - * @param reactor Reference to the Reactor - * @param x X-coordinate of the stack in the grid - * @param y Y-coordinate of the stack in the grid - * @param heat Amount of heat to be added (may be negative to subtract heat) - * @return 0 if the 'order' was accepted, return >0 to indicate the 'remaining' heat which couldn't be absorbed (and vice versa for <0) - */ - public int alterHeat(ItemStack stack, IReactor reactor, int x, int y, int heat); - - /** - * Called upon reactor explosion - * Alter the explosion size. - * Returning a float 0 < f < 1 will be counted as multiplier. - * Anything else will be counted as a flat addition (in case of <0 = reduction). - * - * @param stack Reference to the specific instance of iterated ItemStack - * @param reactor Reference to the Reactor - * @return your explosion modifier - */ - public float influenceExplosion(ItemStack stack, IReactor reactor); -} diff --git a/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class b/src/api/java/ic2/api/recipe/IBasicMachineRecipeManager.class deleted file mode 100644 index 31608e7837e59c63e8de16e36462565555561c9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 679 zcmaJM&f~e@h#FG~faB&l^B_x6&X#$b}@qnl4cCCx;wrRKC{T~0ogCF2W z8He_OR^%`<$?UwD_g?n%>-_@&x^QN}i3KeSP8rnE^JY@0STb, ItemStack> { - boolean addRecipe(IRecipeInput input, NBTTagCompound metadata, boolean replace, ItemStack... outputs); - - @Deprecated - RecipeOutput getOutputFor(ItemStack input, boolean adjustInput); -} diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class b/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$Input.class deleted file mode 100644 index 4b88cdf180f9cda4b199e19c418d1d7485fc2817..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 947 zcmah{+fLg+5It)iAtnx~4YNSe*LMs)7)V^)D3oJNxC}Jo+Rk6~~8J;z!7EC>C9ur~&>&#Jdqi7CVXH(J@bz@$;ag&(wgSkaff0g)ueVj`(08Dg5Lgwl+5j zuM({zInr^!V}2^r`X4=Rk85#es$VoZvD8728WAZ!(Sg#k7ldREH5V8A(@&cp7^>4# z80Iph1K!W&ln;|(D&%Wr1h0n^yWKtKm)t`cH4iRkJd`lw;<1M%Y`Ca11mi=S2sIMU zFmE7(h{vbF+wQp(n!#?Efvk>0-I_l`?LU`fuAw=OFtHib=q(oMfm&EF!f3Z(v}F-S zdS^jHCht9E*tAw!U%^`2H?UeeH?TiviF0HZ;gH=RTPJ``+`$(8fIlijg)+=n$!J)% zGei~eI7MK5*%O|dt?A)iG eRtWnp diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$RawInput.class b/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager$RawInput.class deleted file mode 100644 index f7edd9fed0e942e8f1ab53fcb98d50e15d495e9b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 636 zcmb7BT}uK%6g{)9u4`L<^!-5}(1TjEwE0#PBm{yLXb3%y+h}9!uB>DIt{x=lp&!tX zitboFCdI(HbMD-G&YhX}kJmQ<9yT&aV!?)qMGZ?9RxGSC*nSi$E<+JBY}P}e+&&RM z<{jlqCHiiSpsBe3aLizKWDqc%<@~((?e?;hBnPxPKeQ_bR^VaV@2R;7C9oSfNkb>nP4a>qhgZF=1hMZP& z10HtW>vm80be%*|KT7G(YS^K_OwtD%$m@w{m)Ap4WVCE#2xo}hQbmGdw)_HC-W$Ux z?~jpqrj!APus}ktevy|EXY9pQ}MgkKXHrZ(-gI0lcC^KXx zN?!E)ZRx0yWVoudlvCqkq_`iMxE)K8Z+*U~rQt)RrQ?em!pVelKY>X?&IUCAJHs@ju-llY$}(A*_++O!5BS5_0MG( zN}t<`$uR6E!>6HPs3qNgABKVdJtzX2Wnf6rNz*TwUZAz207Um9*^6Wamgr>3XE{<< gP@1MthE?)QVGZliy+JXcw-gpAHba>$x^u|C14U9b*8l(j diff --git a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java b/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java deleted file mode 100644 index 6471e475e..000000000 --- a/src/api/java/ic2/api/recipe/ICannerBottleRecipeManager.java +++ /dev/null @@ -1,57 +0,0 @@ -package ic2.api.recipe; - -import net.minecraft.item.ItemStack; - -import ic2.api.recipe.ICannerBottleRecipeManager.Input; -import ic2.api.recipe.ICannerBottleRecipeManager.RawInput; - -public interface ICannerBottleRecipeManager extends IMachineRecipeManager { - /** - * Adds a recipe to the machine. - * - * @param container Container to be filled - * @param fill Item to fill into the container - * @param output Filled container - * @return - */ - boolean addRecipe(IRecipeInput container, IRecipeInput fill, ItemStack output, boolean replace); - - @Deprecated - void addRecipe(IRecipeInput container, IRecipeInput fill, ItemStack output); - - /** - * Gets the recipe output for the given input. - * - * @param container Container to be filled - * @param fill Item to fill into the container - * @param adjustInput modify the input according to the recipe's requirements - * @param acceptTest allow either container or fill to be null to see if either of them is part of a recipe - * @return Recipe output, or null if none - */ - @Deprecated - RecipeOutput getOutputFor(ItemStack container, ItemStack fill, boolean adjustInput, boolean acceptTest); - - public static class Input { - public Input(IRecipeInput container, IRecipeInput fill) { - this.container = container; - this.fill = fill; - } - - public boolean matches(ItemStack container, ItemStack fill) { - return this.container.matches(container) && this.fill.matches(fill); - } - - public final IRecipeInput container; - public final IRecipeInput fill; - } - - public static class RawInput { - public RawInput(ItemStack container, ItemStack fill) { - this.container = container; - this.fill = fill; - } - - public final ItemStack container; - public final ItemStack fill; - } -} diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$Input.class deleted file mode 100644 index 8a00f0bcc12eb81cd8503f06e7a681ea339ba95e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1114 zcma)5%Wl&^6g^`*ag(~F4K1&>ZbQ?Om$2v-gpi^JMM^=URVCO>oJlgpaf0piU-|`X z*dS35EcgIE3US8?Rbv#C&7HZ|ch0%z%=p*uA3p&cqLzh;%?#4mQeis_8#~L`MZv_L zi6TR)>y2fH;h^P<$QejqxB>4*-C@uZPW&x&8mi?a;_myW3`@Mzk&(O*4BIW~9y)v^ zoj|y9B%J1(cy0QlaYU`@XVRC^bB0D~G4%i9mCqQA`mjU9xfad&YCLF*;FPyLs^nWk zmwRVCkSd=Rji@g}k{Hj!U^RVT1a*&xp`h}Uf7t3=H5~bYbo&z}$K2;V5fuL_G6y_z z`|9+|MJ3JH>c~h8oF;{do#l57_N+I_7KW9$_n42Sva%<`ao~!ERKj<(aA!)>o6^{oFVL!AVO(OJwtDS5QW`E{8XsZkpXjtsNTA^rQt1Yhea&QF iGub5RE+OBe-W0U07mSkolxTQ>+q7m0CQZZVk@*8fO&J>i diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$RawInput.class b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager$RawInput.class deleted file mode 100644 index 6d01f5efdee0dfe4e7a83e186704c2519041f567..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 685 zcmb7C%T59@6g?e49*zRO-;cx?L}L}*Y1|MsB&Z1(5|?EtP#g*=1AdnaW8%UO@S}{k zs0&O?becKsy*>AwJMFx^zq|s-VKspWX5$EB&cb{Yi%~2wMCyKD)fl#mS_ZtWwDgRq z2lb9=NIu-_@e4~S2g18QVTg%ZO$BNo8P-N?xC&&O7YM$&W2Z{1;EdriGfMqUew6i7 zaHql$&Ub2Loh(wP*Zp=?np;uzDKk~|zX27cs=6SYgQh-8#QK diff --git a/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class b/src/api/java/ic2/api/recipe/ICannerEnrichRecipeManager.class deleted file mode 100644 index 73118021fa03e1a9bc097d59c0d5b28f8d424ed6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 939 zcmb7DO-}+b5Pd~-0l)BDPhL34#U@-aCI%(h1Y-h;2XA#5*6PwF-LC#O58k}^ql^Qq zQCCUe(4B3j@6Eh7?c4kF3xEa=JZyW|@v!S*PoUIQPrezYPGH41hHNWRNkWN-eSyW# zOj-5&T?+Jw1frvkAt#60P+---4PqOT97L(^C$c>bJ*R?)W=97NsYY7b2~heO!Gy6n z8%6zEpmI(lW>Aj$0temHI6b6mo#@+$&WwqjaymANz;5SWJt`R~6UuK)lVyeEu2RPm z+p!g(S^NK`Qffy->GLO3cXLzE3(WLomAGuVr$eJ$YT2{bAH7}O-c#WI+HFDkrW<{hxYYl(BK i0B6>){$GZXRX$h11~w;gi!tE;0*Z`XWJZr;3FQy( { - /** - * Adds a recipe to the machine. - * - * @param input Fluid input - * @param additive Item to enrich the fluid with - * @param output Output fluid - */ - @Deprecated - public void addRecipe(FluidStack input, IRecipeInput additive, FluidStack output); - - /** - * Gets the recipe output for the given input. - * - * @param input Fluid input - * @param additive Item to enrich the fluid with - * @param adjustInput modify the input according to the recipe's requirements - * @param acceptTest allow input or additive to be null to see if either of them is part of a recipe - * @return Recipe output, or null if none, output fluid in nbt - */ - @Deprecated - public RecipeOutput getOutputFor(FluidStack input, ItemStack additive, boolean adjustInput, boolean acceptTest); - - public static class Input { - public Input(FluidStack fluid, IRecipeInput additive) { - this.fluid = fluid; - this.additive = additive; - } - - public boolean matches(FluidStack fluid, ItemStack additive) { - return this.fluid.isFluidEqual(fluid) && this.additive.matches(additive); - } - - public final FluidStack fluid; - public final IRecipeInput additive; - } - - public static class RawInput { - public RawInput(FluidStack fluid, ItemStack additive) { - this.fluid = fluid; - this.additive = additive; - } - - public final FluidStack fluid; - public final ItemStack additive; - } -} diff --git a/src/api/java/ic2/api/recipe/ICraftingRecipeManager$AttributeContainer.class b/src/api/java/ic2/api/recipe/ICraftingRecipeManager$AttributeContainer.class deleted file mode 100644 index 26f2e3b87ce2d04958dafdf14e3cb5147cd9d027..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 565 zcmbVJ%SyvQ6g`us#?)vZzHJu@3T*@fU5Sby0ijS8R0?)CNym0dIw^VhUoMK^!VmDH z#5>iUE<^_Iz2`p8J-AMrF5)N|66VcX+V=_MkRQ{i>|gg<7a;&zU&xZ*>R?Ej=XWhmXn zc@m0Csg=}!pFA4#C+@(;j)MhQ4i;fqs52b@cQHdnb9xb1L+>USi!fs-H1#(f{D~8L zbc7;Z#z0kTqNu86k*8CT)DqbxLJ!nYAYXQ0z})%_hTE8-@JuNK4%r$J0Zp@Vxq1HpFv4Mi{RG1V2MWhGF?u^&N6uF+l6CAAhJ_Q&YYKsbLQ3=b zJsaDw!qxf2anwsO8c$DA+sI2@NGcAj(k1P~pxD)n@mGwg|G;_OQFkbVJg-e(U0 diff --git a/src/api/java/ic2/api/recipe/ICraftingRecipeManager.java b/src/api/java/ic2/api/recipe/ICraftingRecipeManager.java deleted file mode 100644 index 7ff754571..000000000 --- a/src/api/java/ic2/api/recipe/ICraftingRecipeManager.java +++ /dev/null @@ -1,45 +0,0 @@ -package ic2.api.recipe; - -import net.minecraft.item.ItemStack; - -/** - * Recipe manager interface for crafting recipes. - * - * @author Richard - */ -public interface ICraftingRecipeManager { - /** - * Adds a shaped crafting recipe. - * - * @param output Recipe output - * @param input Recipe input format - */ - public void addRecipe(ItemStack output, Object... input); - - /** - * Adds a shapeless crafting recipe. - * - * @param output Recipe output - * @param input Recipe input - */ - public void addShapelessRecipe(ItemStack output, Object... input); - - /** - * Attribute container to pass additional information to AdvRecipe and AdvShapelessRecipe - * - * @author Chocohead - */ - public static class AttributeContainer { - public final boolean hidden; - public final boolean consuming; - - /** - * @param hidden Whether the recipe is hidden from JEI by default - * @param consuming Whether containers should be consumed or returned empty - */ - public AttributeContainer(boolean hidden, boolean consuming) { - this.hidden = hidden; - this.consuming = consuming; - } - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerOutput.class b/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerOutput.class deleted file mode 100644 index e0fe9525544fee68bd8292d60510df5b7b14c968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1626 zcmbtVTTc@~6#k~ItX&oa?|4H6rBr1F?-ofABxx+5V2C~r>$Hw+XPfD)5&w{{nuroj zd^Pb$8P80s7B8WR51pAkd(QWr%QxGv-#&f@FohW(y%@{GN5L-Rb}9O}fQue3`RKuf zPnOWfWlVaw;^8Voz8a_U=@PFChW(Z2`~?qVu4>_`(Nfh)486`_ww|QQFt9R1pW$j_ zUTP5;nJ9+giV`NQOC=)Bt0qj1jKg~>tuOGXh0!xDl{7O9*9w19ly?aqUt`G4B~K~A zeH9{EO6%)FKjQ1LOF4;nyvDV(&uwGQJd;f-=Uz-H>LlKLCG>J?8YvYJl$8>CF6Paq zAfK6vjHW`~kRg>L8zL-s2CX>TB3Ha7^l0as796!FUlZmBcA+r7vzBV2Ya(8x+>(4vW0uQl{~ciI5i3IR1e)MragI$?@o!2&1H4PgK)Q=SpbOMl8YyTxy%c zs;nt)QcVp}-9=4zm*`Hf@b}5i5V^maq&gA{(vD;J-|d^Q+F}@5AsxxOSd&dj6Pr~k zG2H5ihH=@6<7LQy8mU4}(lkOhXSG;Ll%fXR-JBOyp2nsWU_Y(}2+$XxANv9fV9>+$ z05@=xVRVNq|1k>-aVx-aobYfvKnc?x?l4UMk1QAleqE&H_2;BQhHSwKd2E-QRzyuU zjoxI~Yvo`i^Y>e`tI}vR=L$RL_h$=AWt-GU7cyhWBvpp{ofo)OTB+kow=LZYcf9K^ zW0JmHz4VpKV$jZ;PJ?#jZl|fcH+1E301OA|DMki4+7A{#fE6!nAyYiDg>3QC7IJUN zp1~nn4`UCl_sO$@JQfLYi4c~_4isDQID%vJL`aU8xszqixRd415+@0$&HR|+tk;?1 zJ7l)8=LT7YXEfI%DZjPp55#3SxBigUDE|MRpD(a)!|PyZ%IG4vgt C)~>?< diff --git a/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerRecipe.class b/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager$ElectrolyzerRecipe.class deleted file mode 100644 index 8896a87a8d367bc1c8e5208f55506a58094de18b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2231 zcmbtW-%}e^6#j15WJ6dAq=gm=Wkt040ZqXcEkTe%u+aeJM^UWW-fV7RVYA6>HfVj) zu`dq)fp0p__^LAkqs+v2|018P=k5|9gI0&mWX`$woO{on?>p!0=8wOAs{t5=5kWWZ zG~)`!rASLL5h3xmTurK&Qt?g%VcZF0TI#z}%!Dy3btVE8b1L3drYKqj?YP&Beq>wl z9^MZlC(q1Fv7q90+sBy9_MLpk^NMRnyoepG&H;AVfhF$X=?tbhM&k znIW37gyA|R>**K5S@awXTGqCOGh^{eMN}B39_CDAG{wti$`OWH7OCv%Tg#qpp4)sw zID@A>e!Mh8Xu`Bjcak9!%Vx7L87{uYpv;sCf}t&E+G3$v%nN6g=Pj~Cb0vdYYuqvA z{>Z4fnM#vV|y!Vp<0RUJdjnX$53w%u{fMFCgxPz% zvPtYp$3qPt;}ar5!>4$}Ff>~&Tc$zXrXSZuHya;XPbVf5d@Kc5k!P4V-w@XarTv7O z#rzhv#JM9b9=&E-PaqRqhNhSt?GP`Qg-!3N;h5h-Ua95XMy=p!1&|NEroV**Te6tIO@}+4?w8C;mrI6Cz$9APsSS?$U88c>}<@{e=K$ z&gOlBKmNb#ixK(+b<>AML5Ca^T6M@-@idK#r)gM72k;fO;UE}Zqunz!AxQdK;s7jh zbq|3=?;e^GeS1(6iEiZp!99e2_U^q-vIilOkLWp%(F~3Y$m1dm8p#5#ljoKn4KXBW zM{&Jun75Mo1iY2ZsL5N&oD{OsH2WE`LE5Y2+fCM#@6epAg@3@{A=LFlgx3$y9F6Rw zC0W~t7Hy@~J}w-f?e{~puP1B4&1lB~qVvgx;o6weG#2a(b}HXvdbl$z*^kd_$)6}41rq)MeV~C2XxPLswvfg)mS7Pf zMSM-`Z&3DVNYMEu`p+3$Kul(yAYe(5VNmkdCAKZ;J|89smFU diff --git a/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager.class b/src/api/java/ic2/api/recipe/IElectrolyzerRecipeManager.class deleted file mode 100644 index a41162e9ae58588d7e5ecc2d23c63b66ce968bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1148 zcmb_bO>5gg5Ph52QJtnAcKT(vrI7YuU$T&^Lm`v~1Wr?8a1TAL<+0eXUMZ_pX>-fp z%Ar4?KdN*j#cps?2uTIY%R9p%>R8I5$N$A&&Dr)K2I?OB_6<#l2+fldkjU8=>U z{FGRm8`Br~a&2k0z5(7H=fTWizzY39r2@@vuNr&qwUK;P)HKwwRX%r2q-fc{dzB@3 z>%n_QTpuR6i)ddPhJ5pHiftDR73kfVlLC+blKOCb%$p+cb~$~ZPk5MnQADY~AhW>k za@2w+i#@xJ`15tTWqQShH35MYKC8U(_1YO4SZC`#Tg@6P8>|#xsg>>r7w*maCHFi) p;2|CXHSPwQrEFo7 getRecipeMap(); - - @ParametersAreNonnullByDefault - public static final class ElectrolyzerOutput { - /** - * @param fluidName The name of the output fluid - * @param fluidAmount The amount of the fluid produced per operation (in millibuckets) - * @param tankDirection The direction relative to the electrolyzer that the output tank should be - */ - public ElectrolyzerOutput(String fluidName, int fluidAmount, EnumFacing tankDirection) { - this.fluidName = fluidName; - this.fluidAmount = fluidAmount; - this.tankDirection = tankDirection; - } - - public FluidStack getOutput() { - return FluidRegistry.getFluid(fluidName) == null ? null : new FluidStack(FluidRegistry.getFluid(this.fluidName), this.fluidAmount); - } - - public Pair getFullOutput() { - return Pair.of(getOutput(), tankDirection); - } - - public final String fluidName; - public final int fluidAmount; - public final EnumFacing tankDirection; - } - - public static final class ElectrolyzerRecipe { - public ElectrolyzerRecipe(int inputAmount, int EUaTick, int ticksNeeded, ElectrolyzerOutput... outputs) { - this.inputAmount = inputAmount; - this.EUaTick = EUaTick; - this.ticksNeeded = ticksNeeded; - this.outputs = validateOutputs(outputs); - } - - private ElectrolyzerOutput[] validateOutputs(ElectrolyzerOutput[] outputs) { - if (outputs.length < 1 || outputs.length > 5) { - throw new RuntimeException("Cannot have "+outputs.length+" outputs of an Electrolzer recipe, must be between 1 and 5"); - } - Set directions = new HashSet(outputs.length * 2, 0.5F); - for (ElectrolyzerOutput output : outputs) { - if (!directions.add(output.tankDirection)) { - throw new RuntimeException("Duplicate direction in Electrolzer outputs ("+output.tankDirection+')'); - } - } - return outputs; - } - - public final int inputAmount; - public final int EUaTick; - public final int ticksNeeded; - public final ElectrolyzerOutput[] outputs; - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/recipe/IEmptyFluidContainerRecipeManager$Output.class b/src/api/java/ic2/api/recipe/IEmptyFluidContainerRecipeManager$Output.class deleted file mode 100644 index 24704809b4d31f65d96e7d9c4cb0d9b76e67d413..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 918 zcmbVKU279T6g`uV#*M3~wZ?C4K}wC{NFNkQsSm+IV6|YRuVu2G#A!FP%Vt*S&+?%N zKKKLtQR121_Ms4Hm4%sm&%O7YJ9qEzKR)rg+&3p57lA$#vcZ17Vt z8|(aw8Ye_nqBK^?zRHdF&%lQJYUb46D_mAMfpBO!pFyJLb4~nRWa2HUG9z;xn@r2$ zhgs%M%H9X()BIe9J}RrGI)7F%aR}XudMDYr=E34OUOLyS&!9a@i#*o5#=m>x(w<-W zT?i54X^17XLbP$cg*Ab<|M_}><#N3eWv6m)e8lY%sBik;^ZH*YvCbWCa7@Vue{Da%-#-AL38x+$d2sAO-GdW^a^ITR8iZO$Dbg*;lY|n4 z5|3j!LwG&!Dl%*;6a|`(4HJf@tmC?&;lZ=Ny*iF`NNg;v7$vMdAN;NenvBPSStDeY zYemX%x1r9od(nvehl^FAra;8RdOUb?MT0aNP-3O=5h_CwDsHSMgs=Z}wwvyRzi=kG z3fXTB*93xq~~m)~F@T<6Pni7jrZjDS#ZZO{EE hEFyTY@1lx}3Q%>~Y<2*(G;;`LH&$Im(X|p(egM%JEr { - MachineRecipeResult apply(ItemStack input, Fluid requiredFluid, FluidContainerOutputMode outputMode, boolean acceptTest); - - public static class Output { - public Output(Collection container, FluidStack fluid) { - this.container = container; - this.fluid = fluid; - } - - public final Collection container; - public final FluidStack fluid; - } -} diff --git a/src/api/java/ic2/api/recipe/IFermenterRecipeManager$FermentationProperty.class b/src/api/java/ic2/api/recipe/IFermenterRecipeManager$FermentationProperty.class deleted file mode 100644 index 4b8138fe00d83fc3d232c440aadacde4933a0864..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1104 zcmbtTTTc@~6#k~&cImR*Dkv1Zpj?(!Sg4SgpeBZ-Ns}T9hUnvTnU=wJx0y~&eDmM< zs)-Fo6JJgIQN}YvjSpxbaUafY&gGl$%>MZKCgB6M+=VOS=eo_^9!dx>UXRR-r+a5D30PtyrQv3A1W@TkR;W^|yHOq$ya{@Lm8 zy8J_#Nd1^$I;d99=T}z_sqapDBpAkOG7(RE?YdAec)dlDVl9n%>yRsH{6Wys$Fj>X zSrMu&63w+tlV>XJ2&LcB_-c{}wbSC=uAr<(H5r#9-jR_KvFwPbIw%ur-v)Mh!ka=Z z{H+_^rqC36Z*bipSg9pKM{R-`E8ftJR5eA^X!Yb#H>wzQpn3e7%0{fQ%R3e`G0Wf` zq&*djiZmCS`v;6QL#U4l-19LE-^Yj%qZsos4&TM9k2ORL3zxxR`mDRyVA%c-5*Wt+ zY(5N4gZAf`zkvWWu>Vvf*kUPB`WCk^5+C zCQT0VB-d$%nO3Gn-lra$n86mN=w$P(6RuLkd?ky7S<7I_Sj(WvTFc;Z2uBIC12iwK z56p+3;Cx2@J6!f2Q(xh}8bnCtPBHX>8f0NW<*5{SU;+5no*w|1qqvLA=yMm>Y4#0r RGq{Oq(jFxiu!3ut`31Gx2ju_& diff --git a/src/api/java/ic2/api/recipe/IFermenterRecipeManager.class b/src/api/java/ic2/api/recipe/IFermenterRecipeManager.class deleted file mode 100644 index 450f09a43d7f75bb252fb766251b38b29c819611..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 765 zcmbu7!AiqG5Qb;9Hd?E;S{22cBCQ7(dW{Go6apy~1D@S(r(tWliJOh!t9kGNd?<06 zwpglS#ltYm&SbvX|Igd|%PRmhVc&rr2Wk%NIU`uKgVV)iWl;I_y3-w?Bpr|EzxCB4d37ZvCU)Wn19!gb55^T4Fj%5k sreC&DVBo+i9Y|9s<#`>-dES6c>e`~NC8$tT^V2pIDVL~Hpjd%}52fkt(*OVf diff --git a/src/api/java/ic2/api/recipe/IFermenterRecipeManager.java b/src/api/java/ic2/api/recipe/IFermenterRecipeManager.java deleted file mode 100644 index 87fcba699..000000000 --- a/src/api/java/ic2/api/recipe/IFermenterRecipeManager.java +++ /dev/null @@ -1,64 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; - -/** - * Fermenter recipe manager, very closely based off of {@link ISemiFluidFuelManager} - * - * @author Chocohead - */ -public interface IFermenterRecipeManager extends ILiquidAcceptManager { - /** - * Add a new recipe to the fermenter. - * - * @param input The name of the fluid to ferment - * @param inputAmount The amount of input fluid used per operation (in millibuckets) - * @param heat The total amount of heat needed to convert the input into the output - * @param output The name of the fluid that is being fermented into - * @param outputAmount The amount of output fluid produced per operation - */ - void addRecipe(String input, int inputAmount, int heat, String output, int outputAmount); - - /** - * Get a fermenter recipe for the given fluid - * - * @return The found recipe or null if no recipe is found - */ - FermentationProperty getFermentationInformation(Fluid fluid); - - /** - * Get the {@link FluidStack} output for the given input fluid - * - * @param Input fluid - * @return Output fluid + amount - */ - FluidStack getOutput(Fluid input); - - /** - * Gets the whole current fluid mappings - * @return The current fluid map - */ - Map getRecipeMap(); - - public static final class FermentationProperty { - public FermentationProperty(int inputAmount, int heat, String output, int outputAmount) { - this.inputAmount = inputAmount; - this.heat = heat; - this.output = output; - this.outputAmount = outputAmount; - } - - public FluidStack getOutput() { - return FluidRegistry.getFluid(this.output) == null ? null : new FluidStack(FluidRegistry.getFluid(this.output), this.outputAmount); - } - - public final int inputAmount; - public final int heat; - public final String output; - public final int outputAmount; - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager$Input.class b/src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager$Input.class deleted file mode 100644 index 9f813eba2cd4e250ef856e410ba4727a9fd86d08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 701 zcmbVK%Sr<=6g`=?*4EM5`hKFIqE!qC;zDs#PzqH+MR1u;(;A)5lVyM2L7)9;yvz*>J`GmKhVCcdsbvLRo9fddnm_)y?@y&v+OyWjg0 z;l`Cfx)L_DK%vGmPkZgUjxJT*r=?U2J>_4i$XNZ;n2v8umxWh@PA?X4s{uQ$_^R90 zH1E}nwfqgol&JUxdBL(+p?k)!$&-x9VQG z$YajM0J1Iyk;`IUVE1471x78Q^i|N3XZ2g{v9;8?osRq?A(r_VGJGKpincVKincoL zf-8?9N|)L-BU0Q8p<|CZ))+166G&vZiERhHpr7RL&!U)Fr14|z;6lk+wAxR^W WlTGAsjZt$jP9&I;cZ_K=<=z2H`m+@P diff --git a/src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager.class b/src/api/java/ic2/api/recipe/IFillFluidContainerRecipeManager.class deleted file mode 100644 index 42ddd10a7ac9bf619938d326c36e0246e18bacd3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 931 zcmd5*%}N6?5T2=R*R55n&rm@x1`3|G^in7+Y$>$h!CTD6nwn;p-9+#Kd?vwz58y+I z<8Enf6|^Tk%)3YAJ04wTjd?Nr=PjOB{F#>LB!8$Oj;y8sN9Zq6#r*6l~mQp{lz z%i!v4X}G{2a&b$bCFWS>PTK&%pQx$f)@2g0`X6%YMl*iTndWB7E)x|8rCe0oPqdc8 zs>F07BQ2X#JtE^bmMJUeETnB>xws2@E1I@rw?~vbeac{TJ)?kM(bmXZH0bX$Z%h)G z2}y$_5l(&@sPhk^5!jY, Input> { - MachineRecipeResult, Input> apply(Input input, FluidContainerOutputMode outputMode, boolean acceptTest); - - public static class Input { - public Input(ItemStack container, FluidStack fluid) { - this.container = container; - this.fluid = fluid; - } - - public final ItemStack container; - public final FluidStack fluid; - } -} diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class b/src/api/java/ic2/api/recipe/IFluidHeatManager$BurnProperty.class deleted file mode 100644 index 6367f30bfd08e07ee3460375cd91fd9b94bc23df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmb7B%Sr=55Ukle*2LAAs4*r{6gu#821wYF}5Ipz+ zew0{4JO~~{2D-ayx@(G_kI%Pv03B==kwdkBEY@tOxv0Bn2;}8slExDO5eQ`Om1LPe z(y^W#3*=fsusa~%O>UJysjp*oo<0thxt7C-Or@WMG8#yuE&e96lY2cD@J><_Uz%j3 z%;cFch+}2CksOZ|Z~eXwJH8xg->6WJlppk>RNtP`z?qEYoiaN==MM$knbQN>vNoBE zS4nC@)zj8W^_Rf@gM5-63TS%B!}Tx+*Tsgw-oKs}Sh7NXB;z~(V)&p!t|-&8d)fL+ z2;1CsjvwHlY(20lTN}*WIIR^K=ZS9Ekzp>iUm@C!DV%n5ip&cs2OeXELO_jionv(@ kqJaf6TeC6ZG7$yX=~C2I%d8xp6(R?#SYoyhT8$D4Us_{xS^xk5 diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager.class b/src/api/java/ic2/api/recipe/IFluidHeatManager.class deleted file mode 100644 index 30a7fee0ddb2b88ae21510bdbcd7477423882e0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 581 zcmb7CT}uK%6g{Kns#$8EuR%TNLk;+91QkdND@8`{(|TP-wsD=E4f<<6^aJ`)(RCwA zg`$Vcotbm*x#u3{?fvByKo`3nS{}AMY*oyfify0d-RjDC(v3Pqv!fs?arsF%;{JTRKj)Dp^l7lnI(a{ zW&Ct?iGK(U1^}uJ diff --git a/src/api/java/ic2/api/recipe/IFluidHeatManager.java b/src/api/java/ic2/api/recipe/IFluidHeatManager.java deleted file mode 100644 index 7ddecdce4..000000000 --- a/src/api/java/ic2/api/recipe/IFluidHeatManager.java +++ /dev/null @@ -1,32 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraftforge.fluids.Fluid; - - -public interface IFluidHeatManager extends ILiquidAcceptManager { - /** - * Add a new fluid to the Fluid Heat Generator. - * - * @param fluidName the fluid to burn - * @param amount amount of fluid to consume per tick - * @param heat amount of heat generated per tick - */ - void addFluid(String fluidName, int amount, int heat); - - BurnProperty getBurnProperty(Fluid fluid); - - Map getBurnProperties(); - - - public static class BurnProperty { - public BurnProperty(int amount1, int heat1) { - this.amount = amount1; - this.heat = heat1; - } - - public final int amount; - public final int heat; - } -} diff --git a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.class b/src/api/java/ic2/api/recipe/ILiquidAcceptManager.class deleted file mode 100644 index 2ccadae702c1cc01b8cf7e0c8e1138af09f4e2b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 321 zcmah_u}T9$5PcJ4&cp~>T5FLsE(E)XU=t8dEUvQ~H*?E`b93(P`EeG0fFC99t(^!~ z^LX#gd&7Kwy?+2$;iSNEfjME$)=C?@P1Ea^aJeYGMDwCvY~VW9`{2aXgV>quSudXm zXHMc>UX*QSyTmP)<&NLj^idmANn8`Al{(L{4??*9t>64xb(E4p4SQ!EpLb&8gg_XjrvRfd;Q(VG%|lEQ NUkogc5}IZ-`v!ssT8RJv diff --git a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.java b/src/api/java/ic2/api/recipe/ILiquidAcceptManager.java deleted file mode 100644 index 4f377b904..000000000 --- a/src/api/java/ic2/api/recipe/ILiquidAcceptManager.java +++ /dev/null @@ -1,10 +0,0 @@ -package ic2.api.recipe; - -import java.util.Set; - -import net.minecraftforge.fluids.Fluid; - -public interface ILiquidAcceptManager { - boolean acceptsFluid(Fluid fluid); - Set getAcceptedFluids(); -} diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager$HeatExchangeProperty.class deleted file mode 100644 index 374f186d785a9e3516199196502d61ff5e2037d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 662 zcmbtR+e*Vg5Ivh#V{5e5``ro(HG%e z3uL(I@l<+BgfbPLAIKZ>{=He9@R&D+TKNusG1Bdd7fGfyNP9`A6g)2(mClag>OFMT$$*UcoR?4--=PXhVrA%qsO{Snp(n UEc(VMvoKE5AW0fNrZIxTI~DAtp8x;= diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.class deleted file mode 100644 index b58008d8650846a8c4786adf82e17273370d996c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 780 zcmbtS!A`M&fT*A-@uZ0+f(JL@iqROANK&Fn6Ypy~txM{*Zns8%&4VA{M;V6# z5vB3sVRkk%vor6#*^ke+cL3-@%Ysb{nigzXu+5-(jlx{LxDP@Fc&norwRvSw8z_bP zA{0r234^lmyndKUk3qX_kHoX!AwA%Z(NYDy#mJy@$DkFU$#3tqZH0zEN`Y8U%5BnEqbD0V#FA%mm*w)1k%G-go$-uun{h>$Ya&wu{|7K5|=s=O(=n=CP4 vP#{~PA6zUlu%JvA+80zazXCPNu2QxDYZPCHdUkJQ=LVF>SE-^%whWao{v+}V diff --git a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java b/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java deleted file mode 100644 index 68decbb39..000000000 --- a/src/api/java/ic2/api/recipe/ILiquidHeatExchangerManager.java +++ /dev/null @@ -1,39 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraftforge.fluids.Fluid; - -public interface ILiquidHeatExchangerManager extends ILiquidAcceptManager { - - /** - * Add a new fluid heatup/cooldown recipe. - * - * @param fluidName the fluid to heat up/cool down - * @param fluidOutput the fluid the above fluid turns into - * @param huPerMB the Thermal Energy difference in hU for the conversion of one mB fluid - */ - void addFluid(String fluidName, String fluidOutput, int huPerMB); - - HeatExchangeProperty getHeatExchangeProperty(Fluid fluid); - - Map getHeatExchangeProperties(); - - /** - * This returns an ILiquidAcceptManager that only accepts fluids, that can be heated up / cooled down, but not both. - * You can basically use this to check if the liquid resulting from this conversion can be reprocessed into the first one. - * @return Returns the SingleDirectionManager. - */ - ILiquidAcceptManager getSingleDirectionLiquidManager(); - - public static class HeatExchangeProperty { - public HeatExchangeProperty(Fluid outputFluid, int huPerMB) { - this.outputFluid = outputFluid; - this.huPerMB = huPerMB; - } - - public final Fluid outputFluid; - public final int huPerMB; - } - -} diff --git a/src/api/java/ic2/api/recipe/IListRecipeManager.class b/src/api/java/ic2/api/recipe/IListRecipeManager.class deleted file mode 100644 index 77f1a930a6f99b5cc6f6d0f1d36b3b90df0e5ca7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 479 zcmaix%}T>S5XWcR*tGSlR>7;@l8cMIM!Z!BL<9pKyiK=j*qUrZG7)?=4?choB~CVo z#eyDYXLk6{>~Cg2KHuH}UL1NTQVrgWhl_|B1@12ir*-#Wd z2pFohB{a4ca2_O9lPrwYs=_CdhIAogK2k#U9EFbpd{fVhl3w|RpuLYWO|BW&PlGU7 z;S0)!OfC~sQ^bPQWEQEZw1CSk!PTF9*IYmETIOgodAC?;MbSov;VN9@`u{%Tblp@+ z--2XN>zlP`FMf>{6n diff --git a/src/api/java/ic2/api/recipe/IListRecipeManager.java b/src/api/java/ic2/api/recipe/IListRecipeManager.java deleted file mode 100644 index adc22912a..000000000 --- a/src/api/java/ic2/api/recipe/IListRecipeManager.java +++ /dev/null @@ -1,41 +0,0 @@ -package ic2.api.recipe; - -import java.util.List; - -import net.minecraft.item.ItemStack; - -/** - * Recipe manager interface for basic lists. - * - * @author Richard - */ -public interface IListRecipeManager extends Iterable { - /** - * Adds a stack to the list. - * - * @param stack Stack to add - */ - public void add(IRecipeInput input); - - /** - * Checks whether the specified stack is in the list. - * - * @param stack Stack to check - * @return Whether the stack is in the list - */ - public boolean contains(ItemStack stack); - - /** - * @return if the List is Empty - */ - public boolean isEmpty(); - - /** - * Gets the list of stacks. - * - * You're a mad evil scientist if you ever modify this. - * - * @return List of stacks - */ - public List getInputs(); -} diff --git a/src/api/java/ic2/api/recipe/IMachineRecipeManager.class b/src/api/java/ic2/api/recipe/IMachineRecipeManager.class deleted file mode 100644 index c3832b7e64900ce95a39e8f81eeb84a552e28a33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 688 zcma)4O;5r=5S>Ln1i$bj9z1&}F<}!f21`iP#H0pnvh>7lC~I9(woTcZ_}4u61N>3O zfeJxv497S7-prdf`}y_$0RSyHtH4PGP8n2jJQmVdv1IUQ^(Od=JVYIEcQlc{v2!X~ z8a`E8`UyT8u1AJH-FY4c_t7+tQa!eZjUhE2s6eAh6KdSFJmJ`$aP8i9;u6Mj_{N}} z<7n9EDZj-rRy})###oB zkqM4MNvzx4htAc%16QNE*(5bvc4V+)&2tkS;oPiE{JDd0bBcMy?q4l!G>Fo~mk%nW zYg{ { - /** - * Adds a recipe to the machine. - * - * Meta data format: - * - thermal centrifuge: {"minHeat": 1-xxx} - * - ore washing plant: {"amount": 1-8000} - * - * @note Replace is only as reliable as IRecipeInput.getInputs(). - * - * @param input Recipe input - * @param output Recipe outputs, zero or more depending on the machine. - * @param metadata Meta data for additional recipe properties, may be null. - * @param replace Replace conflicting existing recipes, not recommended, may be ignored. - * @return true on success, false otherwise, e.g. on conflicts. - */ - boolean addRecipe(RI input, RO output, NBTTagCompound metadata, boolean replace); - - /** - * Gets the recipe result for the given input. - * - * @param input Recipe input (not modified) - * @param acceptTest If true the manager will accept partially missing ingredients or - * ingredients with insufficient quantities. This is primarily used to check whether a - * slot/tank/etc can accept the input while trying to supply a machine with resources. - * @return Recipe result, or null if none - */ - MachineRecipeResult apply(I input, boolean acceptTest); - - /** - * Get all registered recipes (optional operation). - * - * The method is only available if {@link #isIterable()} is true. - * You're a mad evil scientist if you ever modify this. - * - * @return Iterable of all recipes registered to the manager. - * @throws UnsupportedOperationException if {@link #isIterable()} is false. - */ - Iterable> getRecipes(); - - /** - * Determine whether the recipes can be iterated. - * - * @return true if {@link #getRecipes()} is implemented, false otherwise. - */ - boolean isIterable(); -} diff --git a/src/api/java/ic2/api/recipe/IPatternStorage.class b/src/api/java/ic2/api/recipe/IPatternStorage.class deleted file mode 100644 index 5b72100649e53fc4c3bd7dbc8b0e24ede174fa8f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 299 zcmaJ+v1$TQ5S%r}i)VxoQVZ#{@xir*lmX!&!gcA^=jK>FpYq(x$EC;zG%zpoTegP;j%rMAsOUQY(TCkbKKzJONLCkG6h>!ekPEEFMom z4-SO;@uXby2fNm^aitz?M(9^s2evi}p|}t{{h#ri4DxE%MlUbgB!`FjIj*u@ getPatterns(); -} diff --git a/src/api/java/ic2/api/recipe/IRecipeInput.class b/src/api/java/ic2/api/recipe/IRecipeInput.class deleted file mode 100644 index 6d159b49bed41fac9c84c299255a82335229a452..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 314 zcmaJ-Jxjzu5Pf@hUcB?$*2*qvTu6H&*a(4uU^=^X8RMMEUdYY*<1G9E{wQ&7Z3Mw) z-Z1a+-pqV{y?+2GagyOE!?8iuJMk~HHMq>{Kw^6i7Aq z4rkQ^c^)W5UhTpRF4&jW4Q$6m+20a_)3j0NLTm4z*5qYwU@*}y0MnVCff=B getInputs(); -} diff --git a/src/api/java/ic2/api/recipe/IRecipeInputFactory.class b/src/api/java/ic2/api/recipe/IRecipeInputFactory.class deleted file mode 100644 index b6e90226bcedb54225447f6c858647adf0e91736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 905 zcmah|O-}+b6r3XRv5JCU@$3mNHsTQ_5)H{Fn~<Ux7F^B+4Mz?`HP20#py#O%eFA~?GSuQxazk+4j;8FD(Uhr##zsq(cpY>$ z)OfqzY%20rwXD}cn#<>hOc`cJrU~x<4Zu^ z=G(`g$=DodHco~23H4YeikVysg3@9 z4#CBixE4%;=5NS` options); -} diff --git a/src/api/java/ic2/api/recipe/IScrapboxManager.class b/src/api/java/ic2/api/recipe/IScrapboxManager.class deleted file mode 100644 index 80cf6ffd49f150693e85f9fd4082c16b8a1961f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmaix&q~8U5XQf0Ytz<$?ZLC)skyk&Yeb<)pwJ)~@ZfE_UE|g?3EQpsY#w|7A4(k4 zo^q&%of-JP{msno_s{1SfC)wc&H|hV7!m?rF7I7g5w6Db!g#f|h0%^*yt3Y`)l5R_ zS-(Yb_$2ns_?`XkANzB77)R*sSsTJ=9L`t#&T8vzt`e>yLO-=x!G7xuVcOJh4#Rh_ zoQq7wdC5My72qH(w@#bb=0d!frLtwUC_fS|I5Y10uRr0^>WSjYDrdB getDrops(); -} diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class b/src/api/java/ic2/api/recipe/ISemiFluidFuelManager$BurnProperty.class deleted file mode 100644 index 890fd21cd19248459eb4b109d7f17400e38a7e20..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmb7B$w~u35Pdya#>CMqZdnvOnF&6rsj|0k-2cge{5!ceh-^p}5lS>BYD$(jr zhmp|nGliZ~LU#kcTneh54W!?3c_dved>IMX8;XVO2Z@~Y6A@f<#iv3ye$F^&$PdFr z`=T!mcZ_S4)Ulw$ijB8ft-y)hW5V!8H#3@8*nvsZ^v`t6IrRIVWjbwVQ3TG z8M=XmlG%m4l39l=5lt&@l6EM1K#G0>h1M%rtG+bqY9lF=HJ*WCYtH~#Bs&yY*d=HXBpnkK6jA*Gb*gp^ diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class b/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.class deleted file mode 100644 index 3d867b887f767bfda29a114d8e2d9a6c706d4964..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 601 zcmbVKT}uK%6g{Kns#$6uM7`#NzBJ^k5%hr|Y!oa=uhV*6M%HngoelbHJ@fE^YZ%i44{Wy4=oQ{9=1K~2-MFrYi{g3A?qIbIy8ptMXb`4Qh|yZ zj|Xw4#{zpDf2tmojFpLG;H)-Le|Xs)2{a;d%PgagZ^+4+HWXSlag(`?NKO_+sm%HM zU0;VisS+(Mg*qWQ3}~ivY>-iWrHqQmw!iZB1zO8eda+}x(|zA8b2^q+D&e_mpd+JP zW=Y_76+iiI5d(QDJ z3@LFRF$o;6PW_r@SwNt`Rpf6`ED3n10Nksn<$WD>MmHEOV3VtnpPDFhuQ5{MTEqSu DkCn0{ diff --git a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java b/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java deleted file mode 100644 index f9313d1d2..000000000 --- a/src/api/java/ic2/api/recipe/ISemiFluidFuelManager.java +++ /dev/null @@ -1,32 +0,0 @@ -package ic2.api.recipe; - -import java.util.Map; - -import net.minecraftforge.fluids.Fluid; - - -public interface ISemiFluidFuelManager extends ILiquidAcceptManager { - /** - * Add a new fluid to the semi fluid generator. - * - * @param fluidName the fluid to burn - * @param amount amount of fluid to consume per tick - * @param power amount of energy generated per tick - */ - void addFluid(String fluidName, int amount, double power); - - BurnProperty getBurnProperty(Fluid fluid); - - Map getBurnProperties(); - - - public static final class BurnProperty { - public BurnProperty(int amount, double power) { - this.amount = amount; - this.power = power; - } - - public final int amount; - public final double power; - } -} diff --git a/src/api/java/ic2/api/recipe/MachineRecipe.class b/src/api/java/ic2/api/recipe/MachineRecipe.class deleted file mode 100644 index d8e05cb51145117ff7806612da8ade1dc7617254..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1792 zcmb7EZBNrs6h2+Mx3U4wF+~9Z5xNejf-giC5`>s687zT?M89=g9VJ`0jMl`z;V;od zLZXR3z#nCNPH){{TjtD?yL;|^&U2pga{KG|_n$q)R@L2=D1K_!9nPE&@tbnltRJ+R?Uv`%*fnoEw!0_Mnl>0~@FaT% z`h!*tp{I&qKK7awt5Y^B4VP7KCJOJAZ2bC0HHlnMVPT^d1=En%J|(!dTh-yFkp93wXyv$Lf|_5Zy~_*})2; zxmwomS{%qy&^SKh)=l8-2;Dn0xq~Yp7^8J89M~yi3=r z1@e{hJ`dMXe!uW~FpoWrug9SdTEuW}Q$9b8t~4yfU{s0J)0Wq%T5oNC;%-gRCO?)0 zrD%?qmkCm7B0-b9Ow%1ah*2Xb%D|4VB$^wAlxVvDRpKFPJSyAT$WrePCX_v+C42$m z_&~^r4aFo;0#=BUupz!{Pr*hWxQpN{MR$Qo!)lWPU!s_vTbHg$`ii|wGgwt1h@$w# zD1+Uiz|lRr4+|baJl=7n5Y65~J?Ns6h$v7~KnZ;heHC+oiqH60fJy7u6w-57Bc*8D-_TJ-Kj+4)X` RTv3%QJjG6@9MB { - public MachineRecipe(I input, O output) { - this(input, output, null); - } - - public MachineRecipe(I input, O output, NBTTagCompound meta) { - this.input = input; - this.output = output; - this.meta = meta; - } - - public I getInput() { - return input; - } - - public O getOutput() { - return output; - } - - public NBTTagCompound getMetaData() { - return meta; - } - - public MachineRecipeResult getResult(AI adjustedInput) { - return new MachineRecipeResult(this, adjustedInput); - } - - private final I input; - private final O output; - private final NBTTagCompound meta; -} diff --git a/src/api/java/ic2/api/recipe/MachineRecipeResult.class b/src/api/java/ic2/api/recipe/MachineRecipeResult.class deleted file mode 100644 index 09bb88f049cc55ed8e47926924b298af35024d7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1336 zcma)5+iuf96r9b)xsXdSr4%S7lmdxcHKM$cC{hJNiWG?CMtyf2D|Hl-D6x@v;+H_8 zAo0Kl@KK1_tTDOC<-zMc<2iHY>{niN0d4Bo z?!*z;Z@Knq)tb0fg;d{K_N6;=%=!14K<3=-k1Wrhl3b1?*E?pj)-l_)2GjCZZ{W{7 zr`H@!d{01c4Xh7Vb!d(H)pmE_*d9soPLr!vcSo+*5O@)-Ut5=`TnHpyjeGP~Y|-^Q z|9#h)cC7A@h~668*6_lbx-t&Hgm>xA1P&uRF`bz|lm>T}B|c96$~^y%{O~;3r96_8 z==MT-qs9c;S*GuJY7PRWawW1P^^I#N3k8&R+xO1gGOoTk7QeVi?iGs$mq zc4pmdzFbc>+Z(`5#KwBAK=yp>Pi^OoE2p@-bRpGbPNdr$3NUg=A)Uhw { - public MachineRecipeResult(MachineRecipe recipe, I adjustedInput) { - this.recipe = recipe; - this.adjustedInput = adjustedInput; - } - - public MachineRecipe getRecipe() { - return recipe; - } - - public RO getOutput() { - return recipe.getOutput(); - } - - public I getAdjustedInput() { - return adjustedInput; - } - - private final MachineRecipe recipe; - private final I adjustedInput; -} diff --git a/src/api/java/ic2/api/recipe/RecipeOutput.class b/src/api/java/ic2/api/recipe/RecipeOutput.class deleted file mode 100644 index 0c83c13a14f4c169fc17c9d2e1e95bd0be28c7ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2683 zcmb7GTXPgu5dO~ICYcN*S(1GSp1z5DdkzNH^gGCN-SY5eYPJEA=}%rZBBjn$d7d+05#A7w;+QbQ8|tta`k!;R78l_)x<~ zI^sCqfOG0C)nl#!nFeH)XzDnRc?}B!QOh&)u0Turg1jtKCC|#G(w6HD3N%hz^S1O# zjw!Hb#r9CzHoa8dvdxSm&wD8qC3TFCX-{S@4i3}3A#ZvzD?KT&ZH2Wx=cOh`XJ+L5 zSRr35lYXhqz}~z`3G|DooEB zHoUuesU&j*tUVE6pOf}{>g3!7Gvf{Rs`9yt6C(mItbSa@a#SE}d9-h{WlDw<3MGBI zP;xTnQA?4kwVo)uRa?x7nkw0zl{aTC*COpkY`fq|pZAJDejoZ6)_evH zY{!IwZFq^KF_6Q6KxfTzq|!MPj#F?9Y{iQPHe-v1ya5{p<-S9pdlg0-DB==HY2Y9R z3^;HJh5-*H1DEl!z~ zl!iSTFNN|o_Th6Ty`LT`=``c3r1if3}lj~_%0I+iZDR%fi9-JiEwVl1i?K{$WF2D=LosWn%`j6Z?fKB61qh~@-?rmiu5ME zZlDvd;8m9LCjDQd6r=A^9Ks+0KF8+}KN0SIf!A3~1?}xBl(#XA!vszhvx9qq=aH)C z5qhe!Zba-)Rnb)UUue@X!vBMzKju2%hC1gB!lnL>@uSS%0{#Kg5QA#~ diff --git a/src/api/java/ic2/api/recipe/RecipeOutput.java b/src/api/java/ic2/api/recipe/RecipeOutput.java deleted file mode 100644 index 0f2fe1cba..000000000 --- a/src/api/java/ic2/api/recipe/RecipeOutput.java +++ /dev/null @@ -1,54 +0,0 @@ -package ic2.api.recipe; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; - -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; - -@Deprecated -public final class RecipeOutput { - public RecipeOutput(NBTTagCompound metadata1, List items1) { - assert !items1.contains(null); - - this.metadata = metadata1; - this.items = items1; - } - - public RecipeOutput(NBTTagCompound metadata1, ItemStack... items1) { - this(metadata1, Arrays.asList(items1)); - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof RecipeOutput) { - RecipeOutput ro = (RecipeOutput) obj; - - if (items.size() == ro.items.size() && - (metadata == null && ro.metadata == null || metadata != null && ro.metadata != null && metadata.equals(ro.metadata))) { - Iterator itA = items.iterator(); - Iterator itB = ro.items.iterator(); - - while (itA.hasNext() && itB.hasNext()) { - ItemStack stackA = itA.next(); - ItemStack stackB = itB.next(); - - if (ItemStack.areItemStacksEqual(stackA, stackB)) return false; - } - - return true; - } - } - - return false; - } - - @Override - public String toString() { - return "ROutput<"+items+","+metadata+">"; - } - - public final List items; - public final NBTTagCompound metadata; -} diff --git a/src/api/java/ic2/api/recipe/Recipes.class b/src/api/java/ic2/api/recipe/Recipes.class deleted file mode 100644 index 1921c1c5b6aa9e04085a1e4d7ba8019e1fb90683..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1903 zcmbtV+invv5FM9ZNC*^C?swV(ZMiIzJ1v!HNT5;*5<&3nI8I{lt{1Pjv^?@hJR$MG z2k=pdv16KO4G0NE@>$Q!Ii9h{&i5Z*zX8B9td(I8tW3e`6g(nO5lNbx24zO+9Rl-B z!ImSMib!)NQXXx*bht4RwL)O3o9l!!PT*2N*rcp45eTM$)H$ zBCR$PZlV~qn5JD53B%)P1BaHO?A^-$c-L$~F&3aH)=l6_kkC5K1p8AdeA{TZV+6`f z#i{05W@XBZCq|2I-oqmIwWVV3SZ)kQSEVg!W_Gu2FK+J+lh$)M=7!3y(lOU{6wW&$ z=@F=om}@8!7+)$Wow2Mme?v3ebfi@nO%krxl`#^N2n(x?_={)c$@N4F*8ekk;19@L za%QxWJ0ERX;mY+9f0113a;!gbTeT1zM&p;WNSltS-QLG>Dn(b=Ww!$I?+$S_h#Dxn zHeYGJrCT(TH0ebfn3C<^zc-t0r~MgrY1&rXPqa!i0vCcMT0UTSCk|=f1?v(!T8hjN zm4r%CU0>7b3jYtzS`% zoXcSe)vjeeXM@F^zKt3(k4W(zsWqi!M}0`VgTU2*+;oAKUEgMXJQl8pGBX1i z>&??$kr^JRX2-2sQ;DJYh+uOp2h#O0EZCo}kg}+BGf-*-QAMH2Rgnm@Mqtmv;%frq zHPyizI^D$Fp679!>sPdG?`*ZH7?rQ77IyB9qj!s|1rU1qAlu_ZZGfP=SX6aUQd^`OU(d z!+DPv;gXwQh6RU2PK!tplFA~y$^So#9wGaAO=4vv#( Y1~?0MajdxS3AhLMaYo<)j$`ofCwi|Wb^rhX diff --git a/src/api/java/ic2/api/recipe/Recipes.java b/src/api/java/ic2/api/recipe/Recipes.java deleted file mode 100644 index c6cc0d753..000000000 --- a/src/api/java/ic2/api/recipe/Recipes.java +++ /dev/null @@ -1,190 +0,0 @@ -package ic2.api.recipe; - -import net.minecraft.item.ItemStack; - -/** - * General recipe registry. - * - *

IMachineRecipeManager.addRecipe takes a metadata parameter, the expected contents are specified - * below as "recipe meta". The metadata NBT itself should be null for "no recipe meta" or a - * NBTTagCompound with keys matching the names and value types mentioned below. - * - *

Example: Compressor recipe, Sand -> Glass: - *

{@code
- * Recipes.compressor.addRecipe(new RecipeInputItemStack(new ItemStack(Blocks.SAND)), null, false, new ItemStack(Blocks.GLASS));
- * }
- * - *

Example: Metal former rolling recipe, Platinum ingot (oredict) -> Platinum plate: - *

{@code
- * Recipes.metalformerRolling.addRecipe(new RecipeInputOreDict("ingotPlatinum"), null, false, myPlatinumPlateStack)
- * }
- * - *

Example: Mass fabricator amplifier, nether stars amplifying 1M EU: - *

{@code
- * NBTTagCompound meta = new NBTTagCompound();
- * meta.setInteger("amplification", 1000000);
- * Recipes.matterAmplifier.addRecipe(new RecipeInputItemStack(new ItemStack(Items.NETHER_STAR)), meta, false);
- * }
- * - */ -public class Recipes { - /** - * Convenience factory for various recipe input variants. - */ - public static IRecipeInputFactory inputFactory; - - /** - * Recipe manager for furnace recipes. - * - *

Recipe meta: - *

    - *
  • float experience: experience per smelt operation - *
- */ - public static IMachineRecipeManager furnace; - - /** - * Recipe manager for macerator recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager macerator; - - /** - * Recipe manager for extractor recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager extractor; - - /** - * Recipe manager for compressor recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager compressor; - - /** - * Recipe manager for thermal centrifuge recipes. - * - *

Recipe meta: - *

    - *
  • int minHeat: minimum heat level required - *
- */ - public static IBasicMachineRecipeManager centrifuge; - - /** - * Recipe manager for blast cutter recipes. - * - *

Recipe meta: - *

    - *
  • int hardness: minimum blade hardness (3=iron, 6=steel, 9=diamond) - *
- */ - public static IBasicMachineRecipeManager blockcutter; - - /** - * Recipe manager for blast furnace recipes. - * - *

Recipe meta: - *

    - *
  • int fluid: input fluid amount per cycle (in mB) - *
  • int duration: process duration (in ticks) - *
- */ - public static IBasicMachineRecipeManager blastfurnace; - - /** - * Recipe manager for recycler recipes. - * - *

No recipe meta. - * - * @note the implementation is currently immutable, any non-blacklisted item will be accepted, - * chance checking is up to the caller. - */ - public static IBasicMachineRecipeManager recycler; - - /** - * Recipe manager for metal former extrusion mode recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerExtruding; - - /** - * Recipe manager for metal former cutting mode recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerCutting; - - /** - * Recipe manager for metal former rolling mode recipes. - * - *

No recipe meta. - */ - public static IBasicMachineRecipeManager metalformerRolling; - - /** - * Recipe manager for ore washing plant recipes. - * - *

Recipe meta: - *

    - *
  • int amount: input fluid amount per cycle (in mB) - *
- */ - public static IBasicMachineRecipeManager oreWashing; - public static ICannerBottleRecipeManager cannerBottle; - public static ICannerEnrichRecipeManager cannerEnrich; - public static IElectrolyzerRecipeManager electrolyzer; - public static IFermenterRecipeManager fermenter; - - /** - * Recipe manager for uu mass fabricator (matter gen) recipes. - * - *

No recipe meta. - * - *

Reference values: - *

    - *
  • 5000: Scrap - *
  • 45000: Scrapbox - *
- */ - public static IMachineRecipeManager matterAmplifier; - - /** - * Reference scrap box chance values: - * - * 0.1: Diamond - * 0.5: Cake, Gold Helmet, Iron Ore, Gold Ore - * 1.0: Wooden tools, Soul Sand, Sign, Leather, Feather, Bone - * 1.5: Apple, Bread - * 2.0: Netherrack, Rotten Flesh - * 3.0: Grass, Gravel - * 4.0: Stick - * 5.0: Dirt, Wooden Hoe - */ - public static IScrapboxManager scrapboxDrops; - public static IListRecipeManager recyclerBlacklist; - /** - * Do not add anything to this Whitelist. This is for Configuration only. - * You may need this if you have an own Recycler in your Mod, just to check if something can be recycled. but don't add anything to this List - */ - public static IListRecipeManager recyclerWhitelist; - public static ICraftingRecipeManager advRecipes; - - public static ISemiFluidFuelManager semiFluidGenerator; - public static IFluidHeatManager fluidHeatGenerator; - /** - * Used by the Liquid Heat Exchanger to cool down liquids and determine the amount of hu generated for every mb. - */ - public static ILiquidHeatExchangerManager liquidCooldownManager; - /** - * Opposite of {@link #liquidCooldownManager}. This is for Liquids that can be heated up again. - */ - public static ILiquidHeatExchangerManager liquidHeatupManager; - - public static IEmptyFluidContainerRecipeManager emptyFluidContainer; - public static IFillFluidContainerRecipeManager fillFluidContainer; -} diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.class b/src/api/java/ic2/api/tile/ExplosionWhitelist.class deleted file mode 100644 index a55a2c524614549d9ec786bcf12b7aeaf4344c05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1086 zcmaiz-*eJH5XZll0)Y@pOQjX7EmW;QTcYTT1JegPc60{y0jC{(JHlD6hJ*=6tN)WP z>O=i8;~(H3<+us4&}nU7_Hw&-pZ)IM=J%f;zW~(n(13wr3MrJ*Si|kW+zHHG9qR@X zC>pqjvW|+5DnshHCzWvIP%&g%hx~|JBPAWHEmVV|ZF%5wHSz_+=Gkbor7LWo zzf)Gn@$C23lfX8%>1v`WU8%MiX3CX4hS-kRB}leK7haC~9pS&`9fv%*mS=NkkNYy% zN6wh)$st3jCGEP!2ht)*!g~5);CMsnx%>Y#Q=SFh?Vj#MHx$6IQocl9peG*cWmvxC z9K)h7`reT^&(FzWm}x3@v08AZiRH&%LxJOi-?YW9emmV%ZA?$dLLsWV-@@HIeOvqi|>yu1|V#Ewb zjy#RZ*&%CC6)Bo$fRUv>(3+v0hFQevo7zKmo;((vp1S7<>=^uLiEccn(V Im5{vp7i$meMF0Q* diff --git a/src/api/java/ic2/api/tile/ExplosionWhitelist.java b/src/api/java/ic2/api/tile/ExplosionWhitelist.java deleted file mode 100644 index 9a4d96998..000000000 --- a/src/api/java/ic2/api/tile/ExplosionWhitelist.java +++ /dev/null @@ -1,48 +0,0 @@ -package ic2.api.tile; - -import java.util.Collections; -import java.util.IdentityHashMap; -import java.util.Set; - -import net.minecraft.block.Block; - -/** - * Blocks on this whitelist will not resist an explosion but won't be destroyed. - * - * The explosion code by default ignores blocks which absorb more than 1000 explosion power to - * prevent abusing personal safes, Trade-O-Mats and other blocks to serve as a cheap and - * invulnerable reactor chambers. Said blocks will not shield the explosion and won't get - * destroyed. - */ -public final class ExplosionWhitelist { - /** - * Add a block to the whitelist. - * - * @param block block to add - */ - public static void addWhitelistedBlock(Block block) { - whitelist.add(block); - } - - /** - * Remove a block from the whitelist. - * - * @param block block to remove - */ - public static void removeWhitelistedBlock(Block block) { - whitelist.remove(block); - } - - /** - * Check if a block is on the whitelist. - * - * @param block block to check if whitelisted - * @return Whether the block is whitelisted - */ - public static boolean isBlockWhitelisted(Block block) { - return whitelist.contains(block); - } - - private static Set whitelist = Collections.newSetFromMap(new IdentityHashMap()); -} - diff --git a/src/api/java/ic2/api/tile/IEnergyStorage.class b/src/api/java/ic2/api/tile/IEnergyStorage.class deleted file mode 100644 index 60375238491bcf122581a59c1a95c390b50117d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmY+Ay-ve06orpVXlTn%p%M!lQ?g*GD`RP;NJvF$VPJEeOXQL`k>eooY79I84~4i% zD-es1_30d+d;RtO@d;pxNr>|h7XpKf{K}V(Qh|dgPMFkxB#4suiIGavxh0pq3$%z` zBhJlKrL^%3+gFy2uNp6K^?Tn%9~u5-Ovct$I^Dgwa!}DkC{g z^1nr3+?r&rY$lhREot8u5a{vG0AavGA^=zq(eE_GQKy4FAMSO8EyeD*N@ E0RZ4vJ^%m! diff --git a/src/api/java/ic2/api/tile/IEnergyStorage.java b/src/api/java/ic2/api/tile/IEnergyStorage.java deleted file mode 100644 index 8fd96da2c..000000000 --- a/src/api/java/ic2/api/tile/IEnergyStorage.java +++ /dev/null @@ -1,61 +0,0 @@ -package ic2.api.tile; - -import net.minecraft.util.EnumFacing; - -/** - * Interface implemented by the tile entity of energy storage blocks. - */ -public interface IEnergyStorage { - /** - * Get the amount of energy currently stored in the block. - * - * @return Energy stored in the block - */ - public int getStored(); - - /** - * Set the amount of energy currently stored in the block. - * - * @param energy stored energy - */ - public void setStored(int energy); - - /** - * Add the specified amount of energy. - * - * Use negative values to decrease. - * - * @param amount of energy to add - * @return Energy stored in the block after adding the specified amount - */ - public int addEnergy(int amount); - - /** - * Get the maximum amount of energy the block can store. - * - * @return Maximum energy stored - */ - public int getCapacity(); - - /** - * Get the block's energy output. - * - * @return Energy output in EU/t - */ - public int getOutput(); - - /** - * Get the block's energy output. - * - * @return Energy output in EU/t - */ - public double getOutputEnergyUnitsPerTick(); - - /** - * Get whether this block can have its energy used by an adjacent teleporter. - * - * @param side side the teleporter is draining energy from - * @return Whether the block is teleporter compatible - */ - public boolean isTeleporterCompatible(EnumFacing side); -} diff --git a/src/api/java/ic2/api/tile/IRotorProvider.class b/src/api/java/ic2/api/tile/IRotorProvider.class deleted file mode 100644 index c772aea744d0218554822cb77f0c7374333ebbf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmZvY&q@O^5Ql$L*KS+?f_U=e$@XHPS5Ja26bj1f3&c1sQ+5-H+2XT#@Bw@%=``X& z@G>)GK0bbvukVjf0COCbI4E&QIBq!AA%%D&w&TQ+urr-42xDDT)`@Qj=hNBJb26QH zcG12h(@J diff --git a/src/api/java/ic2/api/tile/IRotorProvider.java b/src/api/java/ic2/api/tile/IRotorProvider.java deleted file mode 100644 index 0a3597e1e..000000000 --- a/src/api/java/ic2/api/tile/IRotorProvider.java +++ /dev/null @@ -1,33 +0,0 @@ -package ic2.api.tile; - -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ResourceLocation; - -import ic2.api.item.IKineticRotor; - -/** - * Interface for {@link TileEntity}s that can have rotors, see also {@link IKineticRotor}
- * Use the {@link RotorRegistry} to use IC2's default windmill renderer - */ -public interface IRotorProvider { - /** - * @return Radius of current rotor (in blocks), or 0 for no rotor - */ - public int getRotorDiameter(); - - /** - * @return The current direction the rotor is facing - */ - public EnumFacing getFacing(); - - /** - * @return Angle (in degrees) to render the rotor at - */ - public float getAngle(); - - /** - * @return Texture of the current rotor, called every tick so remember to store in a variable - */ - public ResourceLocation getRotorRenderTexture(); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/tile/IWrenchable.class b/src/api/java/ic2/api/tile/IWrenchable.class deleted file mode 100644 index c3628ae7c68e3159bf7501d5269cb4e2447dae8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1007 zcmds0!A=4(5S=25paS0f1i3f~*EJqgNH!snhzW@YlTyc}u-hfOT?n7xFM06j!4L5> zjI+f=voUgzlb7~2^U^o-Ui@hUtNT3`OTWY(|0cFZt57CmwO!&YluJsm z<4%2d@LIP58jFOC8ed3rO;J220h5h(w?@9s84O(qmq|QJ1-xujeUt};sg;({cWDiB zTuhV$rO!rh7_Lkzl75-QZ}lc}F44V=o=$BZ_&^6n+ALv9-~Po=r-hfLEk)?_!k((B zcg924262`s>avLfn*J(TIST0{_ea2yR&A6sjk)9at getWrenchDrops(World world, BlockPos pos, IBlockState state, TileEntity te, EntityPlayer player, int fortune); -} - diff --git a/src/api/java/ic2/api/tile/RotorRegistry$IRotorRegistry.class b/src/api/java/ic2/api/tile/RotorRegistry$IRotorRegistry.class deleted file mode 100644 index 4b25b38aa6f1845f29aa75b700d96fc402ce8429..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 389 zcmZ`#O-sW-5Pef?Vq>i$dhzVRUR>z0DZPk7A)vIuvuhl~mbj70w$Q)k!5`p{64w=x zC?1A+^Yz}$yuH7?0vKUGMiOI>a4cM!#<9$6SIdpmYxBTDI6BLgdaYHZZK*CQ-8AX& zme5<6(rUL7CfrT(ac0@6Cu6w~{pgf46|;55ZB*{zWq|28GsQ^hXA|mb){;u6f0QP9 zo=$^YvZz;5@RjEx9EQ1h*jF~^pX^^R z;+OC*C{jy7g10{Kn-Jp6+EL;Z2d#E4XU;j_cP=x3{qx%&09NsJ4tczlg^RbRF@x0{ z-od+ecrT0h@xe4c#78--q2^#cgO78_V#C2F4nB3T$uQ&Z#wOOgq9c1opE9_+ykLm<^;7 z&3<=Z=r-SvNKy#mkVku5OS>NmC(V&0@Ecbk62yW|SPPv{xvS$7c_1{ywQ_KupKveY zs^cY*)GUQ`81V-W80McjWhjoaI6XdNQoO9Z-fq`62t401Jp6u}9}g*KTe73L>1&GV zyY=>3poHgD{EuTnPfc#wAZ3C?x^ULvYbBQQJ-+i z<7i$ovyE2|{6@3w;yGM%F^__aMZD;s?qUlK7kBWvgD+h8_>$sr@f89G+b){ep^iIm z96yRghew-XD0;ny)-iR~O-rlf*H=p+S0ySz$sCE29M-`?-ep)Ee@z(X&H;Az?~Bkd zRL1LHx>gL;k*>P3S`159D+e)8u1n^OKc%@`8JFl`KMag0%>^DBc_J?Mhwa1vv%jcM zUgpnYm+CO~d>W{L+dEs|`djvCI8Ro~XsJ46k?9CSPW%IV&ny3>aUsP6D{?7*=<|r$ zZ{gyV8Wf;b`R0;*h*jCcEA*`9>6xXjx1B_*30hNQ(YQc6k7h=5y80OGXIi9Cq;V<{ z&f|Gny8{Khfa|o&+Fm3rYkZGpYdrT5si$yhtUkd+3f9kL;wMKMAj?^@J@++-8@NgG zm*^jOx007>SE8Q?&Ju4+#p)ECLbXkEI&ozA*Pm}z+rfV%umSw zj_kcc?lGqStp0+O Type checking to ensure only {@link IRotorProvider} implementing classes are registered - */ - public static void registerRotorProvider(Class clazz) { - if (INSTANCE != null) INSTANCE.registerRotorProvider(clazz); - } - - /** - * Sets the internal Registry instance. - * ONLY IC2 CAN DO THIS!!!!!!! - */ - public static void setInstance(IRotorRegistry i) { - ModContainer mc = Loader.instance().activeModContainer(); - if (mc == null || !Info.MOD_ID.equals(mc.getModId())) { - throw new IllegalAccessError("Only IC2 can set the instance"); - } else { - INSTANCE = i; - } - } - - private static IRotorRegistry INSTANCE; - - public static interface IRotorRegistry { - public void registerRotorProvider(Class clazz); - } -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/IAugmentationUpgrade.class b/src/api/java/ic2/api/upgrade/IAugmentationUpgrade.class deleted file mode 100644 index 98e28e1f5a68d7f04793b1f3e9f3f34408225f4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 269 zcmZvXy$ZrW5QJy_i$8_7f~AEv9@tu`AOr*p@c}mH8cvgogo_Vn;RE{mE_gZKb*$H8Gu_#5&+LvM@KdJF5 zYm=u|DBI_&g|}0~wKq-eB0q}BAHEh|2DuJZVoY+vxK-a3zH5T|I(UiyVsS$l7F83i z-1?AGkMmz{-;v~U#V<@a-;4YgnQ+q5P2kd*`{hck63+Hcf27-o^a+Gcs)O|1PM6R{ P4@k3*EFpx$7RTTdjRXoYKq`=ls0l(%j6v z^w5IzqQsO`y{yEtL`DX+%w!||#DYxyQi!lVcGZjw0wDGJIf;4c`u<5-smUdb3^Evc ep=NuQq~@|QGB7eQ0WmYsc?>|B1xPY6umS*#05MXoYKscfTH}A(&Ws% z^w5IzqQsO`y{yEtL`DX+%w!||#DYxyQi!lVcGZjw0wDGJIf;4c`u<5-smUdb3^Evc ep=NuQq~@|QGB7eQ0WmYsc?>|B1xPY6umS*uq%lwc diff --git a/src/api/java/ic2/api/upgrade/IFluidProducingUpgrade.java b/src/api/java/ic2/api/upgrade/IFluidProducingUpgrade.java deleted file mode 100644 index f310a90f5..000000000 --- a/src/api/java/ic2/api/upgrade/IFluidProducingUpgrade.java +++ /dev/null @@ -1,10 +0,0 @@ -package ic2.api.upgrade; - -/** - * An interface to mark an item as an {@link UpgradableProperty#FluidProducing} type upgrade - * - * @author Player, Chocohead - */ -public interface IFluidProducingUpgrade extends IUpgradeItem { - -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/IFullUpgrade.class b/src/api/java/ic2/api/upgrade/IFullUpgrade.class deleted file mode 100644 index 2e3ed4f982f58e785e8bff8d9457249d89606431..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 526 zcmajc+e!m55C-5sRXbWwt!Ke2PvDIUeFG5-y;59#fVew`l-;D{Q1I2f@Bw@%amAtw z5xfZ``SQ;UdH;BQ12DuPVS}(q=o1EnEy6Zohpe5|!m|G_(F%UHBwT6r9}P6PjTY2Ib%7 diff --git a/src/api/java/ic2/api/upgrade/IFullUpgrade.java b/src/api/java/ic2/api/upgrade/IFullUpgrade.java deleted file mode 100644 index 207786220..000000000 --- a/src/api/java/ic2/api/upgrade/IFullUpgrade.java +++ /dev/null @@ -1,12 +0,0 @@ -package ic2.api.upgrade; - -/** - * An interface to mark an item supporting all {@link UpgradableProperty} type upgrades - * - * @author Player, Chocohead - */ -public interface IFullUpgrade extends IAugmentationUpgrade, IEnergyStorageUpgrade, IFluidConsumingUpgrade, - IFluidProducingUpgrade, IItemConsumingUpgrade, IItemProducingUpgrade, IProcessingUpgrade, - IRedstoneSensitiveUpgrade, ITransformerUpgrade { - -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.class b/src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.class deleted file mode 100644 index b571d1daba1730040ac0f75d65cf3ce709741960..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmX^0Z`VEs1_mPrPId-1b_RBK1`b9BuHgLAqU2P!%$!t41}RU^lGI%1{Ji4Q+|0c6 z(1P@$#FSLMti-ZJMh4Z)WF!5=f=vBVh_F6Z#f%IBAm#cwiFxVz{z+M>$t8>oG8kH+ bMuV(lV`N}tU;<)hpyL>TGz*YqVqgUT4g4^a diff --git a/src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.java b/src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.java deleted file mode 100644 index 0a7216bc9..000000000 --- a/src/api/java/ic2/api/upgrade/IItemConsumingUpgrade.java +++ /dev/null @@ -1,10 +0,0 @@ -package ic2.api.upgrade; - -/** - * An interface to mark an item as an {@link UpgradableProperty#ItemConsuming} type upgrade - * - * @author Player, Chocohead - */ -public interface IItemConsumingUpgrade extends IUpgradeItem { - -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/IItemProducingUpgrade.class b/src/api/java/ic2/api/upgrade/IItemProducingUpgrade.class deleted file mode 100644 index e28bf01b6af49488eef15f6db8f8e464dcb2c20b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 175 zcmX^0Z`VEs1_mPrPId-1b_RBK1`b9BuHgLAqU2P!%$!t41}RU^lGNOQqWqN7$t8>oG8kH+ bMuV(lV`N}tU;<)hpyL>TGz*YqVqgUT2dFTF diff --git a/src/api/java/ic2/api/upgrade/IItemProducingUpgrade.java b/src/api/java/ic2/api/upgrade/IItemProducingUpgrade.java deleted file mode 100644 index 85a3b9929..000000000 --- a/src/api/java/ic2/api/upgrade/IItemProducingUpgrade.java +++ /dev/null @@ -1,10 +0,0 @@ -package ic2.api.upgrade; - -/** - * An interface to mark an item as an {@link UpgradableProperty#ItemProducing} type upgrade - * - * @author Player, Chocohead - */ -public interface IItemProducingUpgrade extends IUpgradeItem { - -} diff --git a/src/api/java/ic2/api/upgrade/IProcessingUpgrade.class b/src/api/java/ic2/api/upgrade/IProcessingUpgrade.class deleted file mode 100644 index 38402e8903dda4341d98f9631b96596ee5474c21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 441 zcmb_ZO-lnY5PehEuGUXbP{ETYy%^}#o3_G2MWOlw(sT@|+3b>LMgN)ye}F$q%+?ha z_Ua*%nc>Zwc{5+%AD;k**h{gUVkgBe;Xrd3zXdNJe4%)`d^9-|Zq6r;gUF3z<>hk_ zCU7pYXr@7`m#c|ULm^8es#1G7XOTUv967UmZHtJw$Oy-gyG46f*8tu%EW`Fqj1Te)-gi(a+2xG!sQKqsHZkC)jzI3cz)q2A0Vd2=TLLA%LY`hZB zh0>uV-q`o2h1jVwm8iDLYLl|kZ^y-~bAHata1pNvw;B6C!t;L%>sS*;N!iwxUnFP3 zz5acYuxrH2j=$aTLjRHP@)!~by-*h+++Ls1 Q#{dX(h$tY0%MQoY7yqwy5&!@I diff --git a/src/api/java/ic2/api/upgrade/IRedstoneSensitiveUpgrade.java b/src/api/java/ic2/api/upgrade/IRedstoneSensitiveUpgrade.java deleted file mode 100644 index 7c06a5afe..000000000 --- a/src/api/java/ic2/api/upgrade/IRedstoneSensitiveUpgrade.java +++ /dev/null @@ -1,31 +0,0 @@ -package ic2.api.upgrade; - -import net.minecraft.item.ItemStack; - -/** - * An interface to mark an item as an {@link UpgradableProperty#RedstoneSensitive} type upgrade - * - * @author Player, Chocohead - */ -public interface IRedstoneSensitiveUpgrade extends IUpgradeItem { - /** - * Whether the upgrade modifies the given {@link IUpgradableBlock}'s redstone input - * - * @param stack The upgrade stack - * @param parent The block being modified - * - * @return Whether the redstone input should be changed (and thus {@link #getRedstoneInput(ItemStack, IUpgradableBlock, int)} be called) - */ - boolean modifiesRedstoneInput(ItemStack stack, IUpgradableBlock parent); - - /** - * Change the redstone input given the {@link IUpgradableBlock}'s initial input value - * - * @param stack The upgrade stack - * @param parent The block receiving the redstone signal - * @param externalInput The initial redstone signal - * - * @return The new redstone signal - */ - int getRedstoneInput(ItemStack stack, IUpgradableBlock parent, int externalInput); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/ITransformerUpgrade.class b/src/api/java/ic2/api/upgrade/ITransformerUpgrade.class deleted file mode 100644 index 2d52de1f97cde12d3e46b83f708c85e94ad8baab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmZXPy$%6E6ot?AxBd#HLZ_iIiB?BQHjyas0N1!S!~Vz^;@K1)z(a{ybX%O0Q+)U2 z+}Hc@1TaP`Ks`VsK$Fmp#Le%{^2UfI%m&L;oJve8+Va6E<0Mg`x3yz^nk}X*%SI%zLZYf@n0v&mia5;QbI3{@%l}# z9Y6cJVIM5-2*fg4c0H#nqn_3qF2jI8=*bs=ej-OB0i+&b(AE^k O;t$2`VI*qYs*@kAD^fZD diff --git a/src/api/java/ic2/api/upgrade/IUpgradableBlock.java b/src/api/java/ic2/api/upgrade/IUpgradableBlock.java deleted file mode 100644 index 766761873..000000000 --- a/src/api/java/ic2/api/upgrade/IUpgradableBlock.java +++ /dev/null @@ -1,29 +0,0 @@ -package ic2.api.upgrade; - -import java.util.Set; - -/** - * An interface to mark a block as supporting {@link IUpgradeItem}s - * - * @author Player - */ -public interface IUpgradableBlock { - /** - * @return The energy the block current has - */ - double getEnergy(); - - /** - * Attempt to use the given amount of energy - * - * @param amount The amount of energy to be used - * - * @return Whether the energy was successfully used - */ - boolean useEnergy(double amount); - - /** - * @return The set of {@link UpgradableProperty}s that the block supports - */ - Set getUpgradableProperties(); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/IUpgradeItem.class b/src/api/java/ic2/api/upgrade/IUpgradeItem.class deleted file mode 100644 index 6432181d32e088353200c874ce5231e2079a2dcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 713 zcmcIi!Ab)$5Pj3ut*x!ryB}aLMta@i!D6AXps?z}TbjltZJLy9R`93%01tkEA0=iN zQITp9@si05GxKKNyyut4CjbNVn%He(kI+?lS}4z_T8^zF93Lh|dbU(X3de6fQ(i9F zBs{6-Vi6~Ee#cqim1e2*asP(UN>ygKFPtP?|EheLC^2AsrC71b9G^*cRoQZy3ujl- z`TO{!0*S1-RANCGZ9@3ka`MshRNJsZIdjLF03c+ZpP3oK{JH5TUPe}HDZH{K?ynCM z9{vY#`1A1sm1_suSVm~4ws1m@l@3?lf8$h^x;QEoK{)t^_bP|bt8}Be$=LaH9_Wb( jgjx_IP;U_GXas*Ncr`@9Z( diff --git a/src/api/java/ic2/api/upgrade/IUpgradeItem.java b/src/api/java/ic2/api/upgrade/IUpgradeItem.java deleted file mode 100644 index 09e16a30b..000000000 --- a/src/api/java/ic2/api/upgrade/IUpgradeItem.java +++ /dev/null @@ -1,44 +0,0 @@ -package ic2.api.upgrade; - -import java.util.Collection; -import java.util.Set; - -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; - -/** - * An interface to mark an item as an upgrade for {@link IUpgradableBlock}s - * - * @author Player, Chocohead - */ -public interface IUpgradeItem { - /** - * Checks if the upgrade is valid for the given {@link UpgradableProperty} types - * - * @param stack The upgrade stack being checked - * @param types The list of types being tested - * - * @return Whether the upgrade is valid - */ - boolean isSuitableFor(ItemStack stack, Set types); - - /** - * Called every time the given {@link IUpgradableBlock} ticks - * - * @param stack The upgrade stack being ticked - * @param parent The parent block being ticked - * - * @return Whether to call {@link TileEntity#markDirty()} due to a stack changing - */ - boolean onTick(ItemStack stack, IUpgradableBlock parent); - - /** - * Called when the given {@link IUpgradableBlock} finishes processing - * - * @param stack The upgrade stack - * @param parent The parent finishing processing - * @param output The list of output products from the process, read only! - * @return final output - */ - Collection onProcessEnd(ItemStack stack, IUpgradableBlock parent, Collection output); -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/UpgradableProperty.class b/src/api/java/ic2/api/upgrade/UpgradableProperty.class deleted file mode 100644 index 7f514987861f5cf7c04df7bea38590545f715420..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1472 zcma)6YflqF6g|@}-R-i4Qr<6lLkmg;0ns8-u_)Srae<`KFH5`BCGD2%gUG+ql8C`* z`0Nkzqw&tPkrGVoHo2$g&Y3%B?#%Ab-s;|v!7#@S1$Q{66^w9vreKugrh+k!&lQYw%qW=PxTRo{;|m!t8PqpUC2zW}WfvJH zvsQjFX`EO||D@;`1v9xX&^Roaq&qPk?<~d8n)Zuj)Ao3pq2sMtaJ`Cc>Za{lo^?vO z);-6t-J^Rof5L#IZ`H(iFAc%sQE(q^SVZrih#ZSMHxL(|!-?N}DIc8?fVLyO`8HhwP^k%^8YiD|w@IU^o^pTCXhGMwyn3-LA?ITC;4+TW9F`$D-Sb0|v?a zV9^f4x>d9d&v&R&FwO^*wS1{Qd8MIr#`eo=&A45sLs#{R@8r!bi=TP#?RzoL8=+x} z-`Hsl+jzw={{QQwVGge~+{c23K@4da=HU(xBRq`qFvi0;4--60Vu+#by77D;3@!N* zT|$Pgc%osCyNAbS-Xs6Zja}O;8LpdZko`Ton^jXA3-qQ8&}*q~^mBgzAz2hiE(MZN zf#g*n*%e5R1(Iojj%-a*nVdsw7COAXQvm)N@fv zbrVpomw=M}`Z*Zid9Bg2Q0c#h2%>c8U35Hsw9g@==^F0PwR=y;bxcR_kvb5lcVh() JX-)vEe*ll{Kp6l4 diff --git a/src/api/java/ic2/api/upgrade/UpgradableProperty.java b/src/api/java/ic2/api/upgrade/UpgradableProperty.java deleted file mode 100644 index 17c575cf6..000000000 --- a/src/api/java/ic2/api/upgrade/UpgradableProperty.java +++ /dev/null @@ -1,45 +0,0 @@ -package ic2.api.upgrade; - -/** - * The possible properties an {@link IUpgradableBlock} can support - * - * @author Player - */ -public enum UpgradableProperty { - /** - * A block that processes something, taking upgrade process time + energy demand into account - */ - Processing, - /** - * A simple count based upgrade property, e.g. extra range - */ - Augmentable, - /** - * A block that is sensitive to redstone state/changes - */ - RedstoneSensitive, - /** - * A block that can have it's tier changed - */ - Transformer, - /** - * A block that can have the amount of energy it stores changed - */ - EnergyStorage, - /** - * A block that consumes items - */ - ItemConsuming, - /** - * A block that produces items - */ - ItemProducing, - /** - * A block that consumes fluids - */ - FluidConsuming, - /** - * A block that produces fluids - */ - FluidProducing, -} \ No newline at end of file diff --git a/src/api/java/ic2/api/upgrade/UpgradeRegistry.class b/src/api/java/ic2/api/upgrade/UpgradeRegistry.class deleted file mode 100644 index 9059b9d15d16a72b7c0b5ad7f59feda4213d3e83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1308 zcma)5TTc@~6#k|yY`bj{q2L9C<)&@bE~4V4m4pyYNUA0lG3e8<9hSxIwwdl4`78bk zFNvrm8ejcU#xuKX+BAyp!_3aPe&;*q{P_9hD}WW;(~-xbjwM{wa7jZkjgpQO${FNv zIg2Z}s-pr^!?F$?iyE$JSYb#99b59I=rWAf5BMu?2EOB(b*JlB88QvW_P8HN!LU4_ zuGKx^n=Qu^mgIZB>G+~$Zqm{4x%INTM()Ek$8-EOhGem{&5+t?H!0AmI{7>bTDwAS z@m-fBWA(Ph-EA%%^^S!pf8QZgb9KjBF?q)^W2ENO2=NnP6G(YTdD1fc7m{JEcrvWg z$!dn7u7b}n^Do1ESm#6DiScG_;m6Pj_GGaX@#S*QR7@0oA3i9}1WrUoJKTJ5H@7mjvM!%&IyhWpl2RO7iB6l0DSIZwOJ za9&YM_b9y*I89qlD}-@63nVe=W^@mgkHFrACKGfHhr$s|(tj>8z!{vSR|e-OWaRt; z$xvsMKO*rR$v4O!BegR&bcEq=@1d1HBb~sr@>}vtLd6}S8x*NPQD!jJ7vG@QH0dsc zwyZ#jW-v>L70TH#4WLobPspfv#37v#&iS}F18FM!cWDdctiJ3q^qnJQKR{Cj_B$@o KYo25YEc^n2I7om1 diff --git a/src/api/java/ic2/api/upgrade/UpgradeRegistry.java b/src/api/java/ic2/api/upgrade/UpgradeRegistry.java deleted file mode 100644 index 8f6bed650..000000000 --- a/src/api/java/ic2/api/upgrade/UpgradeRegistry.java +++ /dev/null @@ -1,38 +0,0 @@ -package ic2.api.upgrade; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import net.minecraft.item.ItemStack; - -/** - * The registry that contains all known {@link IUpgradeItem}s - * - * @author Player - */ -public class UpgradeRegistry { - /** - * Register an upgrade itemstack to the registry - * - * @param stack The upgrade to register - * - * @return The stack that has been registered - */ - public static ItemStack register(ItemStack stack) { - if (!(stack.getItem() instanceof IUpgradeItem)) throw new IllegalArgumentException("The stack must represent an IUpgradeItem."); - - upgrades.add(stack); - - return stack; - } - - /** - * @return An unmodifiable list of registered upgrades - */ - public static Iterable getUpgrades() { - return Collections.unmodifiableCollection(upgrades); - } - - private static final List upgrades = new ArrayList(); -} diff --git a/src/api/java/ic2/api/util/FluidContainerOutputMode.class b/src/api/java/ic2/api/util/FluidContainerOutputMode.class deleted file mode 100644 index 43c42ccb66f4c1705e0f1f0281ce96f954c9508a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1381 zcma)5T~8BH5Iwj1)h=sk3lu>RKS0`|R1g$wRS1DdQiY`0SbSQ_f=jkrvfU-&%^&20 z78Rq>@a&H=&b{40iJEjbxwCWU%$YfJ@BaGz?I(a)EXN?@zK$8pY8ck=Kt~dDe3|Ew zhf$<-vX8j45Jf+?i%|@4`#6d;w*?JFhU9Af&_7-a9A~Ss5%`CJ&oEiCYqNRt(9Q?G z?c~>-z}{VHxV~w-me&ToXzW@AhMr~j_#!W{?ru6}&D!*=JA*ZP^N#86=gYolyZeP~*KMUrjhg9HOwZ=LA-U|Db*hp2o0vf@+OF+CWf=TN-SzEk zg+cb;+9Whqw)b7r4?LohGa{0-o9(0Mn5dM=(oCbpniCS!29Ydw6km0Nda+AMPw9m9 zawG6+)|$;HHTu7+FwMtiV2IzvVFOP#nEsP3`)&uxYSjDCfgx!W9PuC`PBJ*=TKK1v)L?kz|K$iGAre!JM%)=dbYAO zL;p;Y{yueSi1!DOr51&yE`_B=36bJTfW$B#2>A+PxP}qX0Li;WmOpw6>n3q3$WBJD-cxtv;rwRcCItP6xWVyr%|rPf&*|Ugi~2& z<4^BB`ORp4e!so}U=Dc((+o}+jLBUq|Ag(WX*7e2v!zDQx1>>8@#Z;dPrl`q5-nPO zw^uKFadrO6U`p=B824Y0lUo?u2wSGk3Ax95TP1x;Ze>a=8uIcZxifMFl}LIQMjG3u zAT-|BW%nalVQQgKd?sU5nA%EQkixLjL-5xotZ=yzJHcQ^a?V9Xy!NDcN*Ux`&Xv&b r{CT}W=?4rL^umPzhJ6MH&<6-Sj2uK}k;BNN$Wi2R$IvtmZx1GaY*}Cn diff --git a/src/api/java/ic2/api/util/IKeyboard.java b/src/api/java/ic2/api/util/IKeyboard.java deleted file mode 100644 index ff6eaea5e..000000000 --- a/src/api/java/ic2/api/util/IKeyboard.java +++ /dev/null @@ -1,14 +0,0 @@ -package ic2.api.util; - -import net.minecraft.entity.player.EntityPlayer; - -public interface IKeyboard { - boolean isAltKeyDown(EntityPlayer player); - boolean isBoostKeyDown(EntityPlayer player); - boolean isForwardKeyDown(EntityPlayer player); - boolean isJumpKeyDown(EntityPlayer player); - boolean isModeSwitchKeyDown(EntityPlayer player); - boolean isSideinventoryKeyDown(EntityPlayer player); - boolean isHudModeKeyDown(EntityPlayer player); - boolean isSneakKeyDown(EntityPlayer player); -} diff --git a/src/api/java/ic2/api/util/Keys.class b/src/api/java/ic2/api/util/Keys.class deleted file mode 100644 index 0e5ff7fba04b7194a7a606cf39083cbb14bde8f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmY*UyH3ME5S(?KIG8{lG_-U;!AWUBG)PDYD-@vg>&po?GG}C;k@zesBnm!&k3#H0 znl!t!vooXJ@1M^v0CUW8^f1ma$uK1h#kYaIb%eu0?A-8+m@Y_VZf@OMS#z^GCk!sc zOSmNTj!%|^^r~K|VO)rJi|)B}%>$Q}GP9z#TrIhgIB&=_JV{G9*pAoqR+IDlx@)Yv zmT2FJ6HsA<}z659hQuP0j-i%C{p-x6SY44wY bfZi1(DufCmnIhLZ`WIkVQ4HGCnqdDIWCB0l diff --git a/src/api/java/ic2/api/util/Keys.java b/src/api/java/ic2/api/util/Keys.java deleted file mode 100644 index 84d175676..000000000 --- a/src/api/java/ic2/api/util/Keys.java +++ /dev/null @@ -1,6 +0,0 @@ -package ic2.api.util; - - -public class Keys { - public static IKeyboard instance; -} \ No newline at end of file diff --git a/src/main/java/mekanism/common/tile/TileEntityFormulaicAssemblicator.java b/src/main/java/mekanism/common/tile/TileEntityFormulaicAssemblicator.java index 59f40c4b5..b2535a43c 100644 --- a/src/main/java/mekanism/common/tile/TileEntityFormulaicAssemblicator.java +++ b/src/main/java/mekanism/common/tile/TileEntityFormulaicAssemblicator.java @@ -267,11 +267,11 @@ public class TileEntityFormulaicAssemblicator extends TileEntityElectricBlock im { if(!inventory.get(i).isEmpty()) { - ItemStack stack = inventory.get(i); + ItemStack stack = inventory.get(i).copy(); inventory.get(i).shrink(1); - if(stack.getCount() == 0 && stack.getItem().hasContainerItem(stack)) + if(inventory.get(i).getCount() == 0 && stack.getItem().hasContainerItem(stack)) { ItemStack container = stack.getItem().getContainerItem(stack); From c896ef535303582880a547b86b59bdf2e5a871bc Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 1 Aug 2017 09:42:36 -0700 Subject: [PATCH 12/17] Add missing bracket --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index dfe802728..0e31e01a4 100644 --- a/build.gradle +++ b/build.gradle @@ -64,6 +64,7 @@ repositories { maven { name 'ic2' url 'http://maven.ic2.player.to' + } maven { name 'thiakil.io' url 'https://thiakil.github.io/maven/' From b61d9bc61292bf7a316865f4d3228eb47f63ec81 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 1 Aug 2017 09:44:11 -0700 Subject: [PATCH 13/17] formatting fix --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 0e31e01a4..fbbe1d2f6 100644 --- a/build.gradle +++ b/build.gradle @@ -107,7 +107,7 @@ dependencies { compile "li.cil.oc:OpenComputers:MC${config.minecraft_version}-${config.opencomputers_version}:api" deobfCompile "mcp.mobius.waila:Hwyla:${config.hwyla_version}" deobfCompile "com.mod-buildcraft:buildcraft-api:${config.buildcraft_version}" - compile "net.industrial-craft:industrial-craft2:${config.ic2_version}:api" + compile "net.industrial-craft:industrialcraft-2:${config.ic2_version}:api" compile ("com.jaquadro.minecraft.storagedrawers:StorageDrawers:${config.minecraft_version}-${config.storagedrawers_version}:api") { exclude module: "Chameleon" // we only use the API, which doesn't need Chameleon exclude module: "jei_1.11.2" From 78b309582c59a863011d246dfe9fb2d545f3f215 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 1 Aug 2017 10:02:54 -0700 Subject: [PATCH 14/17] Kill off MDK --- build.gradle | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index e636ef8d1..d7c9cb360 100644 --- a/build.gradle +++ b/build.gradle @@ -169,33 +169,25 @@ task generatorsJar(type: Jar) { } } -task MDKZip(type: Zip) { - archiveName = "MDK-${project.version}.zip" - from sourceSets.main.java.srcDirs - include 'mekanism/api/**' - classifier "mdk" -} - task apiJar(type: Jar) { - classifier "api" - baseName "Mekanism" - dependsOn "sourceMainJava" - include 'mekanism/api/**' - from sourceSets.main.java.srcDirs - from sourceSets.main.output + classifier "api" + baseName "Mekanism" + dependsOn "sourceMainJava" + include 'mekanism/api/**' + from sourceSets.main.java.srcDirs + from sourceSets.main.output } artifacts { archives apiJar - archives coreJar - archives toolsJar - archives generatorsJar - archives MDKZip + archives coreJar + archives toolsJar + archives generatorsJar } task fullBuild(type: Delete) { delete jar - dependsOn "build" + dependsOn "build" } apply plugin: 'maven' From 603d8d5b02c259cc5c3cc9bf761e38baf71a39d9 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 1 Aug 2017 10:12:49 -0700 Subject: [PATCH 15/17] Bump version --- build.properties | 2 +- src/main/java/mekanism/common/Mekanism.java | 4 ++-- .../java/mekanism/generators/common/MekanismGenerators.java | 4 ++-- src/main/java/mekanism/tools/common/MekanismTools.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.properties b/build.properties index 5fe308bc8..952ca040b 100644 --- a/build.properties +++ b/build.properties @@ -3,7 +3,7 @@ mappings_version=snapshot_20161220 forge_version=13.20.0.2304 mcmp_version=2.0.0_19 jei_version=4.2.9.247 -mod_version=9.3.3 +mod_version=9.3.4 tesla_version=1.11-1.3.0.52 invtweak_version=1.62+beta.89 opencomputers_version=1.7.0.24 diff --git a/src/main/java/mekanism/common/Mekanism.java b/src/main/java/mekanism/common/Mekanism.java index 7423aa0b9..579ed288e 100644 --- a/src/main/java/mekanism/common/Mekanism.java +++ b/src/main/java/mekanism/common/Mekanism.java @@ -159,7 +159,7 @@ import com.mojang.authlib.GameProfile; * @author AidanBrady * */ -@Mod(modid = "mekanism", name = "Mekanism", version = "9.3.3", guiFactory = "mekanism.client.gui.ConfigGuiFactory", +@Mod(modid = "mekanism", name = "Mekanism", version = "9.3.4", guiFactory = "mekanism.client.gui.ConfigGuiFactory", dependencies = "after:mcmultipart;" + "after:jei;" + "after:buildcraft;" + @@ -192,7 +192,7 @@ public class Mekanism public static Configuration configuration; /** Mekanism version number */ - public static Version versionNumber = new Version(9, 3, 3); + public static Version versionNumber = new Version(9, 3, 4); /** MultiblockManagers for various structrures */ public static MultiblockManager tankManager = new MultiblockManager("dynamicTank"); diff --git a/src/main/java/mekanism/generators/common/MekanismGenerators.java b/src/main/java/mekanism/generators/common/MekanismGenerators.java index db05f833f..96b4bd4a6 100644 --- a/src/main/java/mekanism/generators/common/MekanismGenerators.java +++ b/src/main/java/mekanism/generators/common/MekanismGenerators.java @@ -49,7 +49,7 @@ import net.minecraftforge.oredict.OreDictionary; import buildcraft.api.fuels.BuildcraftFuelRegistry; import buildcraft.api.fuels.IFuel; -@Mod(modid = "mekanismgenerators", name = "MekanismGenerators", version = "9.3.3", dependencies = "required-after:mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") +@Mod(modid = "mekanismgenerators", name = "MekanismGenerators", version = "9.3.4", dependencies = "required-after:mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory") public class MekanismGenerators implements IModule { @SidedProxy(clientSide = "mekanism.generators.client.GeneratorsClientProxy", serverSide = "mekanism.generators.common.GeneratorsCommonProxy") @@ -59,7 +59,7 @@ public class MekanismGenerators implements IModule public static MekanismGenerators instance; /** MekanismGenerators version number */ - public static Version versionNumber = new Version(9, 3, 3); + public static Version versionNumber = new Version(9, 3, 4); public static MultiblockManager turbineManager = new MultiblockManager("industrialTurbine"); diff --git a/src/main/java/mekanism/tools/common/MekanismTools.java b/src/main/java/mekanism/tools/common/MekanismTools.java index 8df01fa60..0c5662587 100644 --- a/src/main/java/mekanism/tools/common/MekanismTools.java +++ b/src/main/java/mekanism/tools/common/MekanismTools.java @@ -32,7 +32,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -@Mod(modid = "mekanismtools", name = "MekanismTools", version = "9.3.3", dependencies = "required-after:mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory") +@Mod(modid = "mekanismtools", name = "MekanismTools", version = "9.3.4", dependencies = "required-after:mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory") public class MekanismTools implements IModule { @SidedProxy(clientSide = "mekanism.tools.client.ToolsClientProxy", serverSide = "mekanism.tools.common.ToolsCommonProxy") @@ -42,7 +42,7 @@ public class MekanismTools implements IModule public static MekanismTools instance; /** MekanismTools version number */ - public static Version versionNumber = new Version(9, 3, 3); + public static Version versionNumber = new Version(9, 3, 4); //Enums: Tools public static ToolMaterial toolOBSIDIAN; From ebb7ca9c7b70aa4cd2f9b5226c05e9e3c9820619 Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Tue, 1 Aug 2017 10:41:31 -0700 Subject: [PATCH 16/17] Cleanup --- .../RenderThermalEvaporationController.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java index 94e4f89d0..3f255743f 100644 --- a/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java +++ b/src/main/java/mekanism/client/render/tileentity/RenderThermalEvaporationController.java @@ -43,18 +43,15 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere push(); FluidRenderer.translateToOrigin(tileEntity.getRenderLocation()); - MekanismRenderer.glowOn(tileEntity.inputTank.getFluid().getFluid().getLuminosity()); - DisplayInteger[] displayList = getListAndRender(tileEntity.inputTank.getFluid().getFluid()); float levels = Math.min(((float)tileEntity.inputTank.getFluidAmount()/tileEntity.inputTank.getCapacity()), 1); - levels *= (tileEntity.height-2); int partialLevels = (int)((levels-(int)levels)*16); - switch (tileEntity.facing) + switch(tileEntity.facing) { case SOUTH: GlStateManager.translate(-1, 0, -1); @@ -65,6 +62,8 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere case WEST: GlStateManager.translate(0, 0, -1); break; + default: + break; } GlStateManager.translate(0, 0.01, 0); @@ -74,7 +73,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere displayList[CONCAVE_INDEX].render(); GlStateManager.translate(0, 1, 0); - for (int i = 1; i < (int)levels; i++) + for(int i = 1; i < (int)levels; i++) { displayList[RING_INDEX].render(); GlStateManager.translate(0, 1, 0); @@ -127,13 +126,14 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere DisplayInteger.endList(); Arrays.fill(displays, 0, LEVELS, empty); } - else - { + else { model.setSideRender(EnumFacing.DOWN, false); - for (int i = 0; i < LEVELS; i++) + + for(int i = 0; i < LEVELS; i++) { displays[i] = generateLevel(i, model); } + model.setSideRender(EnumFacing.UP, false); displays[RING_INDEX] = generateLevel(LEVELS-1, model); model.setSideRender(EnumFacing.DOWN, true); @@ -142,6 +142,7 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere MekanismRenderer.resetColor(); cachedCenterFluids.put(fluid, displays); + return displays; } @@ -166,5 +167,4 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere { cachedCenterFluids.clear(); } - } \ No newline at end of file From d38d519238b5f478f23bfa4550397ad44d7f5cac Mon Sep 17 00:00:00 2001 From: aidancbrady Date: Wed, 2 Aug 2017 20:54:17 -0700 Subject: [PATCH 17/17] Fixed crash --- src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java b/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java index 4a8e6624b..92e10a655 100644 --- a/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java +++ b/src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java @@ -217,6 +217,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I if(set.cardinality() == 0) { it.remove(); + break; } next = index + 1; @@ -234,6 +235,7 @@ public class TileEntityDigitalMiner extends TileEntityElectricBlock implements I if(set.cardinality() == 0) { it.remove(); + break; } next = index + 1;