From aa6ff4a84c6e2010fa81a16467a011d95ade2747 Mon Sep 17 00:00:00 2001 From: MartinSVK12 <37455793+MartinSVK12@users.noreply.github.com> Date: Wed, 20 Mar 2024 22:33:37 +0100 Subject: [PATCH] Added the basics of item transportation: - Item Conduits and Inserters Revamped booster system: - Added a weaker version of the Dilitium Booster available in the Basic Tier, the Redstone Booster - Added "yield" property to boosters, higher yield has a chance to multiply the outputs of other machines --- .../signalindustries/SignalIndustries.java | 80 +++- .../api/impl/btwaila/BTWailaSIPlugin.java | 6 +- .../impl/btwaila/tooltip/BoosterTooltip.java | 8 +- .../btwaila/tooltip/ItemConduitTooltip.java | 24 ++ .../signalindustries/blocks/BlockConduit.java | 12 - .../blocks/BlockFluidConduit.java | 12 - .../blocks/BlockInserter.java | 47 ++ .../blocks/BlockItemConduit.java | 80 ++++ .../machines/BlockDilithiumBooster.java | 4 +- .../states/ConduitStateInterpreter.java | 3 +- .../states/ItemConduitStateInterpreter.java | 46 ++ .../signalindustries/gui/GuiAlloySmelter.java | 4 +- .../signalindustries/gui/GuiAutoMiner.java | 2 +- .../signalindustries/gui/GuiBooster.java | 23 +- .../signalindustries/gui/GuiCrusher.java | 3 + .../gui/GuiCrystalChamber.java | 4 +- .../gui/GuiCrystalCutter.java | 4 +- .../gui/GuiEnergyInjector.java | 6 +- .../signalindustries/gui/GuiExtractor.java | 4 +- .../signalindustries/gui/GuiInfuser.java | 3 + .../signalindustries/gui/GuiPlateFormer.java | 3 + .../signalindustries/gui/GuiProgrammer.java | 3 + .../signalindustries/gui/GuiPump.java | 4 +- .../gui/GuiSignalumDynamo.java | 3 + .../inventories/TileEntityInserter.java | 122 ++++++ .../inventories/TileEntityItemConduit.java | 403 ++++++++++++++++++ .../base/TileEntityTieredMachineBase.java | 17 +- .../base/TileEntityTieredMachineSimple.java | 48 ++- .../machines/TileEntityAutoMiner.java | 54 ++- .../machines/TileEntityBooster.java | 72 +++- .../machines/TileEntityCrystalCutter.java | 5 + .../machines/TileEntityDimensionalAnchor.java | 4 +- .../machines/TileEntityExtractor.java | 4 +- .../machines/TileEntityProgrammer.java | 4 +- .../inventories/machines/TileEntityPump.java | 4 +- .../TileEntityReinforcedExtractor.java | 2 +- .../mixin/EntityPlayerMixin.java | 4 - .../container/AlloySmelterRecipes.java | 13 +- .../recipes/container/CrusherRecipes.java | 28 +- .../container/CrystalCutterRecipes.java | 17 +- .../render/RenderFluidInConduit.java | 2 +- .../render/RenderItemsInConduit.java | 199 +++++++++ .../signalindustries/util/PipeMode.java | 6 + .../signalindustries/block/awakened_blank.png | Bin 0 -> 425 bytes .../block/awakened_booster_overlay.png | Bin 0 -> 225 bytes .../block/awakened_booster_side_active.png | Bin 0 -> 546 bytes .../block/awakened_booster_side_inactive.png | Bin 0 -> 543 bytes .../block/awakened_booster_top_active.png | Bin 0 -> 553 bytes .../block/awakened_booster_top_inactive.png | Bin 0 -> 528 bytes .../block/basic_booster_overlay.png | Bin 0 -> 248 bytes .../block/basic_booster_overlay_top.png | Bin 0 -> 251 bytes .../block/basic_booster_side_active.png | Bin 0 -> 626 bytes .../block/basic_booster_side_inactive.png | Bin 0 -> 640 bytes .../block/basic_booster_top_active.png | Bin 0 -> 587 bytes .../block/basic_booster_top_inactive.png | Bin 0 -> 590 bytes .../block/basic_inserter_input.png | Bin 0 -> 596 bytes .../block/basic_inserter_output.png | Bin 0 -> 534 bytes .../{inserterinput.png => inserter_input.png} | Bin ...inserteroutput.png => inserter_output.png} | Bin .../block/item_conduit_basic.png | Bin 0 -> 515 bytes .../block/machine_awakened.png | Bin 739 -> 546 bytes .../block/machine_reinforced.png | Bin 522 -> 512 bytes .../block/reinforced_blank.png | Bin 349 -> 349 bytes .../blockstates/basic_item_conduit.json | 57 +++ .../signalindustries/gui/awakened_booster.png | Bin 0 -> 4025 bytes .../gui/awakened_gui_base.png | Bin 0 -> 2789 bytes .../signalindustries/gui/redstone_booster.png | Bin 0 -> 10053 bytes .../model/conduit/item/basic/conduit_all.json | 6 + .../conduit/item/basic/conduit_base.json | 6 + .../conduit/item/basic/conduit_down.json | 6 + .../conduit/item/basic/conduit_east.json | 6 + .../conduit/item/basic/conduit_north.json | 6 + .../conduit/item/basic/conduit_south.json | 6 + .../model/conduit/item/basic/conduit_up.json | 6 + .../conduit/item/basic/conduit_west.json | 6 + .../conduit/template_item_conduit_all.json | 99 +++++ .../conduit/template_item_conduit_base.json | 21 + .../conduit/template_item_conduit_down.json | 21 + .../conduit/template_item_conduit_east.json | 21 + .../conduit/template_item_conduit_north.json | 21 + .../conduit/template_item_conduit_south.json | 21 + .../conduit/template_item_conduit_up.json | 21 + .../conduit/template_item_conduit_west.json | 21 + .../signalindustries/recipes/workbench.json | 2 +- .../lang/signalindustries/en_US.lang | 17 +- 85 files changed, 1635 insertions(+), 131 deletions(-) create mode 100644 src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/ItemConduitTooltip.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/blocks/BlockInserter.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityInserter.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/render/RenderItemsInConduit.java create mode 100644 src/main/java/sunsetsatellite/signalindustries/util/PipeMode.java create mode 100644 src/main/resources/assets/signalindustries/block/awakened_blank.png create mode 100644 src/main/resources/assets/signalindustries/block/awakened_booster_overlay.png create mode 100644 src/main/resources/assets/signalindustries/block/awakened_booster_side_active.png create mode 100644 src/main/resources/assets/signalindustries/block/awakened_booster_side_inactive.png create mode 100644 src/main/resources/assets/signalindustries/block/awakened_booster_top_active.png create mode 100644 src/main/resources/assets/signalindustries/block/awakened_booster_top_inactive.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_overlay.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_overlay_top.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_side_active.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_side_inactive.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_top_active.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_booster_top_inactive.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_inserter_input.png create mode 100644 src/main/resources/assets/signalindustries/block/basic_inserter_output.png rename src/main/resources/assets/signalindustries/block/{inserterinput.png => inserter_input.png} (100%) rename src/main/resources/assets/signalindustries/block/{inserteroutput.png => inserter_output.png} (100%) create mode 100644 src/main/resources/assets/signalindustries/block/item_conduit_basic.png create mode 100644 src/main/resources/assets/signalindustries/blockstates/basic_item_conduit.json create mode 100644 src/main/resources/assets/signalindustries/gui/awakened_booster.png create mode 100644 src/main/resources/assets/signalindustries/gui/awakened_gui_base.png create mode 100644 src/main/resources/assets/signalindustries/gui/redstone_booster.png create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_all.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_base.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_down.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_east.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_north.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_south.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_up.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/item/basic/conduit_west.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_all.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_base.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_down.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_east.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_north.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_south.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_up.json create mode 100644 src/main/resources/assets/signalindustries/model/conduit/template_item_conduit_west.json diff --git a/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java b/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java index 2587d669..3f1ee9e2 100644 --- a/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java +++ b/src/main/java/sunsetsatellite/signalindustries/SignalIndustries.java @@ -53,6 +53,7 @@ import sunsetsatellite.signalindustries.blocks.machines.*; import sunsetsatellite.signalindustries.blocks.states.ConduitStateInterpreter; import sunsetsatellite.signalindustries.blocks.states.EEPROMProgrammerStateInterpreter; +import sunsetsatellite.signalindustries.blocks.states.ItemConduitStateInterpreter; import sunsetsatellite.signalindustries.dim.WorldTypeEternity; import sunsetsatellite.signalindustries.entities.EntityCrystal; import sunsetsatellite.signalindustries.entities.EntityEnergyOrb; @@ -210,6 +211,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { public static final Tag ENERGY_CONDUITS_CONNECT = Tag.of("energy_conduits_connect"); public static final Tag FLUID_CONDUITS_CONNECT = Tag.of("fluid_conduits_connect"); + public static final Tag ITEM_CONDUITS_CONNECT = Tag.of("item_conduits_connect"); public static final Block signalumOre = new BlockBuilder(MOD_ID) .setTextures("signalum_ore.png") @@ -432,6 +434,22 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { ) .build(new BlockFluidConduit("reinforced.conduit.fluid",config.getInt("BlockIDs.reinforcedFluidConduit"),Tier.REINFORCED,Material.glass)); + public static final Block basicItemConduit = new BlockBuilder(MOD_ID) + .setTextures("item_conduit_basic.png") + .setLuminance(0) + .setResistance(1) + .setHardness(1) + .setBlockSound(BlockSounds.GLASS) + .setBlockModel( + new BlockModelDragonFly( + ModelHelper.getOrCreateBlockModel(MOD_ID,"conduit/item/basic/conduit_all.json"), + ModelHelper.getOrCreateBlockState(MOD_ID,"basic_item_conduit.json"), + new ItemConduitStateInterpreter(), + true + ) + ) + .build(new BlockItemConduit("basic.conduit.item",config.getInt("BlockIDs.basicItemConduit"),Tier.BASIC,Material.glass)); + public static final Block infiniteEnergyCell = new BlockBuilder(MOD_ID) .setTextures("cell_prototype.png") @@ -642,6 +660,15 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { .setNorthTexture("dilithium_top_inactive.png") .build(new BlockDilithiumStabilizer("reinforced.dilithiumStabilizer",config.getInt("BlockIDs.dilithiumStabilizer"), Tier.REINFORCED,Material.metal)); + public static final Block redstoneBooster = new BlockBuilder(MOD_ID) //BlockHelper.createBlock(MOD_ID,new BlockDilithiumBooster("reinforced.dilithiumBooster",config.getInt("BlockIDs.dilithiumBooster"), Tier.REINFORCED,Material.metal),"reinforced_blank.png","reinforced_blank.png","dilithium_top_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png",BlockSounds.METAL,5f,20f,1); + .setHardness(1) + .setResistance(3) + .setBlockSound(BlockSounds.METAL) + .setTextures("basic_blank.png") + .setSideTextures("basic_booster_side_inactive.png") + .setNorthTexture("basic_booster_top_inactive.png") + .build(new BlockDilithiumBooster("basic.booster",config.getInt("BlockIDs.redstoneBooster"), Tier.BASIC,Material.metal)); + public static final Block dilithiumBooster = new BlockBuilder(MOD_ID) //BlockHelper.createBlock(MOD_ID,new BlockDilithiumBooster("reinforced.dilithiumBooster",config.getInt("BlockIDs.dilithiumBooster"), Tier.REINFORCED,Material.metal),"reinforced_blank.png","reinforced_blank.png","dilithium_top_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png",BlockSounds.METAL,5f,20f,1); .setHardness(1) .setResistance(3) @@ -649,7 +676,17 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { .setTextures("reinforced_blank.png") .setSideTextures("dilithium_booster_side_inactive.png") .setNorthTexture("dilithium_top_inactive.png") - .build(new BlockDilithiumBooster("reinforced.dilithiumBooster",config.getInt("BlockIDs.dilithiumBooster"), Tier.REINFORCED,Material.metal)); + .build(new BlockDilithiumBooster("reinforced.booster",config.getInt("BlockIDs.dilithiumBooster"), Tier.REINFORCED,Material.metal)); + + //TODO: W.I.P. + /*public static final Block awakenedBooster = new BlockBuilder(MOD_ID) //BlockHelper.createBlock(MOD_ID,new BlockDilithiumBooster("reinforced.dilithiumBooster",config.getInt("BlockIDs.dilithiumBooster"), Tier.REINFORCED,Material.metal),"reinforced_blank.png","reinforced_blank.png","dilithium_top_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png","dilithium_booster_side_inactive.png",BlockSounds.METAL,5f,20f,1); + .setHardness(1) + .setResistance(3) + .setBlockSound(BlockSounds.METAL) + .setTextures("awakened_blank.png") + .setSideTextures("awakened_booster_side_inactive.png") + .setNorthTexture("awakened_booster_top_inactive.png") + .build(new BlockDilithiumBooster("awakened.booster",config.getInt("BlockIDs.awakenedBooster"), Tier.AWAKENED,Material.metal));*/ public static final Block prototypePump = new BlockBuilder(MOD_ID) .setHardness(1) @@ -669,15 +706,23 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { .setSideTextures("basic_pump_side_empty.png") .build(new BlockPump("basic.pump",config.getInt("BlockIDs.basicPump"), Tier.BASIC,Material.metal)); - /*public static final Block prototypeBlockBreaker = new BlockBuilder(MOD_ID) + public static final Block prototypeInserter = new BlockBuilder(MOD_ID) .setHardness(1) .setResistance(3) .setBlockSound(BlockSounds.STONE) .setTextures("prototype_blank.png") - .setTopBottomTexture("prototype_block_breaker_side_2.png") - .setSideTextures("prototype_block_breaker_side.png") - .setNorthTexture("prototype_block_breaker.png") - .build(new BlockBreaker("prototype.blockBreaker",config.getInt("BlockIDs.prototypeBlockBreaker"),Tier.PROTOTYPE,Material.stone));*/ + .setSouthTexture("inserter_output.png") + .setNorthTexture("inserter_input.png") + .build(new BlockInserter("prototype.inserter",config.getInt("BlockIDs.prototypeInserter"),Tier.PROTOTYPE,Material.stone)); + + public static final Block basicInserter = new BlockBuilder(MOD_ID) + .setHardness(1) + .setResistance(3) + .setBlockSound(BlockSounds.METAL) + .setTextures("basic_blank.png") + .setSouthTexture("basic_inserter_output.png") + .setNorthTexture("basic_inserter_input.png") + .build(new BlockInserter("basic.inserter",config.getInt("BlockIDs.basicInserter"),Tier.BASIC,Material.metal)); public static final int[][] breakerTex = new int[][]{TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker_active.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker_side.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker_side_active.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker_side_2.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"prototype_block_breaker_side_2_active.png"),TextureHelper.getOrCreateBlockTexture(MOD_ID,"inserteroutput.png")}; public static final Block basicAutomaticMiner = new BlockBuilder(MOD_ID) @@ -687,6 +732,7 @@ public class SignalIndustries implements ModInitializer, GameStartEntrypoint { .setTextures("basic_blank.png") .setNorthTexture("basic_automatic_miner.png") .build(new BlockAutoMiner("basic.automaticMiner",config.getInt("BlockIDs.basicAutomaticMiner"),Tier.BASIC,Material.metal)); + public static final Block externalIo = new BlockBuilder(MOD_ID) .setBlockSound(BlockSounds.METAL) .setHardness(1) @@ -1100,11 +1146,18 @@ public void onInitialize() { textures.put("dilithiumStabilizer.vertical.active",new BlockTexture(MOD_ID).setAll("reinforced_blank.png").setSides("dilithium_stabilizer_side_active.png").setTopTexture("dilithium_top_active.png")); textures.put("dilithiumStabilizer.vertical.active.overlay",new BlockTexture(MOD_ID).setSides("stabilizer_overlay.png").setTopTexture("dilithium_machine_overlay.png")); - textures.put("dilithiumBooster.active",new BlockTexture(MOD_ID).setAll("reinforced_blank.png").setSides("dilithium_booster_side_active.png").setNorthTexture("dilithium_top_active.png")); - textures.put("dilithiumBooster.active.overlay",new BlockTexture(MOD_ID).setSides("booster_overlay.png").setNorthTexture("dilithium_machine_overlay.png")); + textures.put(Tier.BASIC.name()+"booster.active",new BlockTexture(MOD_ID).setAll("basic_blank.png").setSides("basic_booster_side_active.png").setNorthTexture("basic_booster_top_active.png")); + textures.put(Tier.BASIC.name()+"booster.active.overlay",new BlockTexture(MOD_ID).setSides("basic_booster_overlay.png").setNorthTexture("basic_booster_overlay_top.png")); + textures.put(Tier.REINFORCED.name()+"booster.active",new BlockTexture(MOD_ID).setAll("reinforced_blank.png").setSides("dilithium_booster_side_active.png").setNorthTexture("dilithium_top_active.png")); + textures.put(Tier.REINFORCED.name()+"booster.active.overlay",new BlockTexture(MOD_ID).setSides("booster_overlay.png").setNorthTexture("dilithium_machine_overlay.png")); + textures.put(Tier.AWAKENED.name()+"booster.active",new BlockTexture(MOD_ID).setAll("awakened_blank.png").setSides("awakened_booster_side_active.png").setNorthTexture("awakened_booster_top_active.png")); + textures.put(Tier.AWAKENED.name()+"booster.active.overlay",new BlockTexture(MOD_ID).setSides("awakened_booster_overlay.png").setNorthTexture("dilithium_machine_overlay.png")); textures.put("uvLamp.active",new BlockTexture(MOD_ID).setAll("uv_lamp.png")); + textures.put(Tier.PROTOTYPE.name()+".inserter.vertical",new BlockTexture(MOD_ID).setAll("prototype_blank.png").setBottomTexture("inserter_output.png").setTopTexture("inserter_input.png")); + textures.put(Tier.BASIC.name()+".inserter.vertical",new BlockTexture(MOD_ID).setAll("basic_blank.png").setBottomTexture("basic_inserter_output.png").setTopTexture("basic_inserter_input.png")); + textures.put(Tier.BASIC.name()+".externalIo",new BlockTexture(MOD_ID).setAll("external_io_blank.png").setTopTexture("external_io_input.png").setBottomTexture("external_io_output.png").setNorthTexture("external_io_both.png")); textures.put(Tier.REINFORCED.name()+".centrifuge.active",new BlockTexture(MOD_ID).setAll("reinforced_blank.png").setTopTexture("reinforced_centrifuge_closed.png").setNorthTexture("reinforced_centrifuge_front_active.png")); @@ -1162,14 +1215,11 @@ public SignalIndustries(){ ItemToolPickaxe.miningLevels.put(reinforcedGlass,3); ItemToolPickaxe.miningLevels.put(reinforcedCasing,3); - - ironPlateHammer.setContainerItem(ironPlateHammer); CommandHelper.Core.createCommand(new NBTEditCommand()); CommandHelper.Core.createCommand(new StructureCommand("structure","struct")); - EntityHelper.Core.createSpecialTileEntity(TileEntityConduit.class, new RenderFluidInConduit(),"Conduit"); - EntityHelper.Core.createSpecialTileEntity(TileEntityFluidConduit.class, new RenderFluidInConduit(),"Fluid Conduit"); + EntityHelper.Core.createEntity(EntityCrystal.class,47,"signalumCrystal"); EntityHelper.Client.assignEntityRenderer(EntityCrystal.class,new SnowballRenderer(volatileSignalumCrystal.getIconFromDamage(0))); EntityHelper.Core.createEntity(EntityEnergyOrb.class,49,"energyOrb"); @@ -1177,6 +1227,12 @@ public SignalIndustries(){ EntityHelper.Core.createEntity(EntitySunbeam.class,49,"sunBeam"); EntityHelper.Client.assignEntityRenderer(EntitySunbeam.class,new SunbeamRenderer()); + EntityHelper.Core.createSpecialTileEntity(TileEntityConduit.class, new RenderFluidInConduit(),"Conduit"); + EntityHelper.Core.createSpecialTileEntity(TileEntityFluidConduit.class, new RenderFluidInConduit(),"Fluid Conduit"); + EntityHelper.Core.createSpecialTileEntity(TileEntityItemConduit.class, new RenderItemsInConduit(),"Item Conduit"); + + EntityHelper.Core.createTileEntity(TileEntityInserter.class, "Inserter"); + EntityHelper.Core.createSpecialTileEntity(TileEntityEnergyCell.class,new RenderFluidInBlock(),"Energy Cell"); addToNameGuiMap("Energy Cell", GuiEnergyCell.class, TileEntityEnergyCell.class); diff --git a/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/BTWailaSIPlugin.java b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/BTWailaSIPlugin.java index 71417427..d3a59c14 100644 --- a/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/BTWailaSIPlugin.java +++ b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/BTWailaSIPlugin.java @@ -2,10 +2,7 @@ import org.slf4j.Logger; import sunsetsatellite.signalindustries.SignalIndustries; -import sunsetsatellite.signalindustries.api.impl.btwaila.tooltip.BoosterTooltip; -import sunsetsatellite.signalindustries.api.impl.btwaila.tooltip.FluidTooltip; -import sunsetsatellite.signalindustries.api.impl.btwaila.tooltip.MachineTooltip; -import sunsetsatellite.signalindustries.api.impl.btwaila.tooltip.StabilizerTooltip; +import sunsetsatellite.signalindustries.api.impl.btwaila.tooltip.*; import toufoumaster.btwaila.entryplugins.waila.BTWailaCustomTooltipPlugin; import toufoumaster.btwaila.tooltips.TooltipRegistry; @@ -17,5 +14,6 @@ public void initializePlugin(TooltipRegistry tooltipRegistry, Logger logger) { tooltipRegistry.register(new MachineTooltip()); tooltipRegistry.register(new BoosterTooltip()); tooltipRegistry.register(new StabilizerTooltip()); + tooltipRegistry.register(new ItemConduitTooltip()); } } diff --git a/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/BoosterTooltip.java b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/BoosterTooltip.java index 21ed4b95..03148949 100644 --- a/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/BoosterTooltip.java +++ b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/BoosterTooltip.java @@ -1,5 +1,6 @@ package sunsetsatellite.signalindustries.api.impl.btwaila.tooltip; +import net.minecraft.core.block.Block; import net.minecraft.core.lang.I18n; import net.minecraft.core.util.helper.Side; import sunsetsatellite.catalyst.fluids.api.IFluidInventory; @@ -8,6 +9,7 @@ import sunsetsatellite.signalindustries.SignalIndustries; import sunsetsatellite.signalindustries.inventories.machines.TileEntityBooster; import sunsetsatellite.signalindustries.inventories.machines.TileEntityStabilizer; +import sunsetsatellite.signalindustries.util.Tier; import toufoumaster.btwaila.gui.components.AdvancedInfoComponent; import toufoumaster.btwaila.tooltips.TileTooltip; import toufoumaster.btwaila.tooltips.Tooltip; @@ -24,9 +26,13 @@ public void initTooltip() { @Override public void drawAdvancedTooltip(TileEntityBooster tile, AdvancedInfoComponent c) { ProgressBarOptions options = new ProgressBarOptions() - .setForegroundOptions(new TextureOptions(0xFFFFFF,SignalIndustries.dilithiumCrystalBlock.atlasIndices[0])) .setBackgroundOptions(new TextureOptions(0xFFFFFF,SignalIndustries.realityFabric.atlasIndices[0])) .setText("Fuel: "); + if(tile.tier == Tier.BASIC){ + options.setForegroundOptions(new TextureOptions(0xFFFFFF, Block.blockRedstone.atlasIndices[0])); + } else { + options.setForegroundOptions(new TextureOptions(0xFFFFFF,SignalIndustries.dilithiumCrystalBlock.atlasIndices[0])); + } c.drawProgressBarTextureWithText(tile.progressTicks,tile.progressMaxTicks,options,0); drawFluids(tile,c); c.drawInventory(tile, 0); diff --git a/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/ItemConduitTooltip.java b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/ItemConduitTooltip.java new file mode 100644 index 00000000..16e197d3 --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/api/impl/btwaila/tooltip/ItemConduitTooltip.java @@ -0,0 +1,24 @@ +package sunsetsatellite.signalindustries.api.impl.btwaila.tooltip; + +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.item.ItemStack; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; +import toufoumaster.btwaila.gui.components.AdvancedInfoComponent; +import toufoumaster.btwaila.tooltips.TileTooltip; +import toufoumaster.btwaila.tooltips.Tooltip; + +import java.util.List; +import java.util.stream.Collectors; + +public class ItemConduitTooltip extends TileTooltip { + @Override + public void initTooltip() { + addClass(TileEntityItemConduit.class); + } + + @Override + public void drawAdvancedTooltip(TileEntityItemConduit conduit, AdvancedInfoComponent c) { + ItemStack[] stacks = conduit.getContents().stream().map(TileEntityItemConduit.PipeItem::getStack).toArray(ItemStack[]::new); + c.drawItemList(stacks,0); + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockConduit.java b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockConduit.java index c45e808f..b8017a41 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockConduit.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockConduit.java @@ -45,16 +45,4 @@ public boolean blockActivated(World world, int i, int j, int k, EntityPlayer ent } return false; } - - @Override - public void setBlockBoundsForItemRender() { - float width = 0.35f; - float halfWidth = (1.0F - width) / 2.0F; - setBlockBounds(halfWidth, halfWidth, halfWidth, halfWidth + width, halfWidth + width, halfWidth + width); - } - - @Override - public String getDescription(ItemStack stack) { - return super.getDescription(stack); - } } diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockFluidConduit.java b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockFluidConduit.java index 421912e7..a4eb9696 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockFluidConduit.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockFluidConduit.java @@ -45,16 +45,4 @@ public boolean blockActivated(World world, int i, int j, int k, EntityPlayer ent } return false; } - - @Override - public void setBlockBoundsForItemRender() { - float width = 0.35f; - float halfWidth = (1.0F - width) / 2.0F; - setBlockBounds(halfWidth, halfWidth, halfWidth, halfWidth + width, halfWidth + width, halfWidth + width); - } - - @Override - public String getDescription(ItemStack stack) { - return super.getDescription(stack); - } } diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockInserter.java b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockInserter.java new file mode 100644 index 00000000..8818e09a --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockInserter.java @@ -0,0 +1,47 @@ +package sunsetsatellite.signalindustries.blocks; + +import net.minecraft.core.block.BlockTileEntityRotatable; +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.block.material.Material; +import net.minecraft.core.entity.EntityLiving; +import net.minecraft.core.util.helper.Side; +import net.minecraft.core.util.helper.Sides; +import net.minecraft.core.world.World; +import sunsetsatellite.catalyst.core.util.Direction; +import sunsetsatellite.signalindustries.SignalIndustries; +import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; +import sunsetsatellite.signalindustries.inventories.TileEntityInserter; +import sunsetsatellite.signalindustries.util.Tier; + +public class BlockInserter extends BlockContainerTiered { + + public BlockInserter(String key, int i, Tier tier, Material material) { + super(key, i, tier, material); + withTags(SignalIndustries.ITEM_CONDUITS_CONNECT); + } + + @Override + public int getBlockTextureFromSideAndMetadata(Side side, int meta) { + + if(SignalIndustries.textures == null) return this.atlasIndices[side.getId()]; + int index; + int[] orientationLookUpVertical = new int[]{1, 0, 2, 3, 4, 5, /**/ 0, 1, 2, 3, 4, 5}; + if(meta == 0 || meta == 1){ + index = orientationLookUpVertical[6 * meta + side.getId()]; + return SignalIndustries.textures.get(tier.name()+".inserter.vertical").getTexture(Side.getSideById(index)); + } else { + index = Sides.orientationLookUpHorizontal[6 * meta + side.getId()]; + } + return this.atlasIndices[index]; + } + + @Override + public void onBlockPlaced(World world, int x, int y, int z, Side side, EntityLiving entity, double sideHeight) { + world.setBlockMetadataWithNotify(x, y, z, entity.getPlacementDirection(side).getOpposite().getId()); + } + + @Override + protected TileEntity getNewBlockEntity() { + return new TileEntityInserter(); + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java new file mode 100644 index 00000000..b14b19bb --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/BlockItemConduit.java @@ -0,0 +1,80 @@ +package sunsetsatellite.signalindustries.blocks; + + +import net.minecraft.client.Minecraft; +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.block.material.Material; +import net.minecraft.core.entity.EntityItem; +import net.minecraft.core.entity.player.EntityPlayer; +import net.minecraft.core.item.ItemStack; +import net.minecraft.core.util.helper.MathHelper; +import net.minecraft.core.world.World; +import sunsetsatellite.catalyst.fluids.impl.tiles.TileEntityFluidPipe; +import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; +import sunsetsatellite.signalindustries.inventories.TileEntityConduit; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; +import sunsetsatellite.signalindustries.util.PipeMode; +import sunsetsatellite.signalindustries.util.Tier; + +import java.util.List; +import java.util.Random; +import java.util.stream.Collectors; + +public class BlockItemConduit extends BlockContainerTiered { + + public BlockItemConduit(String key, int i, Tier tier, Material material) { + super(key, i, tier, material); + } + + protected TileEntity getNewBlockEntity() { + return new TileEntityItemConduit(); + } + + public boolean isSolidRender() { + return false; + } + + @Override + public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer) { + if (entityplayer.isSneaking() && !world.isClientSide) { + TileEntityItemConduit tile = (TileEntityItemConduit) world.getBlockTileEntity(i,j,k); + tile.mode = PipeMode.values()[tile.mode.ordinal()+1 <= PipeMode.values().length-1 ? tile.mode.ordinal()+1 : 0]; + Minecraft.getMinecraft(this).ingameGUI.addChatMessage("Pipe mode changed to: "+tile.mode); + } + return false; + } + + @Override + public void onBlockRemoved(World world, int i, int j, int k, int data) { + TileEntityItemConduit tile = (TileEntityItemConduit) world.getBlockTileEntity(i,j,k); + List stacks = tile.getContents().stream().map(TileEntityItemConduit.PipeItem::getStack).collect(Collectors.toList()); + for (ItemStack itemstack : stacks) { + if (itemstack != null) { + Random random = new Random(); + float f = random.nextFloat() * 0.8F + 0.1F; + float f1 = random.nextFloat() * 0.8F + 0.1F; + float f2 = random.nextFloat() * 0.8F + 0.1F; + + while (itemstack.stackSize > 0) { + int i1 = random.nextInt(21) + 10; + if (i1 > itemstack.stackSize) { + i1 = itemstack.stackSize; + } + + itemstack.stackSize -= i1; + EntityItem entityitem = new EntityItem(world, (float) i + f, (float) j + f1, (float) k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getMetadata())); + float f3 = 0.05F; + entityitem.xd = (float) random.nextGaussian() * f3; + entityitem.yd = (float) random.nextGaussian() * f3 + 0.2F; + entityitem.zd = (float) random.nextGaussian() * f3; + world.entityJoinedWorld(entityitem); + } + } + } + super.onBlockRemoved(world, i, j, k, data); + } + + public boolean renderAsNormalBlock() { + return false; + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockDilithiumBooster.java b/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockDilithiumBooster.java index 5b7ed104..4ea08082 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockDilithiumBooster.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/machines/BlockDilithiumBooster.java @@ -98,7 +98,7 @@ public int getBlockTexture(WorldSource blockAccess, int x, int y, int z, Side si int meta = blockAccess.getBlockMetadata(x,y,z); int index = Sides.orientationLookUpHorizontal[6 * meta + side.getId()]; if(tile.isBurning()){ - return SignalIndustries.textures.get("dilithiumBooster.active").getTexture(Side.getSideById(index)); + return SignalIndustries.textures.get(tier.name()+"booster.active").getTexture(Side.getSideById(index)); } return this.atlasIndices[index]; } @@ -133,7 +133,7 @@ public int getBlockOverbrightTexture(WorldSource blockAccess, int x, int y, int int meta = blockAccess.getBlockMetadata(x, y, z); int index = Sides.orientationLookUpHorizontal[6 * meta + side]; if (tile.isBurning()) { - return SignalIndustries.textures.get("dilithiumBooster.active.overlay").getTexture(Side.getSideById(index)); + return SignalIndustries.textures.get(tier.name()+"booster.active.overlay").getTexture(Side.getSideById(index)); } return -1; } diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/states/ConduitStateInterpreter.java b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ConduitStateInterpreter.java index 2e784262..dbad6d10 100644 --- a/src/main/java/sunsetsatellite/signalindustries/blocks/states/ConduitStateInterpreter.java +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ConduitStateInterpreter.java @@ -16,8 +16,7 @@ public class ConduitStateInterpreter extends MetaStateInterpreter { @Override - public HashMap getStateMap(WorldSource worldSource, int i, int j, int k, Block block, int meta) { - HashMap states = new HashMap<>(); + public HashMap getStateMap(WorldSource worldSource, int i, int j, int k, Block block, int meta) { HashMap states = new HashMap<>(); for (Direction direction : Direction.values()) { boolean show = false; Vec3i offset = new Vec3i(i,j,k).add(direction.getVec()); diff --git a/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java new file mode 100644 index 00000000..493d7840 --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/blocks/states/ItemConduitStateInterpreter.java @@ -0,0 +1,46 @@ +package sunsetsatellite.signalindustries.blocks.states; + +import net.minecraft.core.block.Block; +import net.minecraft.core.block.BlockTileEntity; +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.player.inventory.IInventory; +import net.minecraft.core.world.WorldSource; +import sunsetsatellite.catalyst.core.util.Direction; +import sunsetsatellite.catalyst.core.util.Vec3i; +import sunsetsatellite.catalyst.fluids.api.IFluidInventory; +import sunsetsatellite.signalindustries.SignalIndustries; +import sunsetsatellite.signalindustries.blocks.BlockConduit; +import sunsetsatellite.signalindustries.blocks.BlockFluidConduit; +import useless.dragonfly.model.blockstates.processed.MetaStateInterpreter; + +import java.util.HashMap; + +public class ItemConduitStateInterpreter extends MetaStateInterpreter { + @Override + public HashMap getStateMap(WorldSource worldSource, int i, int j, int k, Block block, int meta) { + HashMap states = new HashMap<>(); + for (Direction direction : Direction.values()) { + boolean show = false; + Vec3i offset = new Vec3i(i,j,k).add(direction.getVec()); + Block neighbouringBlock = worldSource.getBlock(offset.x, offset.y, offset.z); + if(neighbouringBlock != null) { + if(block.getClass().isAssignableFrom(neighbouringBlock.getClass())){ + show = true; + } else { + if(neighbouringBlock instanceof BlockTileEntity){ + TileEntity neighbouringTile = worldSource.getBlockTileEntity(offset.x, offset.y, offset.z); + if(neighbouringTile instanceof IInventory){ + show = true; + } else if (neighbouringBlock.hasTag(SignalIndustries.ITEM_CONDUITS_CONNECT)) { + show = true; + } + } else if (neighbouringBlock.hasTag(SignalIndustries.ITEM_CONDUITS_CONNECT)) { + show = true; + } + } + } + states.put(direction.getName().toLowerCase(), String.valueOf(show)); + } + return states; + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiAlloySmelter.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiAlloySmelter.java index bbee3529..7a554224 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiAlloySmelter.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiAlloySmelter.java @@ -96,7 +96,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); - + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiAutoMiner.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiAutoMiner.java index 9294e9c6..c4b1ad50 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiAutoMiner.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiAutoMiner.java @@ -105,7 +105,7 @@ protected void drawGuiContainerForegroundLayer() fontRenderer.drawStringWithShadow("X: "+(tile.current.x-tile.x),38,20,0xFFFF0000); fontRenderer.drawStringWithShadow("Y: "+(tile.current.y-tile.y),38,32,0xFF4080FF); fontRenderer.drawStringWithShadow("Z: "+(tile.current.z-tile.z),38,44,0xFF00FF00); - fontRenderer.drawStringWithShadow("S: "+(tile.progressMaxTicks/tile.speedMultiplier)+"t",80,44,0xFFFF8000); + fontRenderer.drawStringWithShadow("S: "+((int)(tile.progressMaxTicks/tile.speedMultiplier))+"t",80,44,0xFFFF8000); fontRenderer.drawStringWithShadow("C: "+(tile.cost),80,32,0xFF800000); //fontRenderer.drawString(String.format("X: %d Y: %d Z: %d",tile.current.x,tile.current.y,tile.current.z),38,20,0xFFFFFFFF); } diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiBooster.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiBooster.java index f2efd66a..bf512867 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiBooster.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiBooster.java @@ -16,18 +16,21 @@ import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; import sunsetsatellite.signalindustries.containers.ContainerBooster; import sunsetsatellite.signalindustries.inventories.machines.TileEntityBooster; +import sunsetsatellite.signalindustries.util.Tier; + +import java.util.Objects; public class GuiBooster extends GuiFluid { - public String name = "Dilithium Booster"; + public String name; public EntityPlayer entityplayer; public TileEntityBooster tile; - public GuiBooster(InventoryPlayer inventoryPlayer, TileEntity tile) { super(new ContainerBooster(inventoryPlayer, (TileEntityFluidItemContainer) tile),inventoryPlayer); this.tile = (TileEntityBooster) tile; this.entityplayer = inventoryPlayer.player; + name = ((TileEntityBooster) tile).tier == Tier.REINFORCED || ((TileEntityBooster) tile).tier == Tier.AWAKENED ? "Dilithium Booster" : "Redstone Booster"; } @Override @@ -71,7 +74,21 @@ public void mouseClicked(int x, int y, int button) { @Override protected void drawGuiContainerBackgroundLayer(float f1) { - int i2 = this.mc.renderEngine.getTexture("/assets/signalindustries/gui/dilithium_booster.png"); + int i2; + switch (tile.tier) { + case BASIC: + i2 = this.mc.renderEngine.getTexture("/assets/signalindustries/gui/redstone_booster.png"); + break; + case REINFORCED: + i2 = this.mc.renderEngine.getTexture("/assets/signalindustries/gui/dilithium_booster.png"); + break; + case AWAKENED: + i2 = this.mc.renderEngine.getTexture("/assets/signalindustries/gui/awakened_booster.png"); + break; + default: + i2 = this.mc.renderEngine.getTexture("/assets/signalindustries/gui/dilithium_booster.png"); + break; + } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(i2); int i3 = (this.width - this.xSize) / 2; diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrusher.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrusher.java index be5856d0..695bc2d6 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrusher.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrusher.java @@ -96,6 +96,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalChamber.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalChamber.java index e766b38d..3cf09bce 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalChamber.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalChamber.java @@ -96,7 +96,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); - + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalCutter.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalCutter.java index d1d9b298..92901ad8 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalCutter.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiCrystalCutter.java @@ -109,8 +109,8 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); - if(this.tile.speedMultiplier > tile.tier.ordinal()+1){ - this.drawStringCentered(fontRenderer, "2x",i3 + xSize - 16,i4 + ySize/2 - 16,0xFFFF00FF); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - (xSize - 20),i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); } } diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiEnergyInjector.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiEnergyInjector.java index 3a70bd1a..cca1cae0 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiEnergyInjector.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiEnergyInjector.java @@ -89,9 +89,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { if(tile.isBurning()){ this.drawTexturedModalRect(i3 + 80, i4 + 36, 176, 0, 14, 12 + 2); } - - - + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiExtractor.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiExtractor.java index 48628fb4..20cae9cd 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiExtractor.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiExtractor.java @@ -96,8 +96,8 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); - if(this.tile.speedMultiplier > tile.tier.ordinal()+1){ - this.drawStringCentered(fontRenderer, "2x",i3 + xSize - 16,i4 + ySize/2 - 16,0xFFFF00FF); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); } } diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiInfuser.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiInfuser.java index ce3a5011..3c3b8be3 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiInfuser.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiInfuser.java @@ -85,6 +85,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 35, 176, 14, i5 + 1, 18); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiPlateFormer.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiPlateFormer.java index 91c14bcb..385b92fb 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiPlateFormer.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiPlateFormer.java @@ -98,6 +98,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(24); this.drawTexturedModalRect(i3 + 79, i4 + 34, 176, 14, i5 + 1, 16); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiProgrammer.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiProgrammer.java index 124ce8ed..7742da09 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiProgrammer.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiProgrammer.java @@ -85,6 +85,9 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = Math.min(this.tile.getProgressScaled(54),54); this.drawTexturedModalRect(i3 + 61, i4 + 31, 176, 14, i5 + 1, 18); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } protected void drawGuiContainerForegroundLayer() diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiPump.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiPump.java index 0b019499..a09a6265 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiPump.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiPump.java @@ -96,8 +96,8 @@ protected void drawGuiContainerBackgroundLayer(float f1) { i5 = this.tile.getProgressScaled(15); this.drawTexturedModalRect(i3 + 82, i4 + 35 + 15 - i5, 176, 29 - i5, 12, i5 + 2); - if(this.tile.speedMultiplier > tile.tier.ordinal()+1){ - this.drawStringCentered(fontRenderer, "2x",i3 + xSize - 16,i4 + ySize/2 - 16,0xFFFF00FF); + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",i3 + xSize - 16,i4 + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); } } diff --git a/src/main/java/sunsetsatellite/signalindustries/gui/GuiSignalumDynamo.java b/src/main/java/sunsetsatellite/signalindustries/gui/GuiSignalumDynamo.java index c30409b5..5984a531 100644 --- a/src/main/java/sunsetsatellite/signalindustries/gui/GuiSignalumDynamo.java +++ b/src/main/java/sunsetsatellite/signalindustries/gui/GuiSignalumDynamo.java @@ -62,6 +62,9 @@ protected void drawGuiContainerBackgroundLayer(float f) i5 = this.tile.getBurnTimeRemainingScaled(12); this.drawTexturedModalRect(j + 9, k + 39 + 12 - i5, 176, 12 - i5, 14, i5 + 2); } + if(this.tile.speedMultiplier > 1){ + this.drawStringCentered(fontRenderer, this.tile.speedMultiplier+"x",j + xSize - 16,k + ySize/2 - 16,tile.speedMultiplier >= 3 ? 0xFFFFA500 : (tile.speedMultiplier >= 2 ? 0xFFFF00FF : 0xFFFF8080)); + } } @Override diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityInserter.java b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityInserter.java new file mode 100644 index 00000000..523b839c --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityInserter.java @@ -0,0 +1,122 @@ +package sunsetsatellite.signalindustries.inventories; + +import net.minecraft.client.entity.fx.EntityDiggingFX; +import net.minecraft.core.block.Block; +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.entity.EntityItem; +import net.minecraft.core.item.IItemConvertible; +import net.minecraft.core.item.ItemStack; +import net.minecraft.core.player.inventory.IInventory; +import net.minecraft.core.util.phys.AABB; +import sunsetsatellite.catalyst.core.util.Direction; +import sunsetsatellite.catalyst.core.util.TickTimer; +import sunsetsatellite.signalindustries.SignalIndustries; +import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; +import sunsetsatellite.signalindustries.interfaces.IBoostable; +import sunsetsatellite.signalindustries.inventories.machines.TileEntityBooster; +import sunsetsatellite.signalindustries.util.Tier; + +import java.util.List; +import java.util.stream.Collectors; + +public class TileEntityInserter extends TileEntity implements IBoostable { + + public static final int MAX_WORK_TICKS = 60; + public TickTimer workTimer = new TickTimer(this,this::work,MAX_WORK_TICKS,true); + public Direction input = Direction.Z_NEG; + public Direction output = Direction.Z_POS; + public float speedMultiplier = 1; + private Tier tier = Tier.PROTOTYPE; + + @Override + public void tick() { + super.tick(); + workTimer.tick(); + workTimer.max = (int) (MAX_WORK_TICKS / speedMultiplier + (tier.ordinal()+1)); + input = Direction.getDirectionFromSide(worldObj.getBlockMetadata(x,y,z)); + output = input.getOpposite(); + BlockContainerTiered block = (BlockContainerTiered) getBlockType(); + if(block != null){ + tier = block.getTier(); + applyModifiers(); + } + } + + public void applyModifiers(){ + speedMultiplier = 1; + for(Direction dir : Direction.values()) { + TileEntity tile = dir.getTileEntity(worldObj, this); + if (tile instanceof TileEntityBooster) { + if (((TileEntityBooster) tile).isBurning()) { + int meta = tile.getMovedData(); + if (Direction.getDirectionFromSide(meta).getOpposite() == dir) { + if(((TileEntityBooster) tile).tier == Tier.BASIC){ + speedMultiplier = 1.5f; + } else if(((TileEntityBooster) tile).tier == Tier.REINFORCED) { + speedMultiplier = 2; + } else if (((TileEntityBooster) tile).tier == Tier.AWAKENED) { + speedMultiplier = 3; + } + } + } + } + } + } + + public void work(){ + TileEntity inv = input.getTileEntity(worldObj,this); + TileEntity pipe = output.getTileEntity(worldObj,this); + AABB aabb = getBlockType().getSelectedBoundingBoxFromPool(worldObj,x,y,z).expand(input.getVecF().x,input.getVecF().y,input.getVecF().z); + List items = worldObj.getEntitiesWithinAABB(EntityItem.class,aabb).stream().map((E)->((EntityItem)E)).collect(Collectors.toList()); + if(pipe instanceof TileEntityItemConduit && inv instanceof IInventory){ + int slot = -1; + for (int i = 0; i < ((IInventory) inv).getSizeInventory(); i++) { + ItemStack stack = ((IInventory) inv).getStackInSlot(i); + if(stack == null){ + continue; + } + slot = i; + } + if(slot == -1){ + return; + } + ItemStack stack = ((IInventory) inv).getStackInSlot(slot); + ItemStack split; + int maxSplit = (int) Math.min(64,(4 * speedMultiplier) * (tier.ordinal()+1)); + if(stack.stackSize >= maxSplit){ + split = stack.splitStack(maxSplit); + } else { + split = stack.splitStack(stack.stackSize); + } + boolean success = ((TileEntityItemConduit) pipe).addItem(split,output.getOpposite()); + if(!success){ + stack.stackSize += split.stackSize; + } + } else if (pipe instanceof TileEntityItemConduit && !items.isEmpty()) { + EntityItem item = items.get(0); + ItemStack split; + int maxSplit = (int) Math.min(64,(4 * speedMultiplier) * (tier.ordinal()+1)); + if(item.item.stackSize >= maxSplit){ + split = item.item.splitStack(maxSplit); + } else { + split = item.item.splitStack(item.item.stackSize); + } + boolean success = ((TileEntityItemConduit) pipe).addItem(split,output.getOpposite()); + if(!success){ + item.item.stackSize += split.stackSize; + } else { + if(item.item.itemID < 16384){ + for (int i = 0; i < 4; i++) { + SignalIndustries.spawnParticle(new EntityDiggingFX(worldObj, item.x, item.y, item.z, 0,0,0, Block.getBlock(item.item.itemID),0,0)); + } + } else { + for (int i = 0; i < 4; i++) { + SignalIndustries.spawnParticle(new EntityDiggingFX(worldObj, item.x, item.y, item.z, 0,0,0, getBlockType(),0,0)); + } + } + } + } + } + + +} diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java new file mode 100644 index 00000000..6af1736d --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/TileEntityItemConduit.java @@ -0,0 +1,403 @@ +package sunsetsatellite.signalindustries.inventories; + +import com.mojang.nbt.CompoundTag; +import com.mojang.nbt.Tag; +import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.entity.EntityItem; +import net.minecraft.core.item.ItemStack; +import net.minecraft.core.player.inventory.IInventory; +import sunsetsatellite.catalyst.core.util.*; +import sunsetsatellite.signalindustries.util.PipeMode; + +import java.util.*; +import java.util.stream.Collectors; + +//TODO: extract + split +//TODO: Have pipes try to insert items multiple times (until all directions are invalid) +//TODO: more modes + +public class TileEntityItemConduit extends TileEntity { + + public static final int TRANSFER_TICKS = 20*3; + public static final int EXTRACT_TICKS = 20*2; + private final TickTimer extractTimer = new TickTimer(this, this::extractItem, EXTRACT_TICKS, true); + private final List contents = new ArrayList<>(); + public PipeMode mode = PipeMode.RANDOM; + private final Random random = new Random(); + + public List getContents() { + return contents; + } + + //returns true if successful, false otherwise + public boolean addItem(ItemStack stack, Direction entry){ + HashMap surroundings = getSurroundings(); + List> exitList = surroundings.entrySet().stream().filter((E) -> E.getKey() != entry).collect(Collectors.toList()); + if(exitList.isEmpty()){ + return false; + } + Direction exit = null; + //select the exit direction based on mode + if(mode == PipeMode.RANDOM){ + exit = pickRandomExitDirection(exitList); + } else if (mode == PipeMode.SPLIT) { + //split stack into multiple pipe items going into every possible direction + List exits = exitList.stream().filter((E)->surroundings.get(E.getKey()) instanceof IItemIO || surroundings.get(E.getKey()) instanceof IInventory || surroundings.get(E.getKey()) instanceof TileEntityItemConduit).map(Map.Entry::getKey).collect(Collectors.toList()); + if(exits.isEmpty()) return false; + //if stack size is divisible by the exit size + if(stack.stackSize % exits.size() == 0){ + int split = stack.stackSize / exits.size(); + for (Direction dir : exits) { + if(split > 0){ + contents.add(new PipeItem(new ItemStack(stack.itemID,split,stack.getMetadata()),entry,dir)); + } + } + } else { + //if not + int split = stack.stackSize / exits.size(); + int remaider = stack.stackSize % exits.size(); + for (Direction dir : exits) { + if(split+remaider > 0){ + contents.add(new PipeItem(new ItemStack(stack.itemID,split+remaider,stack.getMetadata()),entry,dir)); + remaider = 0; + } + } + } + return true; + } + if(exit == null){ + return false; + } + //check if exit tile exists and is correct + TileEntity exitTile = surroundings.get(exit); + if (!(exitTile instanceof IItemIO) && !(exitTile instanceof IInventory) && !(exitTile instanceof TileEntityItemConduit)) { + return false; + } + //add item to conduit + PipeItem pipeItem = new PipeItem(stack, entry, exit); + contents.add(pipeItem); + return true; + } + + private void dropItem(PipeItem item, Iterator iter){ + if(contents.contains(item)){ + Vec3f dirVec = item.exit.getVecF().divide(2); + Vec3f offset = new Vec3f(x,y,z).add(dirVec).add(0.5); + EntityItem entityitem = new EntityItem(worldObj, (float) offset.x, (float) offset.y, (float) offset.z, item.stack); + float multiplier = 0.05F; + entityitem.xd = dirVec.x * multiplier; + entityitem.yd = dirVec.y * multiplier; + entityitem.zd = dirVec.z * multiplier; + worldObj.entityJoinedWorld(entityitem); + iter.remove(); + } + } + + public void extractItem(){ + //get surroundings blocks, filter out item conduits + HashMap surroundings = getSurroundings(); + List> entryList = surroundings.entrySet().stream().filter((E) -> !(E.getValue() instanceof TileEntityItemConduit)).collect(Collectors.toList()); + if(entryList.isEmpty()){ + return; + } + Direction entry = null; + //select the entry direction based on mode + if(mode == PipeMode.RANDOM){ + entry = entryList.get(random.nextInt(entryList.size())).getKey(); + } + if(entry == null){ + return; + } + //conduits can only extract from tiles that implement IItemIO for now + TileEntity entryTile = surroundings.get(entry); + if(entryTile instanceof IItemIO && entryTile instanceof IInventory){ + IItemIO io = ((IItemIO) entryTile); + IInventory inv = ((IInventory) entryTile); + //connection check + if(io.getItemIOForSide(entry.getOpposite()) == Connection.OUTPUT || io.getItemIOForSide(entry.getOpposite()) == Connection.BOTH){ + int slot = io.getActiveItemSlotForSide(entry.getOpposite()); + if(inv.getStackInSlot(slot) != null){ + ItemStack stack = inv.getStackInSlot(slot); + if(stack.stackSize >= 8){ + stack = stack.splitStack(8); + } else { + stack = stack.splitStack(stack.stackSize); + } + Direction finalEntry = entry; + //filter out the entry direction + List> exitList = surroundings.entrySet().stream().filter((E) -> E.getKey() != finalEntry).collect(Collectors.toList()); + if(exitList.isEmpty()){ + return; + } + Direction exit = null; + //select the exit direction based on mode + if(mode == PipeMode.RANDOM){ + exit = pickRandomExitDirection(exitList); + } else if (mode == PipeMode.SPLIT) { + //split stack into multiple pipe items going into every possible direction + List exits = exitList.stream().filter((E)->surroundings.get(E.getKey()) instanceof IItemIO || surroundings.get(E.getKey()) instanceof IInventory || surroundings.get(E.getKey()) instanceof TileEntityItemConduit).map(Map.Entry::getKey).collect(Collectors.toList()); + if(exits.isEmpty()) return; + //if stack size is divisible by the exit size + if(stack.stackSize % exits.size() == 0){ + int split = stack.stackSize / exits.size(); + for (Direction dir : exits) { + if(split > 0){ + contents.add(new PipeItem(new ItemStack(stack.itemID,split,stack.getMetadata()),entry,dir)); + } + } + } else { + //if not + int split = stack.stackSize / exits.size(); + int remaider = stack.stackSize % exits.size(); + for (Direction dir : exits) { + if(split+remaider > 0){ + contents.add(new PipeItem(new ItemStack(stack.itemID,split+remaider,stack.getMetadata()),entry,dir)); + remaider = 0; + } + } + } + return; + } + if(exit == null){ + return; + } + //check if exit tile exists and is correct + TileEntity exitTile = surroundings.get(exit); + if (!(exitTile instanceof IItemIO) && !(exitTile instanceof IInventory) && !(exitTile instanceof TileEntityItemConduit)) { + return; + } + //add item to conduit + PipeItem pipeItem = new PipeItem(stack, entry, exit); + contents.add(pipeItem); + if(inv.getStackInSlot(slot).stackSize <= 0){ + inv.setInventorySlotContents(slot,null); + } + } + } + } + } + + private void acceptItem(Direction entry, PipeItem item, TileEntityItemConduit conduit){ + //get surroundings and keep only surrounding pipes + HashMap surroundings = getSurroundings(); + List> entryList = surroundings.entrySet().stream().filter((E) -> E.getValue() instanceof TileEntityItemConduit).collect(Collectors.toList()); + List directions = entryList.stream().map(Map.Entry::getKey).collect(Collectors.toList()); + //validate entry direction + if(directions.contains(entry)){ + //filter out the entry direction and select exit direction based on mode + List> exitList = surroundings.entrySet().stream().filter((E) -> E.getKey() != entry).collect(Collectors.toList()); + if(exitList.isEmpty()){ + return; + } + Direction exit = null; + if(mode == PipeMode.RANDOM){ + exit = pickRandomExitDirection(exitList); + } else if (mode == PipeMode.SPLIT) { + //split stack into multiple pipe items going into every possible direction + List exits = exitList.stream().filter((E)->surroundings.get(E.getKey()) instanceof IItemIO || surroundings.get(E.getKey()) instanceof IInventory || surroundings.get(E.getKey()) instanceof TileEntityItemConduit).map(Map.Entry::getKey).collect(Collectors.toList()); + if(exits.isEmpty()) return; + //if stack size is divisible by the exit size + if(item.stack.stackSize % exits.size() == 0){ + int split = item.stack.stackSize / exits.size(); + conduit.contents.remove(item); + for (Direction dir : exits) { + if(split > 0){ + contents.add(new PipeItem(new ItemStack(item.stack.itemID,split,item.stack.getMetadata()),entry,dir)); + } + } + } else { + //if not + int split = item.stack.stackSize / exits.size(); + int remaider = item.stack.stackSize % exits.size(); + conduit.contents.remove(item); + for (Direction dir : exits) { + if(split+remaider > 0){ + contents.add(new PipeItem(new ItemStack(item.stack.itemID,split+remaider,item.stack.getMetadata()),entry,dir)); + remaider = 0; + } + } + } + return; + } + if(exit == null){ + return; + } + //validate exit tile and transfer item + TileEntity exitTile = surroundings.get(exit); + if (!(exitTile instanceof IItemIO) && !(exitTile instanceof IInventory) && !(exitTile instanceof TileEntityItemConduit)) { + return; + } + conduit.contents.remove(item); + contents.add(new PipeItem(item.stack,entry,exit)); + } + } + + private Direction pickRandomExitDirection(List> exitList){ + for (Map.Entry exitEntry : exitList) { + if(exitEntry.getValue() instanceof IItemIO || exitEntry.getValue() instanceof IInventory){ + return exitEntry.getKey(); + } + } + return exitList.get(random.nextInt(exitList.size())).getKey(); + } + + @Override + public void tick() { + super.tick(); + extractTimer.tick(); + contents.removeIf((P)->P.stack == null); + final Iterator iter = contents.iterator(); + while(iter.hasNext()){ + PipeItem next = iter.next(); + if(next.insertTimer.isPaused()){ + dropItem(next,iter); + } + } + for (PipeItem pipeItem : contents.toArray(new PipeItem[0])) { + pipeItem.insertTimer.tick(); + } + } + + public HashMap getSurroundings(){ + HashMap surroundings = new HashMap<>(); + for (Direction dir : Direction.values()) { + TileEntity tile = dir.getTileEntity(worldObj,this); + if(tile != null){ + if(tile instanceof IInventory || tile instanceof TileEntityItemConduit){ + surroundings.put(dir,tile); + } + } + } + return surroundings; + } + + @Override + public void readFromNBT(CompoundTag nbttagcompound) { + super.readFromNBT(nbttagcompound); + CompoundTag items = nbttagcompound.getCompound("Items"); + for (Tag value : items.getValues()) { + if(value instanceof CompoundTag){ + CompoundTag itemNbt = (CompoundTag) value; + PipeItem item = new PipeItem(itemNbt); + contents.add(item); + } + } + } + + @Override + public void writeToNBT(CompoundTag nbttagcompound) { + super.writeToNBT(nbttagcompound); + CompoundTag items = new CompoundTag(); + for (int i = 0; i < contents.size(); i++) { + CompoundTag itemNbt = new CompoundTag(); + PipeItem item = contents.get(i); + item.writeToNBT(itemNbt); + items.put(String.valueOf(i),itemNbt); + } + nbttagcompound.put("Items",items); + } + + + /////// + + + public class PipeItem { + private final ItemStack stack; + private final Direction entry; + private final Direction exit; + private final TickTimer insertTimer = new TickTimer(this, this::insertItem, TRANSFER_TICKS, false); + + public ItemStack getStack() { + return stack; + } + + public Direction getEntry() { + return entry; + } + + public Direction getExit() { + return exit; + } + + public int getTicks() { + return insertTimer.value; + } + + public PipeItem(ItemStack stack, Direction entry, Direction exit) { + this.stack = stack; + this.entry = entry; + this.exit = exit; + } + + public PipeItem(CompoundTag tag){ + this.stack = ItemStack.readItemStackFromNbt(tag.getCompound("stack")); + this.entry = Direction.getDirectionFromSide(tag.getInteger("entry")); + this.exit = Direction.getDirectionFromSide(tag.getInteger("exit")); + insertTimer.value = tag.getInteger("ticks"); + } + + public void writeToNBT(CompoundTag compoundTag) { + CompoundTag stackNbt = new CompoundTag(); + stack.writeToNBT(stackNbt); + compoundTag.putInt("entry",entry.getSide()); + compoundTag.putInt("exit",exit.getSide()); + compoundTag.putInt("ticks", insertTimer.value); + } + + public void insertItem(){ + TileEntity tileEntity = exit.getTileEntity(worldObj, TileEntityItemConduit.this); + Direction entry = exit.getOpposite(); + if (tileEntity instanceof IItemIO && tileEntity instanceof IInventory) { + IItemIO io = ((IItemIO) tileEntity); + IInventory inv = ((IInventory) tileEntity); + if(io.getItemIOForSide(entry) == Connection.INPUT || io.getItemIOForSide(entry) == Connection.BOTH){ + int slot = io.getActiveItemSlotForSide(entry); + ItemStack tileStack = inv.getStackInSlot(slot); + if(tileStack == null || (tileStack.isItemEqual(stack) && tileStack.stackSize+stack.stackSize <= tileStack.getMaxStackSize())){ + if(tileStack == null){ + inv.setInventorySlotContents(slot,stack); + } else { + tileStack.stackSize += stack.stackSize; + } + contents.remove(this); + } else if (tileStack.isItemEqual(stack)) { + int remainder = Math.min(tileStack.getMaxStackSize() - tileStack.stackSize, stack.stackSize); + if(remainder <= 0){ + return; + } + stack.stackSize -= remainder; + tileStack.stackSize += remainder; + } + } + } else if (!(tileEntity instanceof IItemIO) && tileEntity instanceof IInventory){ + IInventory inv = ((IInventory) tileEntity); + int slot = 0; + while (stack.stackSize > 0){ + if(slot >= inv.getSizeInventory()){ + break; + } + ItemStack tileStack = inv.getStackInSlot(slot); + if(tileStack == null) { + inv.setInventorySlotContents(slot,stack); + contents.remove(this); + break; + } else if(tileStack.isItemEqual(stack)){ + int remainder = Math.min(tileStack.getMaxStackSize() - tileStack.stackSize, stack.stackSize); + if(remainder <= 0){ + slot++; + continue; + } + stack.stackSize -= remainder; + tileStack.stackSize += remainder; + } + slot++; + } + if(stack.stackSize <= 0){ + contents.remove(this); + } + } else if(tileEntity instanceof TileEntityItemConduit) { + ((TileEntityItemConduit) tileEntity).acceptItem(entry,this,TileEntityItemConduit.this); + } + } + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineBase.java b/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineBase.java index 8dcea41d..c4c5fc8c 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineBase.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineBase.java @@ -12,6 +12,7 @@ import sunsetsatellite.signalindustries.interfaces.IHasIOPreview; import sunsetsatellite.signalindustries.inventories.machines.TileEntityBooster; import sunsetsatellite.signalindustries.util.IOPreview; +import sunsetsatellite.signalindustries.util.Tier; public class TileEntityTieredMachineBase extends TileEntityTieredContainer implements IFluidIO, IItemIO, IHasIOPreview { @@ -19,7 +20,8 @@ public class TileEntityTieredMachineBase extends TileEntityTieredContainer imple public int fuelMaxBurnTicks = 0; public int progressTicks = 0; public int progressMaxTicks = 200; - public int speedMultiplier = 1; + public float speedMultiplier = 1; + public float yield = 1; public IOPreview preview = IOPreview.NONE; public boolean isBurning(){ @@ -36,13 +38,24 @@ public void tick() { } public void applyModifiers(){ + speedMultiplier = 1; + yield = 1; for(Direction dir : Direction.values()) { TileEntity tile = dir.getTileEntity(worldObj, this); if (tile instanceof TileEntityBooster && this instanceof IBoostable) { if (((TileEntityBooster) tile).isBurning()) { int meta = tile.getMovedData(); if (Direction.getDirectionFromSide(meta).getOpposite() == dir) { - speedMultiplier = 2; + if(((TileEntityBooster) tile).tier == Tier.BASIC){ + speedMultiplier = 1.5f; + yield = 1.05f; + } else if(((TileEntityBooster) tile).tier == Tier.REINFORCED) { + speedMultiplier = 2; + yield = 1.25f; + } else if (((TileEntityBooster) tile).tier == Tier.AWAKENED) { + speedMultiplier = 3; + yield = 2f; + } } } } diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineSimple.java b/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineSimple.java index bcc81724..93bacbd6 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineSimple.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/base/TileEntityTieredMachineSimple.java @@ -1,15 +1,11 @@ package sunsetsatellite.signalindustries.inventories.base; -import net.minecraft.core.block.entity.TileEntity; import net.minecraft.core.item.ItemStack; -import sunsetsatellite.catalyst.core.util.Direction; import sunsetsatellite.catalyst.core.util.IFluidIO; import sunsetsatellite.catalyst.core.util.IItemIO; import sunsetsatellite.catalyst.fluids.util.FluidStack; import sunsetsatellite.signalindustries.SignalIndustries; import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; -import sunsetsatellite.signalindustries.interfaces.IBoostable; -import sunsetsatellite.signalindustries.inventories.machines.TileEntityBooster; import sunsetsatellite.signalindustries.recipes.RecipeGroupSI; import sunsetsatellite.signalindustries.recipes.entry.RecipeEntryMachine; import sunsetsatellite.signalindustries.recipes.entry.RecipeEntryMachineFluid; @@ -53,7 +49,7 @@ public void work(){ if(areAllInputsNull()){ progressTicks = 0; } else if(canProcess()) { - progressMaxTicks = currentRecipe.getData().ticks / speedMultiplier; + progressMaxTicks = (int) (currentRecipe.getData().ticks / speedMultiplier); } if(!worldObj.isClientSide){ if (progressTicks == 0 && canProcess()){ @@ -89,7 +85,7 @@ public boolean fuel(){ int burn = SignalIndustries.getEnergyBurnTime(fluidContents[energySlot]); if(burn > 0 && canProcess() && currentRecipe != null){ if(fluidContents[energySlot].amount >= currentRecipe.getData().cost){ - progressMaxTicks = currentRecipe.getData().ticks / speedMultiplier; + progressMaxTicks = (int) (currentRecipe.getData().ticks / speedMultiplier); fuelMaxBurnTicks = fuelBurnTicks = burn; fluidContents[energySlot].amount -= currentRecipe.getData().cost; if (fluidContents[energySlot].amount == 0) { @@ -109,10 +105,17 @@ public void processItem(){ if (stack != null) { consumeInputs(); if(random.nextFloat() <= recipe.getData().chance){ + int multiplier = 1; + float fraction = Float.parseFloat("0."+(String.valueOf(yield).split("\\.")[1])); + if(fraction <= 0) fraction = 1; + if(yield > 1 && random.nextFloat() <= fraction){ + multiplier = (int) Math.ceil(yield); + } if (itemContents[itemOutputs[0]] == null) { + stack.stackSize *= multiplier; setInventorySlotContents(itemOutputs[0], stack); } else if (itemContents[itemOutputs[0]].isItemEqual(stack)) { - itemContents[itemOutputs[0]].stackSize += stack.stackSize; + itemContents[itemOutputs[0]].stackSize += (stack.stackSize * multiplier); } } } @@ -122,10 +125,17 @@ public void processItem(){ if (fluidStack != null) { consumeInputs(); if(random.nextFloat() <= recipe.getData().chance) { + int multiplier = 1; + float fraction = Float.parseFloat("0."+(String.valueOf(yield).split("\\.")[1])); + if(fraction <= 0) fraction = 1; + if(yield > 1 && random.nextFloat() <= fraction){ + multiplier = (int) Math.ceil(yield); + } if (fluidContents[fluidOutputs[0]] == null) { + fluidStack.amount *= multiplier; setFluidInSlot(fluidOutputs[0], fluidStack); } else if (fluidContents[fluidOutputs[0]].isFluidEqual(fluidStack)) { - fluidContents[fluidOutputs[0]].amount += fluidStack.amount; + fluidContents[fluidOutputs[0]].amount += (fluidStack.amount * multiplier); } } } @@ -225,8 +235,16 @@ public boolean areItemOutputsValid(ItemStack stack){ ItemStack outputStack = getStackInSlot(itemOutput); if (outputStack != null) { if (outputStack.isItemEqual(stack)) { - if ((outputStack.stackSize >= getInventoryStackLimit() || outputStack.stackSize >= outputStack.getMaxStackSize()) && outputStack.stackSize >= stack.getMaxStackSize()) { - return false; + if(yield > 1){ + int n = outputStack.stackSize+(stack.stackSize*((int) Math.ceil(yield))); + if ((n > getInventoryStackLimit() || n > outputStack.getMaxStackSize()) && n > stack.getMaxStackSize()) { + return false; + } + } else { + int n = outputStack.stackSize+stack.stackSize; + if ((n > getInventoryStackLimit() || n > outputStack.getMaxStackSize()) && n > stack.getMaxStackSize()) { + return false; + } } } else { return false; @@ -241,8 +259,14 @@ public boolean areFluidOutputsValid(FluidStack stack){ FluidStack outputStack = getFluidInSlot(fluidOutput); if (outputStack != null) { if (outputStack.isFluidEqual(stack)) { - if (stack.amount > getRemainingCapacity(fluidOutput)) { - return false; + if(yield > 1){ + if (stack.amount*Math.ceil(yield) > getRemainingCapacity(fluidOutput)) { + return false; + } + } else { + if (stack.amount > getRemainingCapacity(fluidOutput)) { + return false; + } } return false; } else { diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityAutoMiner.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityAutoMiner.java index 1d64d2dc..d23dc2f0 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityAutoMiner.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityAutoMiner.java @@ -13,6 +13,7 @@ import sunsetsatellite.signalindustries.SignalIndustries; import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; import sunsetsatellite.signalindustries.interfaces.IBoostable; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; import sunsetsatellite.signalindustries.inventories.base.TileEntityTieredMachineBase; @@ -25,9 +26,9 @@ public class TileEntityAutoMiner extends TileEntityTieredMachineBase implements public int cost; public TileEntityAutoMiner(){ progressMaxTicks = 20; - cost = 250; + cost = 50; itemContents = new ItemStack[1]; - fluidCapacity[0] = Short.MAX_VALUE*2; + fluidCapacity[0] = Short.MAX_VALUE/2; acceptedFluids.get(0).add((BlockFluid) SignalIndustries.energyFlowing); from = new Vec3i(0,4,0); to = new Vec3i(-16,-y-4,16); @@ -67,7 +68,7 @@ public void work(){ Direction dir = null; for (Direction direction : Direction.values()) { if(itemConnections.get(direction) == Connection.OUTPUT || itemConnections.get(direction) == Connection.BOTH){ - if(direction.getTileEntity(worldObj,this) instanceof TileEntityChest){ + if(direction.getTileEntity(worldObj,this) instanceof TileEntityChest || direction.getTileEntity(worldObj,this) instanceof TileEntityItemConduit){ dir = direction; } } @@ -103,6 +104,18 @@ public void work(){ worldObj.setBlockWithNotify(current.x,current.y-1,current.z,0); } } + } else if(tile instanceof TileEntityItemConduit) { + if(drops != null){ + for (ItemStack drop : drops) { + if(drop != null){ + boolean success = ((TileEntityItemConduit) tile).addItem(drop,Direction.Y_POS.getOpposite()); + if(!success){ + block.dropBlockWithCause(worldObj, EnumDropCause.PROPER_TOOL,x,y+1,z,meta,this); + } + worldObj.setBlockWithNotify(current.x,current.y-1,current.z,0); + } + } + } } else { block.dropBlockWithCause(worldObj, EnumDropCause.PROPER_TOOL,x,y+1,z,meta,this); worldObj.setBlockWithNotify(current.x,current.y-1,current.z,0); @@ -120,27 +133,28 @@ public void tick() { if(worldObj != null && getBlockType() != null){ tier = ((BlockContainerTiered)getBlockType()).tier; } - speedMultiplier = 1; - cost = 0; - for(Direction dir : Direction.values()){ - TileEntity tile = dir.getTileEntity(worldObj,this); - if(tile instanceof TileEntityBooster){ - if(((TileEntityBooster) tile).isBurning()){ - int meta = tile.getMovedData(); - if(Direction.getDirectionFromSide(meta).getOpposite() == dir){ - speedMultiplier = 2; + if(worldObj != null){ + applyModifiers(); + /* for(Direction dir : Direction.values()){ + TileEntity tile = dir.getTileEntity(worldObj,this); + if(tile instanceof TileEntityBooster){ + if(((TileEntityBooster) tile).isBurning()){ + int meta = tile.getMovedData(); + if(Direction.getDirectionFromSide(meta).getOpposite() == dir){ + speedMultiplier = 2; + } } } + }*/ + extractFluids(); + if(!workTimer.isPaused()){ + workTimer.tick(); } + if(current.equals(new Vec3i())){ + current = new Vec3i(x-1,y+4,z+1); + } + workTimer.max = (int) (progressMaxTicks / speedMultiplier); } - extractFluids(); - if(!workTimer.isPaused()){ - workTimer.tick(); - } - if(current.equals(new Vec3i())){ - current = new Vec3i(x-1,y+4,z+1); - } - workTimer.max = progressMaxTicks / speedMultiplier; } @Override diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityBooster.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityBooster.java index 12ef62eb..87855bcd 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityBooster.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityBooster.java @@ -2,21 +2,26 @@ import com.mojang.nbt.CompoundTag; +import net.minecraft.core.block.Block; import net.minecraft.core.block.BlockFluid; import net.minecraft.core.block.entity.TileEntity; +import net.minecraft.core.item.Item; import net.minecraft.core.item.ItemStack; import sunsetsatellite.catalyst.core.util.Connection; import sunsetsatellite.catalyst.core.util.Direction; +import sunsetsatellite.catalyst.core.util.Vec3f; import sunsetsatellite.catalyst.fluids.impl.tiles.TileEntityFluidItemContainer; import sunsetsatellite.catalyst.fluids.impl.tiles.TileEntityFluidPipe; import sunsetsatellite.catalyst.fluids.util.FluidStack; import sunsetsatellite.signalindustries.SignalIndustries; +import sunsetsatellite.signalindustries.blocks.base.BlockContainerTiered; import sunsetsatellite.signalindustries.entities.fx.EntityColorParticleFX; import sunsetsatellite.signalindustries.interfaces.IBoostable; import sunsetsatellite.signalindustries.interfaces.IHasIOPreview; import sunsetsatellite.signalindustries.recipes.legacy.InfuserRecipes; import sunsetsatellite.signalindustries.recipes.legacy.MachineRecipesBase; import sunsetsatellite.signalindustries.util.IOPreview; +import sunsetsatellite.signalindustries.util.Tier; import java.util.ArrayList; import java.util.HashMap; @@ -32,9 +37,9 @@ public class TileEntityBooster extends TileEntityFluidItemContainer implements I public int efficiency = 1; public int speedMultiplier = 1; public int cost = 160; - public MachineRecipesBase, ItemStack> recipes = InfuserRecipes.instance; public Random random = new Random(); public IOPreview preview = IOPreview.NONE; + public Tier tier = Tier.REINFORCED; public TileEntityBooster(){ fluidContents = new FluidStack[1]; @@ -56,6 +61,11 @@ public String getInvName() { public void tick() { worldObj.markBlocksDirty(x,y,z,x,y,z); extractFluids(); + if(getBlockType() != null){ + BlockContainerTiered block = (BlockContainerTiered) getBlockType(); + tier = block.tier; + + } boolean update = false; if(fuelBurnTicks > 0){ fuelBurnTicks--; @@ -67,12 +77,34 @@ public void tick() { if(isBurning() && canProcess()){ if(progressTicks > 0){ progressTicks--; - SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,x+random.nextFloat(),y+random.nextFloat(),z+random.nextFloat(),0,0,0,1.0f,1.0f,0.0f,1.0f)); - SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,x+random.nextFloat(),y+random.nextFloat(),z+random.nextFloat(),0,0,0,1.0f,1.0f,0.0f,1.0f)); + Vec3f color = new Vec3f(); + if(tier == Tier.BASIC){ + color.x = 1.0f; + } else if (tier == Tier.REINFORCED) { + color.x = 1.0f; + color.z = 1.0f; + } else if (tier == Tier.AWAKENED) { + color.x = 1.0f; + color.y = 165f/255f; + } + SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,x+random.nextFloat(),y+random.nextFloat(),z+random.nextFloat(),0,0,0,1.0f, (float) color.x, (float) color.y, (float) color.z)); + SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,x+random.nextFloat(),y+random.nextFloat(),z+random.nextFloat(),0,0,0,1.0f, (float) color.x, (float) color.y, (float) color.z)); int meta = worldObj.getBlockMetadata(x,y,z); TileEntity tileEntity = Direction.getDirectionFromSide(meta).getTileEntity(worldObj,this); if(tileEntity instanceof IBoostable){ - SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,tileEntity.x+random.nextFloat(),tileEntity.y+random.nextFloat(),tileEntity.z+random.nextFloat(),0,0,0,0.5f,1.0f,0.0f,0.5f)); + if(tier == Tier.BASIC){ + color.x = 1.0f; + color.y = 0.5f; + color.z = 0.5f; + } else if (tier == Tier.REINFORCED) { + color.x = 1.0f; + color.z = 0.5f; + } else if (tier == Tier.AWAKENED) { + color.x = 1.0f; + color.y = 165f/255f; + color.z = 0.5f; + } + SignalIndustries.spawnParticle(new EntityColorParticleFX(worldObj,tileEntity.x+random.nextFloat(),tileEntity.y+random.nextFloat(),tileEntity.z+random.nextFloat(),0,0,0, 1.0f, (float) color.x, (float) color.y, (float) color.z)); } } if(progressTicks <= 0){ @@ -108,7 +140,7 @@ public int getBurnTimeRemainingScaled(int paramInt) { public boolean fuel(){ int burn = SignalIndustries.getEnergyBurnTime(fluidContents[0]); if(burn > 0 && canProcess() && fluidContents[0].amount >= cost){ - progressMaxTicks = 200 * speedMultiplier; + setFuel(); fuelMaxBurnTicks = fuelBurnTicks = burn; fluidContents[0].amount -= cost; if(fluidContents[0].amount == 0) { @@ -121,8 +153,7 @@ public boolean fuel(){ public void processItem(){ if(canProcess() && progressTicks <= 0){ - progressMaxTicks = 200 * speedMultiplier; - progressTicks = progressMaxTicks; + setFuel(); itemContents[0].stackSize -= 1; if(itemContents[0].stackSize <= 0){ itemContents[0] = null; @@ -130,11 +161,36 @@ public void processItem(){ } } + public void setFuel(){ + if(canProcess() && progressTicks <= 0) { + if (tier == Tier.BASIC) { + if (itemContents[0].getItem() == Item.dustRedstone) { + progressMaxTicks = 20 * speedMultiplier; + } else if (itemContents[0].itemID == Block.blockRedstone.id) { + progressMaxTicks = 200 * speedMultiplier; + } + } else { + if (itemContents[0].getItem() == SignalIndustries.dilithiumShard) { + progressMaxTicks = 300 * speedMultiplier; + } else if (itemContents[0].itemID == SignalIndustries.dilithiumBlock.id) { + progressMaxTicks = 3000 * speedMultiplier; + } + + } + progressTicks = progressMaxTicks; + } + } + private boolean canProcess() { if(itemContents[0] == null) { return false; } else { - return itemContents[0].getItem() == SignalIndustries.dilithiumShard && itemContents[0].stackSize > 0; + if(tier == Tier.BASIC){ + return (itemContents[0].getItem() == Item.dustRedstone || itemContents[0].itemID == Block.blockRedstone.id) && itemContents[0].stackSize > 0; + } else { + return (itemContents[0].getItem() == SignalIndustries.dilithiumShard || itemContents[0].itemID == SignalIndustries.dilithiumBlock.id) && itemContents[0].stackSize > 0; + } + } /*if(itemContents[0] == null) { return false; diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityCrystalCutter.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityCrystalCutter.java index c8091b0a..79a3e5ab 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityCrystalCutter.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityCrystalCutter.java @@ -65,6 +65,11 @@ public void processItem() { if(itemContents[itemOutputs[0]].getItem() instanceof ItemSignalumCrystal){ Minecraft.getMinecraft(this).thePlayer.triggerAchievement(SignalIndustriesAchievementPage.SHINING); } + if(itemContents[itemOutputs[0]].getItem() == SignalIndustries.signalumCrystalEmpty){ + if(fluidContents[energySlot].amount <= fluidCapacity[energySlot]+1000){ + fluidContents[energySlot].amount += 1000; + } + } } } diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityDimensionalAnchor.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityDimensionalAnchor.java index 7fb69766..b0d34f84 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityDimensionalAnchor.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityDimensionalAnchor.java @@ -89,7 +89,7 @@ public void tick() { if(itemContents[0] == null){ progressTicks = 0; } else if(canProcess()) { - progressMaxTicks = 6000 / speedMultiplier; + progressMaxTicks = (int) (6000 / speedMultiplier); } if(!worldObj.isClientSide){ if (progressTicks == 0 && canProcess()){ @@ -151,7 +151,7 @@ public void processItem() { public boolean fuel(){ int burn = SignalIndustries.getEnergyBurnTime(fluidContents[0]); if(burn > 0 && canProcess() && fluidContents[0].amount >= cost){ - progressMaxTicks = 6000 / speedMultiplier;//(itemContents[0].getItemData().getInteger("saturation") / speedMultiplier) == 0 ? 200 : (itemContents[0].getItemData().getInteger("saturation") / speedMultiplier); + progressMaxTicks = (int) (6000 / speedMultiplier);//(itemContents[0].getItemData().getInteger("saturation") / speedMultiplier) == 0 ? 200 : (itemContents[0].getItemData().getInteger("saturation") / speedMultiplier); fuelMaxBurnTicks = fuelBurnTicks = burn; fluidContents[0].amount -= cost; if(fluidContents[0].amount == 0) { diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityExtractor.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityExtractor.java index 4cecfc99..afe4a948 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityExtractor.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityExtractor.java @@ -45,7 +45,7 @@ public void tick() { if(itemContents[0] == null){ progressTicks = 0; } else if(canProcess()) { - progressMaxTicks = 200 / speedMultiplier; + progressMaxTicks = (int) (200 / speedMultiplier); } if(!worldObj.isClientSide){ if (progressTicks == 0 && canProcess() && fuelBurnTicks < 2){ @@ -73,7 +73,7 @@ public void tick() { public boolean fuel(){ int burn = getItemBurnTime(itemContents[1]); if(burn > 0 && canProcess()){ - progressMaxTicks = 200 / speedMultiplier; + progressMaxTicks = (int) (200 / speedMultiplier); fuelMaxBurnTicks = fuelBurnTicks = burn; if(itemContents[1].getItem().hasContainerItem()) { itemContents[1] = new ItemStack(itemContents[1].getItem().getContainerItem()); diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityProgrammer.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityProgrammer.java index 5d45e23d..cdcad3f6 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityProgrammer.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityProgrammer.java @@ -39,7 +39,7 @@ public void tick() { if(itemContents[0] == null || itemContents[1] == null){ progressTicks = 0; } else if(canProcess()) { - progressMaxTicks = 1000 / speedMultiplier; + progressMaxTicks = (int) (1000 / speedMultiplier); } if(!worldObj.isClientSide){ if (progressTicks == 0 && canProcess()){ @@ -69,7 +69,7 @@ public void tick() { public boolean fuel(){ int burn = SignalIndustries.getEnergyBurnTime(fluidContents[0]); if(burn > 0 && canProcess() && fluidContents[0].amount >= cost){ - progressMaxTicks = 200 / speedMultiplier; + progressMaxTicks = (int) (200 / speedMultiplier); fuelMaxBurnTicks = fuelBurnTicks = burn; fluidContents[0].amount -= cost; if(fluidContents[0].amount == 0) { diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityPump.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityPump.java index e11c50c8..21c25a52 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityPump.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityPump.java @@ -91,7 +91,7 @@ public void tick() { if (fluidContents[0] == null) { progressTicks = 0; } else if (canProcess()) { - progressMaxTicks = currentRecipe.getData().ticks / speedMultiplier; + progressMaxTicks = (int) (currentRecipe.getData().ticks / speedMultiplier); } if (!worldObj.isClientSide) { if (progressTicks == 0 && canProcess()) { @@ -124,7 +124,7 @@ public void tick() { public boolean fuel(){ int burn = SignalIndustries.getEnergyBurnTime(fluidContents[0]); if(burn > 0 && canProcess() && fluidContents[0].amount >= currentRecipe.getData().cost){ - progressMaxTicks = currentRecipe.getData().ticks / speedMultiplier;//(itemContents[0].getItemData().getInteger("saturation") / speedMultiplier) == 0 ? 200 : (itemContents[0].getItemData().getInteger("saturation") / speedMultiplier); + progressMaxTicks = (int) (currentRecipe.getData().ticks / speedMultiplier);//(itemContents[0].getItemData().getInteger("saturation") / speedMultiplier) == 0 ? 200 : (itemContents[0].getItemData().getInteger("saturation") / speedMultiplier); fuelMaxBurnTicks = fuelBurnTicks = burn; fluidContents[0].amount -= currentRecipe.getData().cost; if(fluidContents[0].amount == 0) { diff --git a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityReinforcedExtractor.java b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityReinforcedExtractor.java index da9a3e47..d8441d0a 100644 --- a/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityReinforcedExtractor.java +++ b/src/main/java/sunsetsatellite/signalindustries/inventories/machines/TileEntityReinforcedExtractor.java @@ -95,7 +95,7 @@ public void work(){ if(inputContents.isEmpty()){ progressTicks = 0; } else if(canProcess()) { - progressMaxTicks = currentRecipe.getData().ticks / speedMultiplier; + progressMaxTicks = (int) (currentRecipe.getData().ticks / speedMultiplier); } if(!worldObj.isClientSide) { if (progressTicks == 0 && canProcess() && fuelBurnTicks < 2) { diff --git a/src/main/java/sunsetsatellite/signalindustries/mixin/EntityPlayerMixin.java b/src/main/java/sunsetsatellite/signalindustries/mixin/EntityPlayerMixin.java index ac766455..f9cb0911 100644 --- a/src/main/java/sunsetsatellite/signalindustries/mixin/EntityPlayerMixin.java +++ b/src/main/java/sunsetsatellite/signalindustries/mixin/EntityPlayerMixin.java @@ -2,8 +2,6 @@ import com.mojang.nbt.CompoundTag; -import net.minecraft.client.Minecraft; -import net.minecraft.client.render.shader.ShadersRenderer; import net.minecraft.core.entity.EntityLiving; import net.minecraft.core.entity.player.EntityPlayer; import net.minecraft.core.enums.EnumSleepStatus; @@ -19,14 +17,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import sunsetsatellite.signalindustries.SignalIndustries; -import sunsetsatellite.signalindustries.entities.fx.EntityColorParticleFX; import sunsetsatellite.signalindustries.interfaces.mixins.IPlayerPowerSuit; import sunsetsatellite.signalindustries.items.ItemSignalumPowerSuit; import sunsetsatellite.signalindustries.items.attachments.ItemAttachment; import sunsetsatellite.signalindustries.items.attachments.ItemNVGAttachment; import sunsetsatellite.signalindustries.misc.SignalIndustriesAchievementPage; import sunsetsatellite.signalindustries.powersuit.SignalumPowerSuit; -import sunsetsatellite.signalindustries.render.ShadersRendererSI; @Mixin( value = EntityPlayer.class, diff --git a/src/main/java/sunsetsatellite/signalindustries/recipes/container/AlloySmelterRecipes.java b/src/main/java/sunsetsatellite/signalindustries/recipes/container/AlloySmelterRecipes.java index c5dc6365..d91d0d3d 100644 --- a/src/main/java/sunsetsatellite/signalindustries/recipes/container/AlloySmelterRecipes.java +++ b/src/main/java/sunsetsatellite/signalindustries/recipes/container/AlloySmelterRecipes.java @@ -31,7 +31,18 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol(new ItemStack(SignalIndustries.emptySignalumCrystalDust)) }, new ItemStack(SignalIndustries.crystalAlloyIngot,1), - new RecipeProperties(200,40,Tier.PROTOTYPE,false) + new RecipeProperties(200,40,Tier.PROTOTYPE,true) + ) + ); + group.register( + "crystal_alloy_ingot_2", + new RecipeEntryMachine( + new RecipeExtendedSymbol[]{ + new RecipeExtendedSymbol(new ItemStack(Item.ingotSteel)), + new RecipeExtendedSymbol(new ItemStack(SignalIndustries.emptySignalumCrystalDust)) + }, + new ItemStack(SignalIndustries.crystalAlloyIngot,2), + new RecipeProperties(200,40,Tier.BASIC,true) ) ); group.register( diff --git a/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrusherRecipes.java b/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrusherRecipes.java index 64dfbd54..21b90610 100644 --- a/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrusherRecipes.java +++ b/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrusherRecipes.java @@ -10,6 +10,8 @@ import sunsetsatellite.signalindustries.util.RecipeProperties; import sunsetsatellite.signalindustries.util.Tier; +import static sunsetsatellite.signalindustries.SignalIndustries.*; + public class CrusherRecipes implements MachineRecipesBase>{ @Override public void addRecipes(RecipeGroup group) { @@ -37,9 +39,9 @@ public void addRecipes(RecipeGroup group) { "prototype_raw_dust", new RecipeEntryMachine( new RecipeExtendedSymbol[]{ - new RecipeExtendedSymbol(new ItemStack(SignalIndustries.rawSignalumCrystal)) + new RecipeExtendedSymbol(new ItemStack(rawSignalumCrystal)) }, - new ItemStack(SignalIndustries.saturatedSignalumCrystalDust,1), + new ItemStack(saturatedSignalumCrystalDust,1), new RecipeProperties(200,40, Tier.PROTOTYPE,false) ) ); @@ -49,7 +51,7 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol[]{ new RecipeExtendedSymbol(new ItemStack(Item.coal)) }, - new ItemStack(SignalIndustries.coalDust,1), + new ItemStack(coalDust,1), new RecipeProperties(200,40, Tier.PROTOTYPE,false) ) ); @@ -57,9 +59,9 @@ public void addRecipes(RecipeGroup group) { "prototype_empty_dust", new RecipeEntryMachine( new RecipeExtendedSymbol[]{ - new RecipeExtendedSymbol(new ItemStack(SignalIndustries.signalumCrystalEmpty)) + new RecipeExtendedSymbol(new ItemStack(signalumCrystalEmpty)) }, - new ItemStack(SignalIndustries.emptySignalumCrystalDust,2), + new ItemStack(emptySignalumCrystalDust,2), new RecipeProperties(200,40, Tier.PROTOTYPE,false) ) ); @@ -67,9 +69,9 @@ public void addRecipes(RecipeGroup group) { "prototype_dust", new RecipeEntryMachine( new RecipeExtendedSymbol[]{ - new RecipeExtendedSymbol(new ItemStack(SignalIndustries.signalumCrystal)) + new RecipeExtendedSymbol(new ItemStack(signalumCrystal)) }, - new ItemStack(SignalIndustries.saturatedSignalumCrystalDust,2), + new ItemStack(saturatedSignalumCrystalDust,2), new RecipeProperties(200,40, Tier.PROTOTYPE,false) ) ); @@ -79,7 +81,17 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol[]{ new RecipeExtendedSymbol(new ItemStack(Item.nethercoal)) }, - new ItemStack(SignalIndustries.netherCoalDust,1), + new ItemStack(netherCoalDust,1), + new RecipeProperties(100,80, Tier.BASIC,false) + ) + ); + group.register( + "basic_tiny_nether_coal_dust", + new RecipeEntryMachine( + new RecipeExtendedSymbol[]{ + new RecipeExtendedSymbol(new ItemStack(netherCoalDust)) + }, + new ItemStack(tinyNetherCoalDust,9), new RecipeProperties(100,80, Tier.BASIC,false) ) ); diff --git a/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrystalCutterRecipes.java b/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrystalCutterRecipes.java index 29878f92..28e22bea 100644 --- a/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrystalCutterRecipes.java +++ b/src/main/java/sunsetsatellite/signalindustries/recipes/container/CrystalCutterRecipes.java @@ -29,6 +29,17 @@ public void addRecipes(RecipeGroup group) { new RecipeProperties(200,80,0, Tier.PROTOTYPE,false) ) ); + group.register( + "empty_signalum_crystal", + new RecipeEntryMachine( + new RecipeExtendedSymbol[]{ + new RecipeExtendedSymbol(new FluidStack((BlockFluid) BlockFluid.fluidWaterFlowing,1000)), + new RecipeExtendedSymbol(new ItemStack(SignalIndustries.rawSignalumCrystal,8)) + }, + new ItemStack(SignalIndustries.signalumCrystalEmpty,1,0), + new RecipeProperties(200,80,1, Tier.PROTOTYPE,false) + ) + ); group.register( "volatile_signalum_crystal", new RecipeEntryMachine( @@ -37,7 +48,7 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol(new ItemStack(SignalIndustries.signalumCrystal,1)) }, new ItemStack(SignalIndustries.volatileSignalumCrystal,4,0), - new RecipeProperties(200,80,3, Tier.BASIC,false) + new RecipeProperties(200,80,2, Tier.BASIC,false) ) ); group.register( @@ -48,7 +59,7 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol(new ItemStack(SignalIndustries.rawSignalumCrystal,4)) }, new ItemStack(SignalIndustries.crystalChip,1,0), - new RecipeProperties(100,80,1, Tier.BASIC,false) + new RecipeProperties(100,80,3, Tier.BASIC,false) ) ); group.register( @@ -59,7 +70,7 @@ public void addRecipes(RecipeGroup group) { new RecipeExtendedSymbol(new ItemStack(SignalIndustries.signalumCrystal,1)) }, new ItemStack(SignalIndustries.pureCrystalChip,2,0), - new RecipeProperties(100,80,2, Tier.REINFORCED,false) + new RecipeProperties(100,80,4, Tier.REINFORCED,false) ) ); } diff --git a/src/main/java/sunsetsatellite/signalindustries/render/RenderFluidInConduit.java b/src/main/java/sunsetsatellite/signalindustries/render/RenderFluidInConduit.java index 8b95ccaf..bb92303a 100644 --- a/src/main/java/sunsetsatellite/signalindustries/render/RenderFluidInConduit.java +++ b/src/main/java/sunsetsatellite/signalindustries/render/RenderFluidInConduit.java @@ -127,7 +127,7 @@ public void doRender(TileEntity tileEntity1, double d2, double d4, double d6, fl GL11.glEnable(GL11.GL_LIGHTING); GL11.glPopMatrix(); } - if(states.get(Direction.getFromName("UP")) && ((TileEntityFluidPipe) tileEntity1).isPressurized || (blockAccess.getBlockTileEntity(i,j+1,k) instanceof TileEntityFluidPipe && ((TileEntityFluidPipe) blockAccess.getBlockTileEntity(i,j+1,k)).getFluidInSlot(0) != null)){ + if(states.get(Direction.getFromName("UP"))){ GL11.glPushMatrix(); GL11.glTranslatef((float)d2, (float)d4, (float)d6); GL11.glRotatef(0.0f, 0.0F, 1.0F, 0.0F); diff --git a/src/main/java/sunsetsatellite/signalindustries/render/RenderItemsInConduit.java b/src/main/java/sunsetsatellite/signalindustries/render/RenderItemsInConduit.java new file mode 100644 index 00000000..ff39670a --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/render/RenderItemsInConduit.java @@ -0,0 +1,199 @@ +package sunsetsatellite.signalindustries.render; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.render.EntityRenderDispatcher; +import net.minecraft.client.render.RenderBlocks; +import net.minecraft.client.render.Tessellator; +import net.minecraft.client.render.TextureFX; +import net.minecraft.client.render.block.model.BlockModel; +import net.minecraft.client.render.block.model.BlockModelDispatcher; +import net.minecraft.client.render.block.model.BlockModelRenderBlocks; +import net.minecraft.client.render.tileentity.TileEntityRenderer; +import net.minecraft.core.Global; +import net.minecraft.core.block.Block; +import net.minecraft.core.entity.EntityItem; +import net.minecraft.core.item.Item; +import net.minecraft.core.item.ItemStack; +import net.minecraft.core.item.tag.ItemTags; +import net.minecraft.core.util.helper.Axis; +import net.minecraft.core.util.helper.MathHelper; +import org.lwjgl.opengl.GL11; +import sunsetsatellite.catalyst.CatalystFluids; +import sunsetsatellite.catalyst.core.util.Direction; +import sunsetsatellite.catalyst.core.util.Vec3f; +import sunsetsatellite.signalindustries.SignalIndustries; +import sunsetsatellite.signalindustries.inventories.TileEntityItemConduit; + +import java.util.Random; + +public class RenderItemsInConduit extends TileEntityRenderer { + + private final Random random = new Random(); + private final RenderBlocks renderBlocks = new RenderBlocks(); + + @Override + public void doRender(TileEntityItemConduit tileEntity, double x, double y, double z, float g) { + for (TileEntityItemConduit.PipeItem content : tileEntity.getContents()) { + Direction begin = content.getEntry(); + Direction end = content.getExit(); + Vec3f beginVec = content.getEntry().getVecF(); + Axis beginAxis = begin.getAxis(); + Vec3f endVec = content.getExit().getVecF(); + Axis endAxis = end.getAxis(); + double v = 0; + boolean positive = (begin == Direction.Z_POS || begin == Direction.Y_POS || begin == Direction.X_POS); + v = CatalystFluids.map(content.getTicks(), TileEntityItemConduit.TRANSFER_TICKS, 0, 1, -1); + Vec3f base = new Vec3f(0.5d); + Vec3f pos = new Vec3f(x,y,z); + float lerped = 0; + Vec3f offset = new Vec3f(0); + switch (beginAxis) { + case X: + lerped = MathHelper.lerp((float) beginVec.x, (float) base.x, (float) v); + if(!positive){ + lerped = (float) CatalystFluids.map(lerped, -2.5f,0.5f,-0.5f,0.5f); + } + offset.x += lerped; + offset.y += base.y; + offset.z += base.z; + break; + case Y: + lerped = MathHelper.lerp((float) beginVec.y, (float) base.y, (float) v); + if(!positive){ + lerped = (float) CatalystFluids.map(lerped, -2.5f,0.5f,-0.5f,0.5f); + } + offset.x += base.x; + offset.y += lerped; + offset.z += base.z; + break; + case Z: + lerped = MathHelper.lerp((float) beginVec.z, (float) base.z, (float) v); + if(!positive){ + lerped = (float) CatalystFluids.map(lerped, -2.5f,0.5f,-0.5f,0.5f); + } + offset.x += base.x; + offset.y += base.y; + offset.z += lerped; + break; + default: + break; + } + Vec3f p = pos.copy().add(offset); + doRenderItem(content.getStack(),p.x, p.y, p.z, 0,0); + } + } + + public void doRenderItem(ItemStack itemstack, double d, double d1, double d2, float f, float f1) { + this.random.setSeed(187L); + if (itemstack == null) { + return; + } + Item item = itemstack.getItem(); + if (item == null) { + return; + } + GL11.glPushMatrix(); + float f2 = 0;//MathHelper.sin(((float)entity.age + f1) / 10.0f + entity.field_804_d) * 0.1f + 0.1f; + float f3 = 0;//spin counter //(((float)entity.age + f1) / 20.0f + entity.field_804_d) * 57.29578f; + int renderCount = 1; + if (itemstack.stackSize > 1) { + renderCount = 2; + } + if (itemstack.stackSize > 5) { + renderCount = 3; + } + if (itemstack.stackSize > 20) { + renderCount = 4; + } + GL11.glTranslatef((float)d, (float)d1 + f2, (float)d2); + GL11.glEnable(32826); + if (itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null && BlockModelDispatcher.getInstance().getDispatch(Block.blocksList[itemstack.itemID]).shouldItemRender3d()) { + GL11.glRotatef(f3, 0.0f, 1.0f, 0.0f); + this.loadTexture("/terrain.png"); + BlockModelRenderBlocks.setRenderBlocks(this.renderBlocks); + BlockModel model = BlockModelDispatcher.getInstance().getDispatch(Block.blocksList[itemstack.itemID]); + float itemSize = model.getItemRenderScale(); + GL11.glScalef(itemSize, itemSize, itemSize); + for (int j = 0; j < renderCount; ++j) { + GL11.glPushMatrix(); + if (j > 0) { + float f5 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.2f / itemSize; + float f7 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.2f / itemSize; + float f9 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.2f / itemSize; + GL11.glTranslatef(f5, f7, f9); + } + float f4 = 1.0f;//entity.getBrightness(f1); + if (Minecraft.getMinecraft(this).fullbright) { + f4 = 1.0f; + } + this.renderBlocks.renderBlockOnInventory(Block.blocksList[itemstack.itemID], itemstack.getMetadata(), f4); + GL11.glPopMatrix(); + } + } else { + int tileWidth; + GL11.glScalef(0.5f, 0.5f, 0.5f); + int i = itemstack.getIconIndex(); + if (itemstack.itemID < Block.blocksList.length) { + this.loadTexture("/terrain.png"); + tileWidth = TextureFX.tileWidthTerrain; + } else { + this.loadTexture("/gui/items.png"); + tileWidth = TextureFX.tileWidthItems; + } + Tessellator tessellator = Tessellator.instance; + float f6 = (float)(i % Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth) / (float)(Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth); + float f8 = (float)(i % Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth + tileWidth) / (float)(Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth); + float f10 = (float)(i / Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth) / (float)(Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth); + float f11 = (float)(i / Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth + tileWidth) / (float)(Global.TEXTURE_ATLAS_WIDTH_TILES * tileWidth); + float f12 = 1.0f; + float f13 = 0.5f; + float f14 = 0.25f; + if (true) { + int k = Item.itemsList[itemstack.itemID].getColorFromDamage(itemstack.getMetadata()); + float f15 = (float)(k >> 16 & 0xFF) / 255.0f; + float f17 = (float)(k >> 8 & 0xFF) / 255.0f; + float f19 = (float)(k & 0xFF) / 255.0f; + float f21 = 1.0f; + //float f21 = entity.getBrightness(f1); + /*if (Minecraft.getMinecraft(this).fullbright || entity.item.getItem().hasTag(ItemTags.renderFullbright)) { + f21 = 1.0f; + }*/ + GL11.glColor4f(f15 * f21, f17 * f21, f19 * f21, 1.0f); + } + /*if (Minecraft.getMinecraft(this).gameSettings.items3D.value) { + GL11.glPushMatrix(); + GL11.glScaled(1.0, 1.0, 1.0); + GL11.glRotated(f3, 0.0, 1.0, 0.0); + GL11.glTranslated(-0.5, 0.0, -0.05 * (double)(renderCount - 1)); + for (int j = 0; j < renderCount; ++j) { + GL11.glPushMatrix(); + GL11.glTranslated(0.0, 0.0, 0.1 * (double)j); + //EntityRenderDispatcher.instance.itemRenderer.renderItem(entity, itemstack, false); + GL11.glPopMatrix(); + } + GL11.glPopMatrix(); + } else {*/ + for (int l = 0; l < renderCount; ++l) { + GL11.glPushMatrix(); + if (l > 0) { + float f16 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.3f; + float f18 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.3f; + float f20 = (this.random.nextFloat() * 2.0f - 1.0f) * 0.3f; + GL11.glTranslatef(f16, f18, f20); + } + GL11.glRotatef(180.0f - this.renderDispatcher.viewLerpYaw, 0.0f, 1.0f, 0.0f); + tessellator.startDrawingQuads(); + tessellator.setNormal(0.0f, 1.0f, 0.0f); + tessellator.addVertexWithUV(-0.5, -0.25, 0.0, f6, f11); + tessellator.addVertexWithUV(0.5, -0.25, 0.0, f8, f11); + tessellator.addVertexWithUV(0.5, 0.75, 0.0, f8, f10); + tessellator.addVertexWithUV(-0.5, 0.75, 0.0, f6, f10); + tessellator.draw(); + GL11.glPopMatrix(); + } + //} + } + GL11.glDisable(32826); + GL11.glPopMatrix(); + } +} diff --git a/src/main/java/sunsetsatellite/signalindustries/util/PipeMode.java b/src/main/java/sunsetsatellite/signalindustries/util/PipeMode.java new file mode 100644 index 00000000..19d6fdbe --- /dev/null +++ b/src/main/java/sunsetsatellite/signalindustries/util/PipeMode.java @@ -0,0 +1,6 @@ +package sunsetsatellite.signalindustries.util; + +public enum PipeMode { + RANDOM, + SPLIT +} diff --git a/src/main/resources/assets/signalindustries/block/awakened_blank.png b/src/main/resources/assets/signalindustries/block/awakened_blank.png new file mode 100644 index 0000000000000000000000000000000000000000..575b39159b532db157a0871998c64414f910b80b GIT binary patch literal 425 zcmV;a0apHrP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0X|7YK~y+Tm6I_} z!$1&4-)u+AW>0Ka|kZO1(2{(VWa?pBJuKPCdLw`!TQ;J&;0N4 z&W=;PfdX@A;R}x84UXUhPJLBYtAda4!e}U~#g4vbSK0PdAd?bJW;P>t4=qn-$V%uc ztEEJhzOoyL%p&p|Dd)>jX5J|mi{78@5HYpu0{eKmT+ql+h&TCx7YW-K6eN>4Yd3zc z_l`tJrxi?~-CG6U<*1ut$ZowtQ3cy27E*J5!-HX~oVnp2*QXo2-|BBpBqs2nQdu%O z=|1$Y)6u;}|HP1O+_2GamiqcivrH-UyF%cPSZqK0H^*v6nB*?u&-+xD%ne3Cc522m=AK7l#kQGLm4 TBlq))00000NkvXXu0mjf>Y1}) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/awakened_booster_overlay.png b/src/main/resources/assets/signalindustries/block/awakened_booster_overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..85db9298dfafa0e73087514db50e0ef4f2e9efcc GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufG}g$wN6f;V40_jV~B-+vP8iFj-`eNo^O@^XTS5)gokHt zDJRsuS(>vZYvuwIt{;0|9sd75f4_l^O--|-Qy`Phwut;!^#;tm2{V3`zFq#`|NQ;* ziprmY&2Qb}H~i^568k@Y{$Ac`$DayW{MhwQIc&BA!)$H0!wDulY|IG>3=H-kTDSk& SonZ%b0fVQjpUXO@geCyQhEz2G literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/awakened_booster_side_active.png b/src/main/resources/assets/signalindustries/block/awakened_booster_side_active.png new file mode 100644 index 0000000000000000000000000000000000000000..2923eec57a5d7b26aaef3471d0514dfbc2d5d3f3 GIT binary patch literal 546 zcmWlUTS$`u9L0}rZn|$5HL0d+AWPh!EVV@hT{gCKG~IA}$dH;87+5I{w4jNOEGlBU zknZ7S8X7axmZJHvrePPf1v4^=vY<8*mSbS0{rh}4=Wq_^<#*X!S|k!=3IK=<#kw*! zQ`eNtVO_aZVqqh}URI<<|FkU37H*ZML<2l_F)NixY!8`@Ry{R?Zh-EBnn343XF*Po z3v>_E2YLp232Fg3kcKQVq(ZD`ke-4xdc-a=2{J|4z+hd>8-3pt?8<9nkP+*PMs9x} z(e;j*ymS?D@6z1)V8Aq#1ZJvol&*ss5byt$1R)m!E>fr+d`Nf@(jcf4$&m0NqDjyb zaKNJ%tg}#j8e?x_x(V`vdO&xuk()(rpbpSDXaY10>IGfI=@0o`EMQ7)ak(83``45( z(ptU9j+|S%y-G1%!TBS1@dB=0^6-34 zG|U(a)$)hN&S>siLG5nKoOwvavmde@nUE;*&Qv_Vk|&jIeMf34k#FKjED#dH#XfMO*ZXfqYJSH3SBk|TP@mZt|hsg zlvzsqTnP#;TT*T*k(q1jB1l9r5``{Eh!s{38UH>X&N-aJdHDrvsw*Wzr4WF`Y%*Bb z%wJYs4(samGAkP#m!(pV*qf3$ws0M~Djje?Bw9MeWBXLij#?x6K^>qjkQa0s)CBT@ zLZEI?KWGG$23-YtPym$_#bPK#SRp_G-D8&$8I%$fim)=BPDi6ro6RPIJe5i%lS!x3 z>2|xR1({5SVHl6c!-FUo3{pGj9C#3OA>=|p5%3|)g_z=?9^^sBhlHMkhLD3?nqZwJ z;?raHCZ!vo0Z=dK7K*qkx&~rEqo8rnBTyfx8LziYCs;bcanoKGAbq+l&Tw1fJUhNK z8+5g5t8wzfDPOtx{H$7dIc_{s5!huc)5d1%vppxz&~B|&&>s^1Sr+xE=M0;AzgQx|vYL!F!B zrObivRgFLFYX<&#!_v~I`bFfKMIBhD5WRBA!~Rx*{qqua^9^krB@b`s WEX=7i-$D;0EFsLsYC}wa(Dxsy5!NLD literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/awakened_booster_top_active.png b/src/main/resources/assets/signalindustries/block/awakened_booster_top_active.png new file mode 100644 index 0000000000000000000000000000000000000000..a84accf861177e54d7667818c030f3cbe49ace04 GIT binary patch literal 553 zcmV+^0@nSBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0lrB@K~y+TO;fv0 z96=DQnY{ynu!AA6-~e-+#6z}3PDH>D@DC6;^A9*dB0>%<2L%2ILK2+u14u*&gb-d3 z5-f1X)7;Kb-OU2MbF;PGRXsg3eJ-s60jL8x@Bj<|9iSih0DRP$QOSs7m@B#E2-F%3$q*qrxzzZ13fQMbV(M0?Gkj+sccCOd}@wzW@ZVACSgzo zuVwx05T`pMZXvL;zy24*{gKu=`TuU>%5%`kV=plC|3RnlPAEE r*iLe|Y-WyL?c}!31{gBHzd#+&Zm;M$GXlYh00000NkvXXu0mjff|}(4 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/awakened_booster_top_inactive.png b/src/main/resources/assets/signalindustries/block/awakened_booster_top_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..2a843b0f37f8e5a30f7aaf2bb7842588411b3b82 GIT binary patch literal 528 zcmV+r0`L8aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0i{VqK~y+TO;fQ- z13?gdw|62ZYOz9^goLCB`G7QjhQA>fC1U-OPKtGrN;0TmT+e12W(n*aSX+4PXn{)|pYxbUpyD_!IbpW{Ijo8BkOR z034zSi9;O2<+mB0MBo^p`GXco0aZX*1BwZ#7vT3=#&np&A2lmoTL*!#m1kq+_a{vx zd_0(mhRgfMJFXGbmdjGgWU;cz~m)ALJUvqa$r{*V_J>I<^-wPIvpW!s4I>r7fBzs%Aks=cFk@Io7q4-*q;?kOBS$*6;&YW9aMb Sk_kru00001Fm_1FF>PcJsAqc=CexN6!LaEkT=&#_$F2PpdoGGw@Vb)`&BMN8lH%hoHW}c&0&}zZN^Qj?c!rT3d pF@G3dc+OFj>v7L}!o+>#}EtuWC>QDo&YJnf6angJ6Mk#ZPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940tZP%K~y+TEs{BJ zB0&&^YntIc%@LE3Bcv5hND(66Y$ap~OBRuT1o0#|uq|8u6^Mio5v_y?NC;NiT@i9K z+?PMoR4_-?t5>gIwP9J7&*yWwT!vvBk4Muqm&@hpbaFbKBt?Y$`F!5(cD8MAHXGCH z^%jdoK(x^SXfzr*91ijX4P?MA77IG-^|~1jham$ro6R6*!gxGZN`Z5`-88J%YbNaX z`*b=DSb+`(gMPoCG8}NzJQxi6{eGv@VF-DMc*4T3;>+Xl(0X%;cDv1l+xz>QN(GUv zRtp?eFbJkoB@zjS#9}eZjYfn1^5Y{)2v4~TuGi~@LLs=oL?RJ|25Q^ww%KgPUf7J; z8vWRkbmlI+J)_=P+ola3UnN08jbknjxXS3OSK9AHNudfFY7+EOQt13b- z|EX4sMx&WbhHs)!D4?_W{tk{qgMq@-n`dY$l|m~fl0_~cD08_SZjxsR#(a;0gGeTm zToBd-6bb?~zdTtp2jEGGPNQ0_QouNU!}U$(#PI1M3-v9sr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/basic_booster_side_inactive.png b/src/main/resources/assets/signalindustries/block/basic_booster_side_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..c2f6dc21de5efe94e3b52f40d20b8b397b600963 GIT binary patch literal 640 zcmV-`0)PF9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940u@O_K~y+TEs{HL z8c`61ckeFmr+FwP4N^*k6j9M4M1Do&!krsiuH0BgvRr^mS8?lKfM_UEAe0VK&>(k+ zB9VBrz_PG+^WmEjT6Sm7oH_T*)tk*`I2`u-{kpEZu4|g+cDt2Q`g}f;nx>KWJkN0) z%d%|SHbbFMtyTj>8x4SFvzcKS~bhcV8Gm%I@257ZfLCl2td@h6l7YGDs z*zfmDI3ACMLIJP<9gD>xkqBit;HG&pnT$rGe!tHU@(}Tag-^j-Fc_ru;xl@^9uqzq zjo;7Di0pQ|;HZK@Fr6Zs%`zmNPE&5T+w|LSZzv&tJwA@dhUs*=Ua$YYya4@U+lH=_^b6rg z`SbRc>Tb8gNx%ZXfTEANXC0pr6oMWmobX3Vh?O6lM=13KwnC{IzTVt?yT3n337Q{h zknHYsItlj2A2wsQLKp7tAS3hr;eiRR=W#;J!1}XG%jFVfi^T#TK!3Tq0$nPVDwPUS ze>^=&O@onzQvI)rP|G(iFH@;hu~_7ts8*}!ylynWacD45m}>J3&FAxI#YD2m1q5Ze zT*giE48fT5C^(2*F2@C7oj{==K=a9yHFE%-l<3s!^*RNNQ#V}QWKIm98bY4=oEYCN a%lZd!yHQ0k-p@h+0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940pLkQK~y+TJ(9a_ zB0&&E?=;PGcnSg9hzL1YB$5sG7s&kqM*a^cWR^&s?O%{N!of-oo!Tjqr4`R%c)xs@ z##nfRxB)vxas# z7>!00jWAaz(YUS}4u`AN3MT;@{0f2qeb>Y9c)6|@Nwr!HPtii(24z$vDB=)*zR@4i zn?MXmnmim12G>}y8JfBDGeQ7$=-<*x!bt+_ammbPGn7rIQ|9$5;nXkbMrum8(m&}C zHO+j;N0q(EGKK*`@b>r!)6Vz#WopksP_0&DK>#C7vq`tsO&(7hjRu`DOTLlIbR$uh z2G~b7#_+aWA);Qdb3t$xC=>)xXEc|9vb;GW)9ZG-954|y@at|e9>C{j%04v_OwBM1 ZzW_5f34g`t2Xg=b002ovPDHLkV1n0J_rL%E literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/basic_booster_top_inactive.png b/src/main/resources/assets/signalindustries/block/basic_booster_top_inactive.png new file mode 100644 index 0000000000000000000000000000000000000000..115b325a5c3659a740fa1aa9da07a7c4af149cc9 GIT binary patch literal 590 zcmV-U0Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940pm$TK~y+TJ(5dK z0znXlnVue)2ah2WKsRDc*pc8;kHAShf(KyD!n=^TX6Gf0F_O5D;W;xf%%lCFqZQKB zRR8tYUsY{Pr&HH;tJSJu7)4P?DdRXU%hIwef|W{zxKiqLIz>@*JRYUvIOFjc5NRX; z3d7JeP2v~{M8NI$dopLUnQXOMkOA6mw-8fdwOR=wz}0Fs5)Ow06|yWFjYfba=tiUA zdER_J$0q^$G)+m?+$d=_o5SG{7HUdpY}+Qa-EMDQUUE49>?=(_;#eBS74rBuT;~0So4}+wIV&@BZyQinNm})$8?`DO%`Tpp1$bMKt0q3^n@a zA`(LkNSe&^Trf5M7&A1-qPV&U1FF%to|ly+lf)Q3Qxcoa24(B@ntgpHNukt@>vnDX z+HvlEf1l^2Qq*TZ&a(oB4^HF_I%yPPo6G(mi+H_uE5g8`kfOMK+A z-Lw2l1H_TdU^pdD2Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz0qIFZK~y+TO_Iy5 z0YMOkO>37iE+a-_XC<-o3br1C*x1+^A(7aK9kC+Bdw76(7m-*Hw{gFnZ%&`ZsYOk9 z^Swb!C+9+wDt- z(6Ly|FbqJ{pf)+>a=F=T@?U|b#;i}^@XI9g%q+-kMz^*ZI)Bw)e5j>jW+xG{+W{kLQ?$*j<(2`~vW z6rk^LIE0dAS%BcG&{(h6V|t|>2Z?@s=*!!5I>p2L7x`ywrqk(wVfCB^Tw%7`?I4Cm ztJP|=*&qU|WIxO05}7H_u1WS(f)+-U8r5o*GLy-KWYWMj8Vz1AmkY9hAug5jh`?BQ zo|&ZE?cx~>1aZ)Kg!5+L7s9gHEI$a6GnsAMRDl3jJgXxa&l8zizu)HpMbsazwn1&` iDNTvf8LH^*y6z9gqBK%>54{xt0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940jo(wK~y+TP13os zDnSedP#A`Nt)j5O#3Kb^BKqS@pyc_UfFC`FqKM)zu)iM?Up3T<#LIO#o}Nv0FovFXuV!%G8u6u zK?Lq_ILMq%r*XYrM+UUp?GUT5*=(XHg3IUg63*wd3itcH*XsdC(A8?STrPXYfjeAl zwOS}5j>w6{HRcrxg->b}{rvnamrJawiH9Jm!{Lxx_L0zPwG?SKo7d}=ux__2;jb+g z3)MI;wE-zuyl4q^we@L|ENdtCbwmzp&Kr*Md*g0;92(N@l!_7i7_&DaC*5D2xeEWoICKx4Z`8Rp|v$C6=m8->jqkq4)% zsDUs}@B^J{pB^lgwcBlfglSMLhv9a0+IQHxCw0=}@z?|1;SUdgvL5gSN#bEeL?%h{ Y59~E4N1_fH*8l(j07*qoM6N<$g6XF2tN;K2 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/signalindustries/block/inserterinput.png b/src/main/resources/assets/signalindustries/block/inserter_input.png similarity index 100% rename from src/main/resources/assets/signalindustries/block/inserterinput.png rename to src/main/resources/assets/signalindustries/block/inserter_input.png diff --git a/src/main/resources/assets/signalindustries/block/inserteroutput.png b/src/main/resources/assets/signalindustries/block/inserter_output.png similarity index 100% rename from src/main/resources/assets/signalindustries/block/inserteroutput.png rename to src/main/resources/assets/signalindustries/block/inserter_output.png diff --git a/src/main/resources/assets/signalindustries/block/item_conduit_basic.png b/src/main/resources/assets/signalindustries/block/item_conduit_basic.png new file mode 100644 index 0000000000000000000000000000000000000000..327beb227678b599a895efcfd6444fe049aee524 GIT binary patch literal 515 zcmV+e0{s1nP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940hmcdK~y+Tg_8en z0YMPQX9cyp_Z~F<&_tt8qwi75lc>Y1Q2%gEG(oAyuzRP@ZD(W=x0Qa9%iY}UeCO9f znr5?MeBU?LJTvGIOuOB7{%7p_j1Uq$DXeutdJ?3R*1F&da1ISLn|_7>3`u4Y%gbewy3d7G$1sC_yR3p&OkjHPq0vA6P_L66#F_5;dsSgls72 z)S8h-HAqTrxf#fuR#5(BYGg)TG_vr*3#E%-)WomT#mmd{+&w>~VM#E@Ck9~MuW|?{ zYUYoYA+l&$7eLZrtF{5rPQ}(4slcl>Rn7{!3F-y)gZv;b=nAL>)Csx|8U#&%=0HKv zHE3XFkdpx(;~;qmePJ zUc<3EE>Fj1Yv>_ZgN8qB{MKK}7a1uA3PZbt;r3>4OgO0vVa^)9~d71&{)&Ge& zse={dJA1j!X?3`knhgFrwe)*#Tci2J?PRRdntpjMMZRG2>gyTrV!Ze=_@;egPiTJa zPsVATHPAi0yCBAfwAP_}9j*THfl&QyV9;$_j#c@F8wY1gU2P40922eYI{9So$Y=9{ zJFz@c+ncCyeqc{6rP903hKp|Gn%wG+>7MoX(X9SAKg9DZ__kMhQ;Z1ohrWJj`2ruCq*~y;OMmU~8JHs#W`Xcfc}qov z!LkH+UJFWlIl|-zeo~jA|30dRldF3aQWn~2YnFh@?Fge;BPq^C)CQG~0ZkH= zNhyn?jNC40BXchlWy#26s}MPNG}bJcMOpecGH+UW($IsV{0$L85N$Q{AoBx-ugo03 z)x))II?C1sh<`J0H8jn@l6n4|&uF5!Hi&C42eCQEAaQeNvO2PpUDuuHx{l3e=jcis zN~#6%^w$VLRaMp}OeZ7aCl&P;svEo9r8t}(l&sNt+%lb$kNQUeTjooE?6COmH3Bdg z3~1^Ud<;&Ep8Z_RS>y(+D|$h=HJF;lZhj3qvD@wL41bdSBtX84sp9}9F9$brW3cu= zfm(&;qy$zRYM^Jx6PrFf3J4sUB!f{vhy>I@(~Lwi4%SZq47vd60f1!Q zaULS=h(=bzOiI(g6Li2&j!l`cNC+pXu_n%?HB(SCi_-f&=$c5fs>4j(c zi0Bx2S|hD1-Sx?3X{k>gV^)p~fXLa>&MsMDc8L7wgw}8H8%;tcocfWFHUIzs07*qo IM6N<$f{52yPyhe` diff --git a/src/main/resources/assets/signalindustries/block/machine_reinforced.png b/src/main/resources/assets/signalindustries/block/machine_reinforced.png index 5386e359d6731b5c8ee9bfefeb61b1bb25bececa..7f82518e9202147b45d9c7fd6789a7c1f3c51017 100644 GIT binary patch delta 497 zcmVc01{GJ5DN=p>%v5!Dk!Z>{NUW1Hh&vKkDRM(-*fK6jx35o ztO638Pp6p>N=od55RR8;A5b8L@GZoLl#fY5f>UGe*VZHp{zC}iY&N?~Q|LuM1h7#d zj$;kL!fOx_5CygZl_Wt*DTLx!q*NBiiPl)_T1PBVifE24eNC?o@+dk=l9O)tcw=KH z&oi(&Jwi1TNPmF&8fc~ZS+=S5Wu9Mky9XicCm3@vn_)|W7Krqf8WhFuXcRs_2fbdW z({alRhV8PgCFo4b*F4{wOr-aVl+z8Lczf@k!-f5#n=igVy;fNC#Ljd>W4v7V~x3q(E#p}89p zU@Y2u@0_#FO{|?-JFDv-Yq13o0%6uZ9Jrh%aMXcDSo*MwC{g+6yQnIZsHH@y_7QP{ nWD(n6AutL2+caJA_ZH$03?bB1pyJla00000NkvXXu0mjfzk}45 delta 507 zcmVT6CAg z{r~Pc=iU)~KA(zzlu!X^ayi&k6*oFvLzGx9W9;z}yGA3V=6_~X0kf$TmNOZQc61;u zNp&IZvW&f03`1@=G6q8pP%0EKpeR_qy~RXVR}~-#!UvE_h2~NT!Si!0IUEQ#H9_XE zH-JR>q9|hj^b`S?3n8l&ibnGWad7e!l?M2@z=1LcYT5qvQS$xL@Q-WOQgq;#I%x6aNm-PwsJLcWBkXk}RC=$Vf&4w_yQ#~Y^ xflZPgG@C0o-0+8LWhN>1iF$nv(C|f_hG)OX2Qc67os|Fp002ovPDHLkV1gfN<+1<( diff --git a/src/main/resources/assets/signalindustries/block/reinforced_blank.png b/src/main/resources/assets/signalindustries/block/reinforced_blank.png index c7091c4c430f8aecd5d15b6cd89ca3a934276c40..da60094c970e32dc93220ac37c5d6098a9ad2a42 100644 GIT binary patch delta 21 dcmcc1beCy@C)Ys+2EK!gJ0@no-5AWp2mo0I2jc($ delta 21 ccmcc1beCy@C)Xhc2EId#q8eTe8-uwR0Zu>$O8@`> diff --git a/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit.json b/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit.json new file mode 100644 index 00000000..7aef12ab --- /dev/null +++ b/src/main/resources/assets/signalindustries/blockstates/basic_item_conduit.json @@ -0,0 +1,57 @@ +{ + "multipart": [ + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_base" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_up" + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_down" + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_north" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_east" + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_south" + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "signalindustries:conduit/item/basic/conduit_west" + }, + "when": { + "west": "true" + } + } + ] +} diff --git a/src/main/resources/assets/signalindustries/gui/awakened_booster.png b/src/main/resources/assets/signalindustries/gui/awakened_booster.png new file mode 100644 index 0000000000000000000000000000000000000000..70b67258e338eb8547509f83ef80673dd33acaf9 GIT binary patch literal 4025 zcmdT{`9D-`AO4?lu{ zCIA>Q#DFY7Je)Jk_RpZxCcCylX1z=w0Z5Kp4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