From dacb220af4b5f93cd2e8c39e5621409646a9c19d Mon Sep 17 00:00:00 2001 From: HbmMods Date: Tue, 11 Jun 2019 21:23:25 +0200 Subject: [PATCH] cable switch, final touches --- assets/hbm/lang/de_DE.lang | 1 + assets/hbm/lang/en_US.lang | 1 + .../hbm/textures/blocks/cable_switch_off.png | Bin 0 -> 371 bytes .../hbm/textures/blocks/cable_switch_on.png | Bin 0 -> 379 bytes com/hbm/blocks/ModBlocks.java | 3 + com/hbm/blocks/machine/CableSwitch.java | 65 ++++++++++++++++++ com/hbm/handler/BobmazonOfferFactory.java | 5 +- .../container/ContainerMachineChemplant.java | 8 +-- com/hbm/inventory/gui/GUILaunchPadTier1.java | 2 +- .../gui/GUIMachineCompactLauncher.java | 2 +- .../inventory/gui/GUIMachineLaunchTable.java | 2 +- com/hbm/items/ModItems.java | 38 +++++----- com/hbm/items/tool/ItemAssemblyTemplate.java | 12 ++++ com/hbm/lib/HbmChestContents.java | 1 + com/hbm/lib/Library.java | 29 ++++++++ com/hbm/lib/RefStrings.java | 2 +- com/hbm/main/CraftingManager.java | 1 + com/hbm/main/MainRegistry.java | 1 + .../conductor/TileEntityCableSwitch.java | 9 +++ .../TileEntityMachineReactorSmall.java | 3 + 20 files changed, 157 insertions(+), 28 deletions(-) create mode 100644 assets/hbm/textures/blocks/cable_switch_off.png create mode 100644 assets/hbm/textures/blocks/cable_switch_on.png create mode 100644 com/hbm/blocks/machine/CableSwitch.java create mode 100644 com/hbm/tileentity/conductor/TileEntityCableSwitch.java diff --git a/assets/hbm/lang/de_DE.lang b/assets/hbm/lang/de_DE.lang index 2fe5afa1b..5d72826d7 100644 --- a/assets/hbm/lang/de_DE.lang +++ b/assets/hbm/lang/de_DE.lang @@ -367,6 +367,7 @@ container.arcFurnace=Lichtbogenofen tile.machine_generator.name=Atomreaktor (Alt) container.generator=Atomreaktor tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel +tile.cable_switch.name=Stromschalter tile.machine_deuterium.name=Deuteriumextraktor container.machine_deuterium=Deuteriumextraktor tile.machine_battery_potato.name=Kartoffelbatterieblock diff --git a/assets/hbm/lang/en_US.lang b/assets/hbm/lang/en_US.lang index c6ffcc6a2..52c816fab 100644 --- a/assets/hbm/lang/en_US.lang +++ b/assets/hbm/lang/en_US.lang @@ -367,6 +367,7 @@ container.arcFurnace=Arc Furnace tile.machine_generator.name=Nuclear Reactor (Old) container.generator=Nuclear Reactor tile.red_wire_coated.name=Coated Red Copper Cable +tile.cable_switch.name=Power Switch tile.machine_deuterium.name=Deuterium Extractor container.machine_deuterium=Deuterium Extractor tile.machine_battery_potato.name=Potato Battery Block diff --git a/assets/hbm/textures/blocks/cable_switch_off.png b/assets/hbm/textures/blocks/cable_switch_off.png new file mode 100644 index 0000000000000000000000000000000000000000..93946e856b01095cb451bb74659ed955a5b6fd3a GIT binary patch literal 371 zcmV-(0gV2MP)b>!3_KFb$0{%edhjlH`XBquLivamR_YAQ! zI04zgIF)i;G+ZQ#;_;56q-|SQRk%Au1nv%11pv4^+#R%dkMX3cXqpB9AR;AbW@RrT z#b*IC!!Qg`1ao(oSyhc-(T|K$be{Six7cUb6?REPie><~|0nslV4Jv!Abrk7YiwE$ z3{@2(G6SsH%hx;3XJE4dM1Z%)=PJ&oCRS$ifVu12EwJ0&!OU0fhdEP)V4u3`L)>MBs z6brIbtUU2us>*CO13*M-(ah?< zh}1k9m>I|85haDYV`hVH0haU3sO02*yXBU6Zko!jh)C58@bJ&!!-#E(pA6Eh*Hvpa zZIc+PDk9PYT#J{_4^AhTOh5$Q9-jvFFttSIFb{gy=W|#r?l3d<`>z4RU~Fb+FbJBl z;e7r9y~h5BhIt4{ zC6Hp_@b{TthXG`@TKRN39o+d?(s(_LZ`-zi3-L(CQle947 next release version diff --git a/com/hbm/main/CraftingManager.java b/com/hbm/main/CraftingManager.java index 03a42658a..f2586ab3b 100644 --- a/com/hbm/main/CraftingManager.java +++ b/com/hbm/main/CraftingManager.java @@ -589,6 +589,7 @@ public class CraftingManager { //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_generator), 1), new Object[] { "SLS", "LCL", "SLS", 'C', ModItems.circuit_red_copper, 'L', ModItems.rod_quad_lead, 'S', "ingotSteel" })); //GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_industrial_generator), 1), new Object[] { "PPP", "FGG", "WSS", 'P', ModItems.board_copper, 'F', ModItems.generator_front, 'G', ModItems.generator_steel, 'W', ModBlocks.red_wire_coated, 'S', ModItems.pedestal_steel }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_wire_coated), 16), new Object[] { "WRW", "RIR", "WRW", 'W', ModItems.plate_polymer, 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper })); + GameRegistry.addRecipe(new ItemStack(ModBlocks.cable_switch, 1), new Object[] { "S", "W", 'S', Blocks.lever, 'W', ModBlocks.red_wire_coated }); GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_cable), 16), new Object[] { " W ", "RRR", " W ", 'W', ModItems.plate_polymer, 'R', ModItems.wire_red_copper }); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.red_pylon), 4), new Object[] { "CWC", "PWP", " T ", 'C', ModItems.coil_copper_torus, 'W', "plankWood", 'P', ModItems.plate_polymer, 'T', ModBlocks.red_wire_coated })); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.oil_duct_solid), 16), new Object[] { "SPS", "P P", "SPS", 'S', "ingotSteel", 'P', "plateIron" })); diff --git a/com/hbm/main/MainRegistry.java b/com/hbm/main/MainRegistry.java index 0b6cab291..91cc3ee1d 100644 --- a/com/hbm/main/MainRegistry.java +++ b/com/hbm/main/MainRegistry.java @@ -532,6 +532,7 @@ public class MainRegistry GameRegistry.registerTileEntity(TileEntityCompactLauncher.class, "tileentity_small_launcher"); GameRegistry.registerTileEntity(TileEntityMultiblock.class, "tileentity_multi_core"); GameRegistry.registerTileEntity(TileEntityChlorineSeal.class, "tileentity_chlorine_seal"); + GameRegistry.registerTileEntity(TileEntityCableSwitch.class, "tileentity_he_switch"); EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true); EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true); diff --git a/com/hbm/tileentity/conductor/TileEntityCableSwitch.java b/com/hbm/tileentity/conductor/TileEntityCableSwitch.java new file mode 100644 index 000000000..6af382b7b --- /dev/null +++ b/com/hbm/tileentity/conductor/TileEntityCableSwitch.java @@ -0,0 +1,9 @@ +package com.hbm.tileentity.conductor; + +import com.hbm.interfaces.IConductor; + +import net.minecraft.tileentity.TileEntity; + +public class TileEntityCableSwitch extends TileEntityWireCoated { + +} diff --git a/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java b/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java index 4d2456972..7a5db9a85 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java +++ b/com/hbm/tileentity/machine/TileEntityMachineReactorSmall.java @@ -326,6 +326,9 @@ public class TileEntityMachineReactorSmall extends TileEntity } } + if(rodMax == 0) + return 0; + return rod * 100 / rodMax; }