From 2f74d178232052d10161e26eeb48eec94898f601 Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 22 Jul 2025 23:17:59 +0200 Subject: [PATCH 1/2] pouring out the conk --- changelog | 58 +-- src/main/java/com/hbm/blocks/ModBlocks.java | 6 + .../com/hbm/blocks/generic/BlockRebar.java | 404 ++++++++++++++++++ .../com/hbm/blocks/rail/IRenderBlock.java | 1 + .../java/com/hbm/config/ClientConfig.java | 2 + .../java/com/hbm/crafting/ToolRecipes.java | 4 + .../java/com/hbm/inventory/fluid/Fluids.java | 5 +- .../inventory/recipes/AssemblerRecipes.java | 56 +-- .../recipes/AssemblyMachineRecipes.java | 14 +- .../recipes/ChemicalPlantRecipes.java | 9 +- .../recipes/loader/GenericRecipe.java | 2 +- .../com/hbm/itempool/ItemPoolsComponent.java | 6 +- .../com/hbm/itempool/ItemPoolsLegacy.java | 4 +- .../com/hbm/itempool/ItemPoolsRedRoom.java | 1 + .../com/hbm/itempool/ItemPoolsSingle.java | 1 + src/main/java/com/hbm/items/ModItems.java | 12 +- .../items/machine/ItemBlueprintFolder.java | 72 ++++ .../com/hbm/items/machine/ItemCatalyst.java | 6 - .../java/com/hbm/main/CraftingManager.java | 1 + src/main/java/com/hbm/main/MainRegistry.java | 3 + .../com/hbm/main/ModEventHandlerClient.java | 9 +- .../com/hbm/render/util/HorsePronter.java | 2 +- .../java/com/hbm/tileentity/TileMappings.java | 3 + src/main/java/com/hbm/uninos/NodeNet.java | 4 +- .../PneumaticNetworkProvider.java | 2 +- .../uninos/networkproviders/RebarNetwork.java | 9 + .../RebarNetworkProvider.java | 13 + src/main/resources/assets/hbm/lang/de_DE.lang | 4 + src/main/resources/assets/hbm/lang/en_US.lang | 4 + .../hbm/textures/blocks/concrete_rebar.png | Bin 0 -> 599 bytes .../textures/blocks/concrete_rebar_alt.png | Bin 0 -> 652 bytes .../assets/hbm/textures/blocks/rebar.png | Bin 0 -> 824 bytes .../assets/hbm/textures/blocks/rebar_base.png | Bin 0 -> 806 bytes .../hbm/textures/gui/fluids/concrete.png | Bin 0 -> 646 bytes .../hbm/textures/items/assembly_nuke.png | Bin 359 -> 415 bytes .../hbm/textures/items/blueprint_folder.png | Bin 0 -> 306 bytes .../items/blueprint_folder_discover.png | Bin 0 -> 301 bytes .../items/blueprint_folder_secret.png | Bin 0 -> 270 bytes .../textures/models/tank/tank_CONCRETE.png | Bin 0 -> 5002 bytes 39 files changed, 588 insertions(+), 129 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/generic/BlockRebar.java create mode 100644 src/main/java/com/hbm/items/machine/ItemBlueprintFolder.java create mode 100644 src/main/java/com/hbm/uninos/networkproviders/RebarNetwork.java create mode 100644 src/main/java/com/hbm/uninos/networkproviders/RebarNetworkProvider.java create mode 100644 src/main/resources/assets/hbm/textures/blocks/concrete_rebar.png create mode 100644 src/main/resources/assets/hbm/textures/blocks/concrete_rebar_alt.png create mode 100644 src/main/resources/assets/hbm/textures/blocks/rebar.png create mode 100644 src/main/resources/assets/hbm/textures/blocks/rebar_base.png create mode 100644 src/main/resources/assets/hbm/textures/gui/fluids/concrete.png create mode 100644 src/main/resources/assets/hbm/textures/items/blueprint_folder.png create mode 100644 src/main/resources/assets/hbm/textures/items/blueprint_folder_discover.png create mode 100644 src/main/resources/assets/hbm/textures/items/blueprint_folder_secret.png create mode 100644 src/main/resources/assets/hbm/textures/models/tank/tank_CONCRETE.png diff --git a/changelog b/changelog index 1b5ea3998..958bb0f23 100644 --- a/changelog +++ b/changelog @@ -1,52 +1,16 @@ ## Added -* New assembler - * Features a brand new animated model, GUI and the new recipe selection system - * Many recipes have been reworked, with the microcrafting complexity reduced - * The redcoil didn't get a recipe. It's gonna die soon. - * Neither did the schrabidium transmutator - * Balls-o-tron's spawner can now be made without a worm coin, using a silver key instead. This means that, while expensive, it's possible to summon him without finding a jungle dungeon -* Blueprins - * Replace the journals - * Instead of opening them and making a template, they act as a multi template - * Blueprints need to remain in the slot, removing them will disable the recipes again - * Not actually part of worldgen yet - yeah i ran out of time, cry about it -* More paintables - * Paintable pneumatic tube - * Behaves the exact same as a regular pneumatic tube - * Can also be used as in and outputs - * Full block - * Paintable OpenComputers cable - * Only enabled if OpenComputers is installed - * Full block - * Also supports OC wire colors +* Blueprint booklets + * Can be found in worldgen + * Using it will create one random blueprint of the same type as the booklet +* Liquid concrete + * It's conk but liquid +* Rebar + * When hooked up to liquid concrete using pipes, will fill to create reinforced concrete + * Fills bottom to top, so connect the pipes to the top ## Changed -* Updated chinese and ukrainian localization -* Removed levitation unit -* Many of NTM's regular building blocks now have forge microblock support -* RBMK crane models now conform to the dimensions of the room they're in -* Projectile resistance for armor has been renamed to "physical" and now also extends to all direct forms of attack by other entities that don't fall into any other categories (mostly melee attacks) - * This should fix the issue where most armors are quite weak against swords -* Electric attacks (i.e. tesla cannon) are now in the "energy damage" category - * This means that armors that have energy resistance actually properly work against the tesla cannon -* Heavy components are being deprecated -* Flow control pumps can now be interfaced with OpenComputers -* The electrolyzer now remembers the last visited GUI screen -* Retextured many fluid containers such as universal tanks, canisters and gas tanks -* Removed the legacy assembler and chemical plant recipes from the template folder -* Removed journals from various loot pools -* Drinking whiskey now gives strength III, resistance III and nausea -* Chemical artillery shell recipes have now been moved to the assembler -* The chemical plant and factory now scale their max power based on the recipe, similar to how the arc welder works -* The chemical plant's default max power is now 100kHE again instead of 1MHE -* The NEI handlers for the old chemplant and assembler have been deactivated, however they will continue to function for the time being +* The alternate recipes for nitric acid and xenon gas in the chemical plant now require blueprints ## Fixed -* Fixed gas centrifuge sound persisting when broken or when unloaded -* Fixed all centrifuge sounds trying to play even when the player is far away, using up audio slots -* Fixed guns that don't have durability always displaying a condition of 0% -* Fixed GL state leak caused by skeletons -* Fixed OpenComputers integration for the CCGT -* Fixed rotated RBMK consoles not behaving correctly when trying to change rod insertion levels -* Fixed crash caused by piston inserters on servers -* Fixed flare gun not having a firing sound +* Fixed a few assembler recipes using the old crafting numbers which sometimes exceed the stack limit + * As an extra safeguard, the recipe loader now throws an exception if that happens \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 0a6cf6f64..1b7dd0f7d 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -315,12 +315,14 @@ public class ModBlocks { public static Block floodlight; public static Block floodlight_beam; + public static Block rebar; public static Block reinforced_stone; public static Block concrete_smooth; public static Block concrete_colored; public static Block concrete_colored_ext; public static Block concrete; public static Block concrete_asbestos; + public static Block concrete_rebar; public static Block concrete_super; public static Block concrete_super_broken; public static Block ducrete_smooth; @@ -1524,12 +1526,14 @@ public class ModBlocks { floodlight = new Floodlight(Material.iron).setBlockName("floodlight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); floodlight_beam = new FloodlightBeam().setBlockName("floodlight_beam"); + rebar = new BlockRebar().setBlockName("rebar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":rebar"); reinforced_stone = new BlockGeneric(Material.rock).setBlockName("reinforced_stone").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(100.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_stone"); concrete_smooth = new BlockRadResistant(Material.rock).setBlockName("concrete_smooth").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete"); concrete_colored = new BlockConcreteColored(Material.rock).setBlockName("concrete_colored").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete"); concrete_colored_ext = new BlockConcreteColoredExt(Material.rock).setBlockName("concrete_colored_ext").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete_colored_ext"); concrete = new BlockGeneric(Material.rock).setBlockName("concrete").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(140.0F).setBlockTextureName(RefStrings.MODID + ":concrete_tile"); concrete_asbestos = new BlockGeneric(Material.rock).setBlockName("concrete_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":concrete_asbestos"); + concrete_rebar = new BlockGeneric(Material.rock).setBlockName("concrete_rebar").setCreativeTab(MainRegistry.blockTab).setHardness(50.0F).setResistance(240.0F).setBlockTextureName(RefStrings.MODID + ":concrete_rebar"); concrete_super = new BlockUberConcrete().setBlockName("concrete_super").setCreativeTab(MainRegistry.blockTab).setHardness(150.0F).setResistance(1000.0F); concrete_super_broken = new BlockFalling(Material.rock).setBlockName("concrete_super_broken").setCreativeTab(MainRegistry.blockTab).setHardness(10.0F).setResistance(20.0F).setBlockTextureName(RefStrings.MODID + ":concrete_super_broken"); concrete_pillar = new BlockRotatablePillar(Material.rock, RefStrings.MODID + ":concrete_pillar_top").setBlockName("concrete_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(180.0F).setBlockTextureName(RefStrings.MODID + ":concrete_pillar_side"); @@ -2701,6 +2705,7 @@ public class ModBlocks { GameRegistry.registerBlock(reinforced_laminate_pane,ItemBlockBlastInfo.class, reinforced_laminate_pane.getUnlocalizedName()); //Bricks + register(rebar); GameRegistry.registerBlock(reinforced_stone, ItemBlockBlastInfo.class, reinforced_stone.getUnlocalizedName()); GameRegistry.registerBlock(reinforced_ducrete, ItemBlockBlastInfo.class, reinforced_ducrete.getUnlocalizedName()); GameRegistry.registerBlock(concrete_smooth, ItemBlockBlastInfo.class, concrete_smooth.getUnlocalizedName()); @@ -2708,6 +2713,7 @@ public class ModBlocks { GameRegistry.registerBlock(concrete_colored_ext, ItemBlockBlastInfo.class, concrete_colored_ext.getUnlocalizedName()); GameRegistry.registerBlock(concrete, ItemBlockBlastInfo.class, concrete.getUnlocalizedName()); GameRegistry.registerBlock(concrete_asbestos, ItemBlockBlastInfo.class, concrete_asbestos.getUnlocalizedName()); + GameRegistry.registerBlock(concrete_rebar, ItemBlockBlastInfo.class, concrete_rebar.getUnlocalizedName()); GameRegistry.registerBlock(concrete_super, ItemBlockBlastInfo.class, concrete_super.getUnlocalizedName()); GameRegistry.registerBlock(concrete_super_broken, ItemBlockBlastInfo.class, concrete_super_broken.getUnlocalizedName()); GameRegistry.registerBlock(ducrete_smooth, ItemBlockBlastInfo.class, ducrete_smooth.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockRebar.java b/src/main/java/com/hbm/blocks/generic/BlockRebar.java new file mode 100644 index 000000000..67b9f13c7 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockRebar.java @@ -0,0 +1,404 @@ +package com.hbm.blocks.generic; + +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.opengl.GL11; + +import com.hbm.blocks.ModBlocks; +import com.hbm.config.ClientConfig; +import com.hbm.inventory.fluid.FluidType; +import com.hbm.inventory.fluid.Fluids; +import com.hbm.inventory.fluid.tank.FluidTank; +import com.hbm.lib.Library; +import com.hbm.lib.RefStrings; +import com.hbm.render.block.ISBRHUniversal; +import com.hbm.render.util.RenderBlocksNT; +import com.hbm.tileentity.IBufPacketReceiver; +import com.hbm.tileentity.TileEntityLoadedBase; +import com.hbm.tileentity.network.TileEntityPipeBaseNT; +import com.hbm.uninos.GenNode; +import com.hbm.uninos.INetworkProvider; +import com.hbm.uninos.UniNodespace; +import com.hbm.uninos.networkproviders.RebarNetwork; +import com.hbm.uninos.networkproviders.RebarNetworkProvider; +import com.hbm.util.BobMathUtil; +import com.hbm.util.Compat; +import com.hbm.util.fauxpointtwelve.BlockPos; +import com.hbm.util.fauxpointtwelve.DirPos; + +import api.hbm.fluidmk2.IFluidReceiverMK2; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import io.netty.buffer.ByteBuf; +import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.EntityRenderer; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class BlockRebar extends BlockContainer implements ISBRHUniversal { + + @SideOnly(Side.CLIENT) protected IIcon concrete; + + public BlockRebar() { + super(Material.iron); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister reg) { + super.registerBlockIcons(reg); + this.concrete = reg.registerIcon(RefStrings.MODID + ":concrete_liquid"); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TileEntityRebar(); + } + + @Override public int getRenderType() { return renderID; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } + + @Override + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { + return true; + } + + @Override + public void onNeighborBlockChange(World world, int x, int y, int z, Block block) { + TileEntity tile = world.getTileEntity(x, y, z); + if(!(tile instanceof TileEntityRebar)) return; + + TileEntityRebar rebar = (TileEntityRebar) tile; + rebar.hasConnection = false; + + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + TileEntity neighbor = Compat.getTileStandard(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ); + if(neighbor instanceof TileEntityPipeBaseNT) { + rebar.hasConnection = true; + return; + } + } + } + + public static class TileEntityRebar extends TileEntityLoadedBase implements IFluidReceiverMK2, IBufPacketReceiver { + + public int progress; + public int prevProgress; + protected RebarNode node; + public boolean hasConnection = false; + + @Override + public void updateEntity() { + + long time = worldObj.getTotalWorldTime(); + + if(!worldObj.isRemote) { + + if(prevProgress != progress) { + worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this); + prevProgress = progress; + } + + if(this.progress >= 1_000) { + worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.concrete_rebar); + return; + } + + if(time % 60 == 0) { + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) { + this.trySubscribe(Fluids.CONCRETE, worldObj, xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, dir); + } + } + + if(this.node == null || this.node.expired) { + + this.node = (RebarNode) UniNodespace.getNode(worldObj, xCoord, yCoord, zCoord, RebarNetworkProvider.THE_PROVIDER); + + if(this.node == null || this.node.expired) { + this.node = this.createNode(); + UniNodespace.createNode(worldObj, this.node); + } + } + + this.networkPackNT(100); + } + } + + @Override + public void invalidate() { + super.invalidate(); + + if(!worldObj.isRemote) { + if(this.node != null) { + UniNodespace.destroyNode(worldObj, xCoord, yCoord, zCoord, RebarNetworkProvider.THE_PROVIDER); + } + } + } + + @Override public void serialize(ByteBuf buf) { buf.writeInt(progress); } + @Override public void deserialize(ByteBuf buf) { this.progress = buf.readInt(); } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + this.progress = nbt.getInteger("progress"); + this.hasConnection = nbt.getBoolean("hasConnection"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + nbt.setInteger("progress", this.progress); + nbt.setBoolean("hasConnection", this.hasConnection); + } + + public RebarNode createNode() { + TileEntity tile = (TileEntity) this; + return new RebarNode(RebarNetworkProvider.THE_PROVIDER, new BlockPos(tile.xCoord, tile.yCoord, tile.zCoord)).setConnections( + new DirPos(tile.xCoord + 1, tile.yCoord, tile.zCoord, Library.POS_X), + new DirPos(tile.xCoord - 1, tile.yCoord, tile.zCoord, Library.NEG_X), + new DirPos(tile.xCoord, tile.yCoord + 1, tile.zCoord, Library.POS_Y), + new DirPos(tile.xCoord, tile.yCoord - 1, tile.zCoord, Library.NEG_Y), + new DirPos(tile.xCoord, tile.yCoord, tile.zCoord + 1, Library.POS_Z), + new DirPos(tile.xCoord, tile.yCoord, tile.zCoord - 1, Library.NEG_Z) + ); + } + + @Override + public FluidTank[] getAllTanks() { + FluidTank tank = new FluidTank(Fluids.CONCRETE, 1_000); + tank.setFill(progress); + return new FluidTank[] {tank}; + } + + @Override + public long transferFluid(FluidType type, int pressure, long amount) { + if(type != Fluids.CONCRETE) return amount; + if(this.node == null || this.node.expired || !this.node.hasValidNet()) return amount; + + List lowestLinks = new ArrayList(); + int lowestY = 256; + int progress = 0; + int capacity = 0; + + for(Object o : this.node.net.links) { + RebarNode node = (RebarNode) o; + int y = node.positions[0].getY(); //rebar can only have one pos, there's no multiblock rebar + + if(y < lowestY) { + lowestY = y; + progress = 0; + capacity = 0; + lowestLinks.clear(); + } + + if(y == lowestY) { + TileEntity tile = worldObj.getTileEntity(node.positions[0].getX(), y, node.positions[0].getZ()); + if(!(tile instanceof TileEntityRebar)) continue; + + TileEntityRebar rebar = (TileEntityRebar) tile; + + progress += rebar.progress; + capacity += 1_000; + lowestLinks.add(rebar); + } + } + + if(capacity > 0 && !lowestLinks.isEmpty()) { + int maxSpeed = 50; + int maxAccept = (int) BobMathUtil.min(capacity - progress, amount, maxSpeed * lowestLinks.size()); + int target = Math.min((progress + maxAccept) / lowestLinks.size(), 1_000); + + for(TileEntityRebar rebar : lowestLinks) { + if(rebar.progress >= target) continue; + int delta = target - rebar.progress; + if(delta > amount) continue; + + rebar.progress += delta; + amount -= delta; + } + } + + return amount; + } + + @Override + public long getDemand(FluidType type, int pressure) { + return 10_000; + } + } + + public static class RebarNode extends GenNode { + + public RebarNode(INetworkProvider provider, BlockPos... positions) { + super(provider, positions); + } + + @Override + public RebarNode setConnections(DirPos... connections) { + super.setConnections(connections); + return this; + } + } + + @Override + public void renderInventoryBlock(Block block, int meta, int modelId, Object renderBlocks) { + + GL11.glPushMatrix(); + RenderBlocks renderer = (RenderBlocks) renderBlocks; + GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); + GL11.glTranslatef(-0.5F, -0.5F, -0.5F); + + double o = 0.25D; + renderer.setRenderBounds(0.4375D - o, 0D, 0.4375D - o, 0.5625D - o, 1D, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D - o, 0D, 0.4375D + o, 0.5625D - o, 1D, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D + o, 0D, 0.4375D - o, 0.5625D + o, 1D, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D + o, 0D, 0.4375D + o, 0.5625D + o, 1D, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + + renderer.setRenderBounds(0D, 0.4375D - o, 0.4375D - o, 1D, 0.5625D - o, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0D, 0.4375D - o, 0.4375D + o, 1D, 0.5625D - o, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0D, 0.4375D + o, 0.4375D - o, 1D, 0.5625D + o, 0.5625D - o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0D, 0.4375D + o, 0.4375D + o, 1D, 0.5625D + o, 0.5625D + o); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + + renderer.setRenderBounds(0.4375D - o, 0.4375D - o, 0D, 0.5625D - o, 0.5625D - o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D - o, 0.4375D + o, 0D, 0.5625D - o, 0.5625D + o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D + o, 0.4375D - o, 0D, 0.5625D + o, 0.5625D - o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + renderer.setRenderBounds(0.4375D + o, 0.4375D + o, 0D, 0.5625D + o, 0.5625D + o, 1D); RenderBlocksNT.renderStandardInventoryBlock(block, meta, renderer); + + GL11.glPopMatrix(); + } + + @Override + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, Object renderBlocks) { + + RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world); + + Tessellator tessellator = Tessellator.instance; + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + tessellator.setColorOpaque_F(1, 1, 1); + + double o = 0.25D; + double min = -0.001; + double max = 1.001; + + if(ClientConfig.RENDER_REBAR_SIMPLE.get()) { + renderer.setRenderBounds(0.4375D, min, 0.4375D, 0.5625D, max, 0.5625D); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(min, 0.4375D, 0.4375D, max, 0.5625D, 0.5625D); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D, 0.4375D, min, 0.5625D, 0.5625D, max); renderer.renderStandardBlock(block, x, y, z); + } else { + renderer.setRenderBounds(0.4375D - o, min, 0.4375D - o, 0.5625D - o, max, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D - o, min, 0.4375D + o, 0.5625D - o, max, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D + o, min, 0.4375D - o, 0.5625D + o, max, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D + o, min, 0.4375D + o, 0.5625D + o, max, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z); + + renderer.setRenderBounds(min, 0.4375D - o, 0.4375D - o, max, 0.5625D - o, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(min, 0.4375D - o, 0.4375D + o, max, 0.5625D - o, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(min, 0.4375D + o, 0.4375D - o, max, 0.5625D + o, 0.5625D - o); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(min, 0.4375D + o, 0.4375D + o, max, 0.5625D + o, 0.5625D + o); renderer.renderStandardBlock(block, x, y, z); + + renderer.setRenderBounds(0.4375D - o, 0.4375D - o, min, 0.5625D - o, 0.5625D - o, max); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D - o, 0.4375D + o, min, 0.5625D - o, 0.5625D + o, max); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D + o, 0.4375D - o, min, 0.5625D + o, 0.5625D - o, max); renderer.renderStandardBlock(block, x, y, z); + renderer.setRenderBounds(0.4375D + o, 0.4375D + o, min, 0.5625D + o, 0.5625D + o, max); renderer.renderStandardBlock(block, x, y, z); + } + + /*TileEntity tile = world.getTileEntity(x, y, z); + if(tile instanceof TileEntityRebar) { + TileEntityRebar rebar = (TileEntityRebar) tile; + if(rebar.progress > 0) { + double height = rebar.progress / 1000D; + renderer.setOverrideBlockTexture(concrete); + renderer.setRenderBounds(0, 0, 0, 1, height, 1); renderer.renderStandardBlock(block, x, y, z); + renderer.clearOverrideBlockTexture(); + } + }*/ + + return true; + } + + // from ModEventHandlerClient.onRenderWorldLastEvent + @SideOnly(Side.CLIENT) + public static void renderRebar(List tiles, float interp) { + + List rebars = new ArrayList(); + for(Object o : tiles) { + if(!(o instanceof TileEntityRebar)) continue; + TileEntityRebar rebar = (TileEntityRebar) o; + if(rebar.progress > 0) rebars.add(rebar); + } + + if(!rebars.isEmpty()) { + + GL11.glPushMatrix(); + GL11.glShadeModel(GL11.GL_SMOOTH); + //RenderHelper.enableStandardItemLighting(); + + EntityRenderer entityRenderer = Minecraft.getMinecraft().entityRenderer; + entityRenderer.enableLightmap(interp); + + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + World world = Minecraft.getMinecraft().theWorld; + + double dx = player.prevPosX + (player.posX - player.prevPosX) * interp; + double dy = player.prevPosY + (player.posY - player.prevPosY) * interp; + double dz = player.prevPosZ + (player.posZ - player.prevPosZ) * interp; + + RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world); + renderer.setOverrideBlockTexture(((BlockRebar) ModBlocks.rebar).concrete); + Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); + + Tessellator tess = Tessellator.instance; + tess.startDrawingQuads(); + + for(TileEntityRebar rebar : rebars) { + tess.setTranslation(-dx, -dy, -dz); + tess.setColorRGBA_F(1F, 1F, 1F, 1F); + renderer.setRenderBounds(0, 0, 0, 1, rebar.progress / 1000D, 1); + renderer.renderStandardBlock(ModBlocks.rebar, rebar.xCoord, rebar.yCoord, rebar.zCoord); + + /*IIcon icon = ((BlockRebar) ModBlocks.rebar).concrete; + double minU = icon.getInterpolatedU(renderer.renderMinX * 16.0D); + double maxU = icon.getInterpolatedU(renderer.renderMaxX * 16.0D); + double minV = icon.getInterpolatedV(renderer.renderMinZ * 16.0D); + double maxV = icon.getInterpolatedV(renderer.renderMaxZ * 16.0D); + + double minX = rebar.xCoord + renderer.renderMinX; + double maxX = rebar.xCoord + renderer.renderMaxX; + double minY = rebar.yCoord + renderer.renderMinY; + double maxY = rebar.yCoord + renderer.renderMaxY; + double minZ = rebar.zCoord + renderer.renderMinZ; + double maxZ = rebar.zCoord + renderer.renderMaxZ; + + //tess.setColorOpaque_F(0.5F, 1F, 1F); + tess.setNormal(0, 1, 0); + tess.addVertexWithUV(maxX, maxY, maxZ, maxU, maxV); + tess.addVertexWithUV(maxX, maxY, minZ, maxU, minV); + tess.addVertexWithUV(minX, maxY, minZ, minU, minV); + tess.addVertexWithUV(minX, maxY, maxZ, minU, maxV);*/ + } + + tess.draw(); + tess.setTranslation(0, 0, 0); + renderer.clearOverrideBlockTexture(); + entityRenderer.disableLightmap(interp); + + GL11.glShadeModel(GL11.GL_FLAT); + GL11.glPopMatrix(); + } + } +} diff --git a/src/main/java/com/hbm/blocks/rail/IRenderBlock.java b/src/main/java/com/hbm/blocks/rail/IRenderBlock.java index 7cf90e9fd..f8b75055e 100644 --- a/src/main/java/com/hbm/blocks/rail/IRenderBlock.java +++ b/src/main/java/com/hbm/blocks/rail/IRenderBlock.java @@ -7,6 +7,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; +@Deprecated public interface IRenderBlock { public static int renderID = RenderingRegistry.getNextAvailableRenderId(); diff --git a/src/main/java/com/hbm/config/ClientConfig.java b/src/main/java/com/hbm/config/ClientConfig.java index 1ddd4cf21..0dc370790 100644 --- a/src/main/java/com/hbm/config/ClientConfig.java +++ b/src/main/java/com/hbm/config/ClientConfig.java @@ -32,6 +32,7 @@ public class ClientConfig extends RunningConfig { public static ConfigWrapper RENDER_REEDS = new ConfigWrapper(!Compat.isModLoaded(Compat.MOD_ANG)); public static ConfigWrapper NEI_HIDE_SECRETS = new ConfigWrapper(true); public static ConfigWrapper COOLING_TOWER_PARTICLES = new ConfigWrapper(true); + public static ConfigWrapper RENDER_REBAR_SIMPLE = new ConfigWrapper(false); private static void initDefaults() { configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL); @@ -53,6 +54,7 @@ public class ClientConfig extends RunningConfig { configMap.put("RENDER_REEDS", RENDER_REEDS); configMap.put("NEI_HIDE_SECRETS", NEI_HIDE_SECRETS); configMap.put("COOLING_TOWER_PARTICLES", COOLING_TOWER_PARTICLES); + configMap.put("RENDER_REBAR_SIMPLE", RENDER_REBAR_SIMPLE); } /** Initializes defaults, then reads the config file if it exists, then writes the config file. */ diff --git a/src/main/java/com/hbm/crafting/ToolRecipes.java b/src/main/java/com/hbm/crafting/ToolRecipes.java index b01ee10cf..d8d52b0ce 100644 --- a/src/main/java/com/hbm/crafting/ToolRecipes.java +++ b/src/main/java/com/hbm/crafting/ToolRecipes.java @@ -160,6 +160,10 @@ public class ToolRecipes { //Bobmazon CraftingManager.addShapelessAuto(new ItemStack(ModItems.bobmazon), new Object[] { Items.book, Items.gold_nugget, Items.string, KEY_BLUE }); + //Blueprints + //CraftingManager.addShapelessAuto(new ItemStack(ModItems.blueprint_folder, 1, 0), new Object[] { ModItems.blueprints, ModItems.blueprints, ModItems.blueprints }); + //CraftingManager.addShapelessAuto(new ItemStack(ModItems.blueprint_folder, 1, 1), new Object[] { ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.blueprints, ModItems.fragment_meteorite }); + //Carts CraftingManager.addRecipeAuto(ItemModMinecart.createCartItem(EnumCartBase.WOOD, EnumMinecart.EMPTY), new Object[] { "P P", "WPW", 'P',KEY_SLAB, 'W', KEY_PLANKS }); CraftingManager.addRecipeAuto(ItemModMinecart.createCartItem(EnumCartBase.STEEL, EnumMinecart.EMPTY), new Object[] { "P P", "IPI", 'P', STEEL.plate(), 'I', STEEL.ingot() }); diff --git a/src/main/java/com/hbm/inventory/fluid/Fluids.java b/src/main/java/com/hbm/inventory/fluid/Fluids.java index cadd39969..b020867c4 100644 --- a/src/main/java/com/hbm/inventory/fluid/Fluids.java +++ b/src/main/java/com/hbm/inventory/fluid/Fluids.java @@ -190,6 +190,7 @@ public class Fluids { public static FluidType SODIUM_ALUMINATE; public static FluidType BAUXITE_SOLUTION; public static FluidType ALUMINA; + public static FluidType CONCRETE; /* Lagacy names for compatibility purposes */ @Deprecated public static FluidType ACID; //JAOPCA uses this, apparently @@ -405,7 +406,8 @@ public class Fluids { SODIUM_ALUMINATE = new FluidType("SODIUM_ALUMINATE", 0xFFD191, 3, 0, 1, EnumSymbol.ACID).addTraits(new FT_Corrosive(30), LIQUID); BAUXITE_SOLUTION = new FluidType("BAUXITE_SOLUTION", 0xE2560F, 3, 0, 3, EnumSymbol.ACID).addTraits(new FT_Corrosive(40), LIQUID, VISCOUS); ALUMINA = new FluidType("ALUMINA", 0xDDFFFF, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID); - AIR = new FluidType(151, "AIR", 0xE7EAEB, 0, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS); + AIR = new FluidType("AIR", 0xE7EAEB, 0, 0, 0, EnumSymbol.NONE).addTraits(GASEOUS); + CONCRETE = new FluidType(152, "CONCRETE", 0xA2A2A2, 0, 0, 0, EnumSymbol.NONE).addTraits(LIQUID); // ^ ^ ^ ^ ^ ^ ^ ^ //ADD NEW FLUIDS HERE @@ -553,6 +555,7 @@ public class Fluids { metaOrder.add(SODIUM_ALUMINATE); metaOrder.add(BAUXITE_SOLUTION); metaOrder.add(ALUMINA); + metaOrder.add(CONCRETE); //solutions and working fluids metaOrder.add(FRACKSOL); metaOrder.add(LYE); diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 1960d4dfb..476cb5e31 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -26,8 +26,6 @@ import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.material.Mats; import com.hbm.inventory.recipes.loader.SerializableRecipe; import com.hbm.items.ModItems; -import com.hbm.items.ItemEnums.EnumCasingType; -import com.hbm.items.ItemEnums.EnumSecretType; import com.hbm.items.ItemGenericPart.EnumPartType; import com.hbm.items.machine.ItemAssemblyTemplate; import com.hbm.items.machine.ItemCircuit.EnumCircuitType; @@ -36,7 +34,6 @@ import com.hbm.items.machine.ItemPACoil.EnumCoilType; import com.hbm.items.machine.ItemPistons.EnumPistonType; import com.hbm.items.weapon.ItemAmmoHIMARS; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; -import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret; import com.hbm.main.MainRegistry; import cpw.mods.fml.common.Loader; @@ -98,7 +95,6 @@ public class AssemblerRecipes extends SerializableRecipe { makeRecipe(new ComparableStack(ModItems.warhead_volcano, 1), new AStack[] {new OreDictStack(TI.plate(), 24), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_nuke, 3), new OreDictStack(U238.block(), 24), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.CAPACITOR_BOARD.ordinal()) }, 600); makeRecipe(new ComparableStack(ModItems.missile_stealth, 1), new AStack[] { new OreDictStack(TI.plate(), 20), new OreDictStack(AL.plate(), 20), new OreDictStack(CU.plate(), 10), new OreDictStack(KEY_BLACK, 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(STEEL.bolt(), 32) },1200); makeRecipe(new ComparableStack(ModItems.thruster_nuclear, 1), new AStack[] {new OreDictStack(DURA.ingot(), 32), new OreDictStack(B.ingot(), 8), new OreDictStack(PB.plate(), 16), new ComparableStack(ModItems.pipes_steel) },600); - makeRecipe(new ComparableStack(ModItems.tritium_deuterium_cake, 1), new AStack[] {new ComparableStack(ModItems.cell_deuterium, 6), new ComparableStack(ModItems.cell_tritium, 2), new OreDictStack(LI.ingot(), 4), },150); makeRecipe(new ComparableStack(ModItems.pellet_cluster, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new ComparableStack(Blocks.tnt, 1), }, 50); makeRecipe(new ComparableStack(ModItems.pellet_buckshot, 1), new AStack[] {new OreDictStack(PB.nugget(), 6), }, 50); makeRecipe(new ComparableStack(ModItems.magnetron, 1), new AStack[] {new OreDictStack(CU.plate(), 3), new OreDictStack(W.wireFine(), 4), }, 40); @@ -157,7 +153,6 @@ public class AssemblerRecipes extends SerializableRecipe { makeRecipe(new ComparableStack(ModBlocks.nuke_fleija, 1), new AStack[] {new OreDictStack(AL.shell(), 1), new ComparableStack(ModItems.fins_quad_titanium, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new OreDictStack("dyeWhite", 4), },400); makeRecipe(new ComparableStack(ModBlocks.nuke_solinium, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_quad_titanium, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CONTROLLER), new OreDictStack("dyeGray", 8), },400); makeRecipe(new ComparableStack(ModBlocks.nuke_n2, 1), new AStack[] {new OreDictStack(STEEL.shell(), 6), new OreDictStack(MAGTUNG.wireFine(), 12), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.CONTROLLER), new OreDictStack("dyeBlack", 8), },300); - makeRecipe(new ComparableStack(ModBlocks.nuke_fstbmb, 1), new AStack[] {new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(TI.shell(), 6), new ComparableStack(ModItems.fins_big_steel, 1), new ComparableStack(ModItems.powder_magic, 8), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CONTROLLER_ADVANCED), new OreDictStack("dyeGray", 8), },600, ModItems.journal_pip, ModItems.journal_bj); makeRecipe(new ComparableStack(ModBlocks.nuke_custom, 1), new AStack[] {new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.fins_small_steel, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.CONTROLLER_ADVANCED), new OreDictStack("dyeGray", 4), },300); makeRecipe(new ComparableStack(ModBlocks.float_bomb, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new OreDictStack(GOLD.wireDense(), 8), },250); makeRecipe(new ComparableStack(ModBlocks.therm_endo, 1), new AStack[] {new OreDictStack(TI.plate(), 12), new ComparableStack(ModItems.powder_ice, 32), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_gold, 4), },250); @@ -237,13 +232,13 @@ public class AssemblerRecipes extends SerializableRecipe { makeRecipe(new ComparableStack(ModItems.mp_warhead_10_buster, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(TI.plate(), 4), new ComparableStack(ModBlocks.det_charge, 1), new ComparableStack(ModBlocks.det_cord, 4), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC), },100); makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 6), new OreDictStack(PU239.ingot(), 1), new OreDictStack(OreDictManager.getReflector(), 2), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), },200); makeRecipe(new ComparableStack(ModItems.mp_warhead_10_nuclear_large, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(AL.plate(), 4), new OreDictStack(PU239.ingot(), 2), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit,3, EnumCircuitType.ADVANCED), },300); - makeRecipe(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.powder_magic, 12), new ComparableStack(ModItems.bucket_mud, 1), },100, ModItems.journal_pip); - makeRecipe(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.grenade_pink_cloud, 2), },100, ModItems.journal_pip); + makeRecipe(new ComparableStack(ModItems.mp_warhead_10_taint, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.powder_magic, 12), new ComparableStack(ModItems.bucket_mud, 1), },100); + makeRecipe(new ComparableStack(ModItems.mp_warhead_10_cloud, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 12), new ComparableStack(ModBlocks.det_cord, 2), new ComparableStack(ModItems.grenade_pink_cloud, 2), },100); makeRecipe(new ComparableStack(ModItems.mp_warhead_15_he, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200); makeRecipe(new ComparableStack(ModItems.mp_warhead_15_incendiary, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModBlocks.det_charge, 2), new OreDictStack(P_RED.dust(), 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC), },200); makeRecipe(new ComparableStack(ModItems.mp_warhead_15_nuclear, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 24), new OreDictStack(TI.plate(), 12), new OreDictStack(PU239.ingot(), 3), new ComparableStack(ModBlocks.det_charge, 6), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.ADVANCED), },500); makeRecipe(new ComparableStack(ModItems.mp_warhead_15_n2, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(STEEL.plate(), 8), new OreDictStack(TI.plate(), 20), new ComparableStack(ModBlocks.det_charge, 24), new ComparableStack(Blocks.redstone_block, 12), new OreDictStack(MAGTUNG.dust(), 6), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), },400); - makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), }, 60, ModItems.journal_bj); + makeRecipe(new ComparableStack(ModItems.mp_warhead_15_balefire, 1), new AStack[] {new ComparableStack(ModItems.seg_15, 1), new OreDictStack(OreDictManager.getReflector(), 16), new ComparableStack(ModItems.powder_magic, 6), new ComparableStack(ModItems.egg_balefire_shard, 4), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 8), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), }, 60); makeRecipe(new ComparableStack(ModItems.fusion_shield_tungsten, 1), new AStack[] {new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96)}, 600); makeRecipe(new ComparableStack(ModItems.fusion_shield_desh, 1), new AStack[] {new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96)}, 600); makeRecipe(new ComparableStack(ModItems.fusion_shield_chlorophyte, 1), new AStack[] {new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48)}, 600); @@ -258,15 +253,6 @@ public class AssemblerRecipes extends SerializableRecipe { new ComparableStack(ModItems.part_generic, 32, EnumPartType.LDE) },600); - makeRecipe(new ComparableStack(ModItems.missile_soyuz_lander, 1), new AStack[] { - new OreDictStack(AL.shell(), 4), - new OreDictStack(RUBBER.ingot(), 16), - new ComparableStack(ModItems.rocket_fuel, 16), - new ComparableStack(ModItems.thruster_small, 3), - new ComparableStack(ModItems.circuit, 3, EnumCircuitType.CONTROLLER_ADVANCED), - new ComparableStack(ModItems.part_generic, 12, EnumPartType.LDE) - },600, ModItems.journal_bj); - makeRecipe(new ComparableStack(ModItems.sat_base, 1), new AStack[] { new OreDictStack(RUBBER.ingot(), 12), new OreDictStack(TI.shell(), 3), @@ -397,7 +383,7 @@ public class AssemblerRecipes extends SerializableRecipe { new OreDictStack(STEEL.plate528(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), - new ComparableStack(ModItems.tank_steel, 4), + new OreDictStack(STEEL.shell(), 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC) }, 300); @@ -405,7 +391,7 @@ public class AssemblerRecipes extends SerializableRecipe { new ComparableStack(ModItems.ingot_firebrick, 12), new OreDictStack(STEEL.plateCast(), 6), new OreDictStack(CU.plateWelded(), 2), - new ComparableStack(ModItems.tank_steel, 2), + new OreDictStack(STEEL.shell(), 2), new OreDictStack(ANY_CONCRETE.any(), 8) }, 100); @@ -573,15 +559,6 @@ public class AssemblerRecipes extends SerializableRecipe { new ComparableStack(ModItems.coin_worm, 1) }, 1200); - makeRecipe(new ComparableStack(ModItems.sat_gerald, 1), new AStack[] { - new OreDictStack(SBD.plateCast(), 128), - new OreDictStack(BSCCO.wireDense(), 128), - new ComparableStack(ModBlocks.det_nuke, 64), - new ComparableStack(ModItems.part_generic, 256, EnumPartType.HDE), - new ComparableStack(ModItems.circuit, 64, EnumCircuitType.CONTROLLER_QUANTUM), - new ComparableStack(ModItems.coin_ufo, 1), - }, 1200, ModItems.journal_bj); - makeRecipe(new ComparableStack(ModBlocks.vault_door, 1), new AStack[] { new OreDictStack(STEEL.ingot(), 32), new OreDictStack(W.ingot(), 32), @@ -785,18 +762,6 @@ public class AssemblerRecipes extends SerializableRecipe { new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), }, 100); - makeRecipe(new ComparableStack(ModItems.ammo_standard, 6, EnumAmmo.BMG50_SM), new AStack[] { - new ComparableStack(ModItems.casing, 1, EnumCasingType.LARGE_STEEL), - new OreDictStack(ANY_SMOKELESS.dust(), 6), - new OreDictStack(STAR.ingot(), 3), - }, 100, ModItems.journal_silver); - makeRecipe(new ComparableStack(ModItems.ammo_secret, 12, EnumAmmoSecret.BMG50_BLACK), new AStack[] { - new ComparableStack(ModItems.casing, 2, EnumCasingType.LARGE_STEEL), - new OreDictStack(ANY_SMOKELESS.dust(), 24), - new ComparableStack(ModItems.item_secret, 1, EnumSecretType.SELENIUM_STEEL), - new ComparableStack(ModItems.black_diamond), - }, 1200, ModItems.journal_silver); - makeRecipe(new ComparableStack(ModBlocks.machine_silex, 1), new AStack[] { new ComparableStack(ModBlocks.glass_quartz, 16), !exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 1), @@ -929,8 +894,8 @@ public class AssemblerRecipes extends SerializableRecipe { !exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 2), !exp ? new OreDictStack(CU.plate528(), 16) : new OreDictStack(CU.heavyComp(), 1), new OreDictStack(RUBBER.ingot(), 8), + new OreDictStack(STEEL.shell(), 3), new ComparableStack(ModItems.ingot_firebrick, 16), - new ComparableStack(ModItems.tank_steel, 3), new ComparableStack(ModItems.coil_copper, 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC) }, 200); @@ -1112,7 +1077,6 @@ public class AssemblerRecipes extends SerializableRecipe { if(!GeneralConfig.enable528) { makeRecipe(new ComparableStack(ModBlocks.machine_hephaestus, 1), new AStack[] { new OreDictStack(STEEL.pipe(), 12), !exp ? new OreDictStack(STEEL.ingot(), 24) : new OreDictStack(STEEL.heavyComp(), 2), !exp ? new OreDictStack(CU.plate(), 24) : new OreDictStack(CU.heavyComp(), 2), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16) }, 150); - makeRecipe(new ComparableStack(ModBlocks.machine_radgen, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.coil_magnetized_tungsten, 6), new OreDictStack(MAGTUNG.wireFine(), 24), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC), new ComparableStack(ModItems.reactor_core, 3), new OreDictStack(STAR.ingot(), 1), new OreDictStack("dyeRed", 1), }, 400, ModItems.journal_pip); makeRecipe(new ComparableStack(ModBlocks.machine_reactor_breeding, 1), new AStack[] {new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1)},150); makeRecipe(new ComparableStack(ModBlocks.reactor_research, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.motor_desh, 2), new OreDictStack(B.ingot(), 5), new OreDictStack(PB.plate(), 8), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC), },300); @@ -1206,8 +1170,8 @@ public class AssemblerRecipes extends SerializableRecipe { new ComparableStack(ModItems.motor_desh, 2), !exp ? new ComparableStack(ModItems.plate_desh, 6) : new OreDictStack(DESH.heavyComp()), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR), - new ComparableStack(ModItems.tank_steel, 24), - new ComparableStack(ModItems.pipes_steel, 2) + new OreDictStack(STEEL.shell(), 16), + new OreDictStack(STEEL.pipe(), 12) }, 600); makeRecipe(new ComparableStack(ModBlocks.machine_catalytic_cracker), new AStack[] { @@ -1243,8 +1207,8 @@ public class AssemblerRecipes extends SerializableRecipe { new OreDictStack(RUBBER.ingot(), 8), new OreDictStack(PB.plate528(), 12), new OreDictStack(CU.plateCast(), 4), - new ComparableStack(ModItems.thermo_element, 8), - new ComparableStack(ModItems.tank_steel, 3) + new OreDictStack(STEEL.shell(), 2), + new ComparableStack(ModItems.thermo_element, 8) }, 200); makeRecipe(new ComparableStack(ModBlocks.transition_seal, 1), new AStack[]{ diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java index 472a33cc1..1406819af 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java @@ -284,7 +284,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.dieselgen").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_diesel, 1)) .inputItems(new OreDictStack(STEEL.shell(), 1), new OreDictStack(CU.plateCast(), 2), new ComparableStack(ModItems.coil_copper, 4))); this.register(new GenericRecipe("ass.combustiongen").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_combustion_engine, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new ComparableStack(ModItems.tank_steel, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC))); + .inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new ComparableStack(ModItems.canister_empty, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC))); this.register(new GenericRecipe("ass.pistonsetsteel").setup(200, 100).outputItems(new ItemStack(ModItems.piston_set, 1, EnumPistonType.STEEL.ordinal())) .inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(CU.plate(), 4), new OreDictStack(W.ingot(), 8), new OreDictStack(W.bolt(), 16))); this.register(new GenericRecipe("ass.pistonsetdura").setup(200, 100).outputItems(new ItemStack(ModItems.piston_set, 1, EnumPistonType.DURA.ordinal())) @@ -356,10 +356,10 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new ComparableStack(ModBlocks.pa_beamline, 3), new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.QUANTUM))); this.register(new GenericRecipe("ass.detector").setup(400, 100).outputItems(new ItemStack(ModBlocks.pa_detector, 1)) .inputItems(new ComparableStack(ModBlocks.pa_beamline, 3), new OreDictStack(STEEL.plateCast(), 24), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.QUANTUM))); - this.register(new GenericRecipe("ass.pagold").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.GOLD.ordinal())).inputItems(new OreDictStack(GOLD.wireDense(), 128))); + this.register(new GenericRecipe("ass.pagold").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.GOLD.ordinal())).inputItems(new OreDictStack(GOLD.wireDense(), 64), new OreDictStack(GOLD.wireDense(), 64))); this.register(new GenericRecipe("ass.panbti").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.NIOBIUM.ordinal())).inputItems(new OreDictStack(NB.wireDense(), 64), new OreDictStack(TI.wireDense(), 64))); this.register(new GenericRecipe("ass.pabscco").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.BSCCO.ordinal())).inputItems(new OreDictStack(BSCCO.wireDense(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64))); - this.register(new GenericRecipe("ass.pachlorophyte").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.CHLOROPHYTE.ordinal())).inputItems(new OreDictStack(CU.wireDense(), 128), new ComparableStack(ModItems.powder_chlorophyte, 16))); + this.register(new GenericRecipe("ass.pachlorophyte").setup(400, 100).outputItems(new ItemStack(ModItems.pa_coil, 1, EnumCoilType.CHLOROPHYTE.ordinal())).inputItems(new OreDictStack(CU.wireDense(), 64), new OreDictStack(CU.wireDense(), 64), new ComparableStack(ModItems.powder_chlorophyte, 16))); this.register(new GenericRecipe("ass.exposurechamber").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_exposure_chamber, 1)) .inputItems(new OreDictStack(AL.plateCast(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_HARDPLASTIC.ingot(), 12), new OreDictStack(ALLOY.wireDense(), 32), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModBlocks.capacitor_tantalium, 1), new ComparableStack(ModBlocks.glass_quartz, 16))); @@ -385,9 +385,9 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.fusionheater").setup(200, 100).outputItems(new ItemStack(ModBlocks.fusion_heater, 4)) .inputItems(new OreDictStack(W.plateWelded(), 2), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 2))); this.register(new GenericRecipe("ass.blankettungsten").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_tungsten, 1)) - .inputItems(new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 96))); + .inputItems(new OreDictStack(W.block(), 32), new OreDictStack(OreDictManager.getReflector(), 64))); this.register(new GenericRecipe("ass.blanketdesh").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_desh, 1)) - .inputItems(new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 96))); + .inputItems(new OreDictStack(DESH.block(), 16), new OreDictStack(CO.block(), 16), new OreDictStack(BIGMT.plate(), 64))); this.register(new GenericRecipe("ass.blanketchlorophyte").setup(600, 100).outputItems(new ItemStack(ModItems.fusion_shield_chlorophyte, 1)) .inputItems(new OreDictStack(W.block(), 16), new OreDictStack(DURA.block(), 16), new OreDictStack(OreDictManager.getReflector(), 48), new ComparableStack(ModItems.powder_chlorophyte, 48))); @@ -579,9 +579,9 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.fritz").setup(200, 100).outputItems(new ItemStack(ModBlocks.turret_fritz, 1)) .inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(GUNMETAL.mechanism(), 3), new ComparableStack(ModBlocks.barrel_steel))); this.register(new GenericRecipe("ass.arty").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_arty, 1)) - .inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 128), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))); + .inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ADVANCED), new OreDictStack(STEEL.pipe(), 12), new OreDictStack(WEAPONSTEEL.mechanism(), 16), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))); this.register(new GenericRecipe("ass.himars").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.turret_himars, 1)) - .inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 128), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))); + .inputItems(new ComparableStack(ModBlocks.machine_battery, 1), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(STEEL.ingot(), 64), new OreDictStack(ANY_PLASTIC.ingot(), 64), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.ADVANCED), new OreDictStack(BIGMT.mechanism(), 8), new ComparableStack(ModBlocks.machine_radar, 1), new ComparableStack(ModItems.crt_display, 1))); this.register(new GenericRecipe("ass.himarssmall").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL)) .inputItems(new OreDictStack(STEEL.plate(), 24), new OreDictStack(ANY_PLASTIC.ingot(), 12), new ComparableStack(ModItems.rocket_fuel, 48), new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 48), new ComparableStack(ModItems.circuit, 6, EnumCircuitType.BASIC))); this.register(new GenericRecipe("ass.himarssmallhe").setup(100, 100).outputItems(new ItemStack(ModItems.ammo_himars, 1, ItemAmmoHIMARS.SMALL_HE)) diff --git a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java index 4bbf1074c..ca0228ca0 100644 --- a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java @@ -60,7 +60,7 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.xenonoxy").setupNamed(20, 1_000).setIcon(ModItems.gas_full, Fluids.XENON.getID()) .inputFluids(new FluidStack(Fluids.AIR, 8_000), new FluidStack(Fluids.OXYGEN, 250)) - .outputFluids(new FluidStack(Fluids.XENON, 50))); + .outputFluids(new FluidStack(Fluids.XENON, 50)).setPools(GenericRecipes.POOL_PREFIX_ALT + ".xenonoxy")); this.register(new GenericRecipe("chem.helium3").setupNamed(200, 2_000).setIcon(ModItems.gas_full, Fluids.HELIUM3.getID()) .inputItems(new ComparableStack(ModBlocks.moon_turf, 8)) @@ -131,6 +131,11 @@ public class ChemicalPlantRecipes extends GenericRecipes { .inputFluids(new FluidStack(Fluids.WATER, 2_000)) .outputItems(new ItemStack(ModBlocks.ducrete_smooth, 8))); + this.register(new GenericRecipe("chem.liquidconk").setup(100, 100) + .inputItems(new ComparableStack(ModItems.powder_cement, 1), new ComparableStack(Blocks.gravel, 8), new OreDictStack(KEY_SAND, 8)) + .inputFluids(new FluidStack(Fluids.WATER, 2_000)) + .outputFluids(new FluidStack(Fluids.CONCRETE, 16_000))); + this.register(new GenericRecipe("chem.asphalt").setup(100, 100) .inputItems(new ComparableStack(Blocks.gravel, 2), new OreDictStack(KEY_SAND, 6)) .inputFluids(new FluidStack(Fluids.BITUMEN, 1_000)) @@ -209,7 +214,7 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.birkeland").setupNamed(200, 5_000) .inputFluids(new FluidStack(Fluids.AIR, 8_000), new FluidStack(Fluids.WATER, 2_000)) - .outputFluids(new FluidStack(Fluids.NITRIC_ACID, 1_000))); + .outputFluids(new FluidStack(Fluids.NITRIC_ACID, 1_000)).setPools(GenericRecipes.POOL_PREFIX_ALT + ".birkeland")); this.register(new GenericRecipe("chem.schrabidic").setup(100, 5_000) .inputItems(new ComparableStack(ModItems.pellet_charged)) diff --git a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java index 264e67cda..0f98be052 100644 --- a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java +++ b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipe.java @@ -57,7 +57,7 @@ public class GenericRecipe { public GenericRecipe setNamed() { this.customLocalization = true; return this; } public GenericRecipe setPools(String... pools) { this.blueprintPools = pools; for(String pool : pools) GenericRecipes.addToPool(pool, this); return this; } - public GenericRecipe inputItems(AStack... input) { this.inputItem = input; return this; } + public GenericRecipe inputItems(AStack... input) { this.inputItem = input; for(AStack stack : this.inputItem) if(stack.stacksize > 64) throw new IllegalArgumentException("AStack in " + this.name + " exceeds stack limit!"); return this; } public GenericRecipe inputFluids(FluidStack... input) { this.inputFluid = input; return this; } public GenericRecipe outputItems(IOutput... output) { this.outputItem = output; return this; } public GenericRecipe outputFluids(FluidStack... output) { this.outputFluid = output; return this; } diff --git a/src/main/java/com/hbm/itempool/ItemPoolsComponent.java b/src/main/java/com/hbm/itempool/ItemPoolsComponent.java index 7bbeea0e0..8f1a78633 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsComponent.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsComponent.java @@ -50,7 +50,8 @@ public class ItemPoolsComponent { weighted(ModItems.circuit, EnumCircuitType.VACUUM_TUBE.ordinal(), 1, 2, 4), weighted(ModItems.circuit, EnumCircuitType.PCB.ordinal(), 1, 3, 5), weighted(ModItems.circuit, EnumCircuitType.CAPACITOR.ordinal(), 1, 1, 3), - weighted(ModItems.blade_titanium, 0, 1, 8, 1) + weighted(ModItems.blade_titanium, 0, 1, 8, 1), + weighted(ModItems.blueprint_folder, 0, 1, 1, 1) }; }}; @@ -123,7 +124,8 @@ public class ItemPoolsComponent { weighted(ModItems.toothpicks, 0, 1, 16, 10), weighted(ModItems.dust, 0, 1, 1, 40), weighted(ModItems.dust_tiny, 0, 1, 3, 75), - weighted(ModItems.ink, 0, 1, 1, 1) + weighted(ModItems.ink, 0, 1, 1, 1), + weighted(ModItems.blueprint_folder, 0, 1, 1, 5) }; }}; diff --git a/src/main/java/com/hbm/itempool/ItemPoolsLegacy.java b/src/main/java/com/hbm/itempool/ItemPoolsLegacy.java index 289a495e9..31d43ed4f 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsLegacy.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsLegacy.java @@ -64,7 +64,8 @@ public class ItemPoolsLegacy { weighted(ModItems.canister_full, Fluids.DIESEL.getID(), 1, 2, 2), weighted(ModItems.canister_full, Fluids.BIOFUEL.getID(), 1, 2, 3), weighted(ModItems.gas_mask_m65, 60, 1, 1, 2), - weighted(ModItems.gas_mask_filter, 0, 1, 1, 3) + weighted(ModItems.gas_mask_filter, 0, 1, 1, 3), + weighted(ModItems.blueprint_folder, 0, 1, 1, 1) }; }}; @@ -132,6 +133,7 @@ public class ItemPoolsLegacy { weighted(ModItems.gas_mask_filter, 0, 1, 1, 4), weighted(ModItems.launch_code_piece, 0, 1, 1, 1), weighted(ModItems.gun_double_barrel, 0, 1, 1, 1), + weighted(ModItems.blueprint_folder, 1, 1, 1, 1) }; }}; diff --git a/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java b/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java index 4b1c88353..44393be00 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsRedRoom.java @@ -59,6 +59,7 @@ public class ItemPoolsRedRoom { weighted(ModItems.item_secret, EnumSecretType.SELENIUM_STEEL.ordinal(), 4, 4, 10), weighted(ModItems.item_secret, EnumSecretType.CONTROLLER.ordinal(), 1, 1, 10), weighted(ModItems.item_secret, EnumSecretType.CANISTER.ordinal(), 1, 1, 10), + weighted(ModItems.blueprint_folder, 2, 1, 1, 1), }; }}; } diff --git a/src/main/java/com/hbm/itempool/ItemPoolsSingle.java b/src/main/java/com/hbm/itempool/ItemPoolsSingle.java index 47c0a9c17..f8dd79f0a 100644 --- a/src/main/java/com/hbm/itempool/ItemPoolsSingle.java +++ b/src/main/java/com/hbm/itempool/ItemPoolsSingle.java @@ -124,6 +124,7 @@ public class ItemPoolsSingle { weighted(ModItems.launch_code_piece, 0, 1, 1, 5), weighted(ModItems.egg_glyphid, 0, 1, 1, 5), weighted(ModItems.gem_alexandrite, 0, 1, 1, 1), + weighted(ModItems.blueprint_folder, 1, 1, 1, 1) }; }}; } diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 5724185f5..ca9456f9d 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1186,10 +1186,8 @@ public class ModItems { public static Item settings_tool; public static Item blueprints; + public static Item blueprint_folder; public static Item template_folder; - @Deprecated public static Item journal_pip; - @Deprecated public static Item journal_bj; - @Deprecated public static Item journal_silver; @Deprecated public static Item assembly_template; @Deprecated public static Item chemistry_template; @Deprecated public static Item chemistry_icon; @@ -4103,10 +4101,8 @@ public class ModItems { mech_key = new ItemCustomLore().setUnlocalizedName("mech_key").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":mech_key"); blueprints = new ItemBlueprints().setUnlocalizedName("blueprints").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprints"); + blueprint_folder = new ItemBlueprintFolder().setUnlocalizedName("blueprint_folder").setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":blueprint_folder"); template_folder = new ItemTemplateFolder().setUnlocalizedName("template_folder").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":template_folder"); - journal_pip = new ItemTemplateFolder().setUnlocalizedName("journal_pip").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_pip"); - journal_bj = new ItemTemplateFolder().setUnlocalizedName("journal_bj").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_bj"); - journal_silver = new ItemTemplateFolder().setUnlocalizedName("journal_silver").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":journal_silver"); assembly_template = new ItemAssemblyTemplate().setUnlocalizedName("assembly_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":assembly_template"); chemistry_template = new ItemChemistryTemplate().setUnlocalizedName("chemistry_template").setMaxStackSize(1).setCreativeTab(MainRegistry.templateTab).setTextureName(RefStrings.MODID + ":chemistry_template"); chemistry_icon = new ItemChemistryIcon().setUnlocalizedName("chemistry_icon").setMaxStackSize(1).setCreativeTab(null); @@ -5754,10 +5750,8 @@ public class ModItems { //Folders GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName()); + GameRegistry.registerItem(blueprint_folder, blueprint_folder.getUnlocalizedName()); GameRegistry.registerItem(template_folder, template_folder.getUnlocalizedName()); - GameRegistry.registerItem(journal_pip, journal_pip.getUnlocalizedName()); - GameRegistry.registerItem(journal_bj, journal_bj.getUnlocalizedName()); - GameRegistry.registerItem(journal_silver, journal_silver.getUnlocalizedName()); GameRegistry.registerItem(bobmazon, bobmazon.getUnlocalizedName()); GameRegistry.registerItem(bobmazon_hidden, bobmazon_hidden.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemBlueprintFolder.java b/src/main/java/com/hbm/items/machine/ItemBlueprintFolder.java new file mode 100644 index 000000000..a6fe26c04 --- /dev/null +++ b/src/main/java/com/hbm/items/machine/ItemBlueprintFolder.java @@ -0,0 +1,72 @@ +package com.hbm.items.machine; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.inventory.recipes.loader.GenericRecipes; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; + +public class ItemBlueprintFolder extends Item { + + @SideOnly(Side.CLIENT) protected IIcon iconDiscover; + @SideOnly(Side.CLIENT) protected IIcon iconSecret; + + public ItemBlueprintFolder() { + this.setHasSubtypes(true); + this.setMaxStackSize(1); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister reg) { + super.registerIcons(reg); + this.iconDiscover = reg.registerIcon(this.getIconString() + "_discover"); + this.iconSecret = reg.registerIcon(this.getIconString() + "_secret"); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamage(int meta) { + return meta == 1 ? iconDiscover : meta == 2 ? iconSecret : itemIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void getSubItems(Item item, CreativeTabs tab, List list) { + for(int i = 0; i < 2; i++) list.add(new ItemStack(item, 1, i)); + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if(world.isRemote) return stack; + + List pools = new ArrayList(); + + for(String pool : GenericRecipes.blueprintPools.keySet()) { + if(stack.getItemDamage() == 0 && pool.startsWith(GenericRecipes.POOL_PREFIX_ALT)) pools.add(pool); + if(stack.getItemDamage() == 1 && pool.startsWith(GenericRecipes.POOL_PREFIX_DISCOVER)) pools.add(pool); + if(stack.getItemDamage() == 2 && pool.startsWith(GenericRecipes.POOL_PREFIX_SECRET)) pools.add(pool); + } + + if(!pools.isEmpty()) { + stack.stackSize--; + + String chosen = pools.get(player.getRNG().nextInt(pools.size())); + ItemStack blueprint = ItemBlueprints.make(chosen); + + if(!player.inventory.addItemStackToInventory(blueprint)) + player.dropPlayerItemWithRandomChoice(blueprint, false); + } + + return stack; + } +} diff --git a/src/main/java/com/hbm/items/machine/ItemCatalyst.java b/src/main/java/com/hbm/items/machine/ItemCatalyst.java index 99ffe4a11..25dae2545 100644 --- a/src/main/java/com/hbm/items/machine/ItemCatalyst.java +++ b/src/main/java/com/hbm/items/machine/ItemCatalyst.java @@ -37,12 +37,6 @@ public class ItemCatalyst extends Item { @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - /*list.add("Absolute Energy Bonus: " + powerAbs + "HE"); - list.add("Energy Modifier: " + (powerMod >= 1 ? "+" : "") + (Math.round(powerMod * 1000) * .10 - 100) + "%"); - list.add("Heat Modifier: " + (heatMod >= 1 ? "+" : "") + (Math.round(heatMod * 1000) * .10 - 100) + "%"); - list.add("Fuel Modifier: " + (fuelMod >= 1 ? "+" : "") + (Math.round(fuelMod * 1000) * .10 - 100) + "%");*/ - //TODO: do something useful with this - list.add("Adds spice to the core."); list.add("Look at all those colors!"); } diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index d2262372e..4788a6fd0 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -458,6 +458,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 4), new Object[] { "SS", "SS", 'S', ModBlocks.steel_beam }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate_wide), 4), new Object[] { "SS", 'S', ModBlocks.steel_grate }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 1), new Object[] { "SS", 'S', ModBlocks.steel_grate_wide }); + addRecipeAuto(new ItemStack(ModBlocks.rebar, 1), new Object[] { "BB", "BB", 'B', STEEL.bolt() }); addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 0), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeGray" }); addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 1), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeRed" }); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 8588f66c2..dffae8513 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -1718,6 +1718,9 @@ public class MainRegistry { ignoreMappings.add("hbm:item.component_limiter"); ignoreMappings.add("hbm:item.bottle2_korl_special"); ignoreMappings.add("hbm:item.bottle2_fritz_special"); + ignoreMappings.add("hbm:item.journal_pip"); + ignoreMappings.add("hbm:item.journal_bj"); + ignoreMappings.add("hbm:item.journal_silver"); /// REMAP /// remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index ea71876e6..ed62ac103 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -3,6 +3,7 @@ package com.hbm.main; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockAshes; +import com.hbm.blocks.generic.BlockRebar; import com.hbm.config.ClientConfig; import com.hbm.config.GeneralConfig; import com.hbm.entity.mob.EntityHunterChopper; @@ -924,9 +925,9 @@ public class ModEventHandlerClient { ); String prefix = "Gun "; - int gunScale = 16; - int defaultScale = 1; - int slotScale = gunScale; + //int gunScale = 16; + //int defaultScale = 1; + int slotScale = 16; boolean ignoreNonNTM = true; boolean onlyGuns = true; @@ -1138,6 +1139,8 @@ public class ModEventHandlerClient { public void onRenderWorldLastEvent(RenderWorldLastEvent event) { Clock.update(); + + BlockRebar.renderRebar(Minecraft.getMinecraft().theWorld.loadedTileEntityList, event.partialTicks); GL11.glPushMatrix(); diff --git a/src/main/java/com/hbm/render/util/HorsePronter.java b/src/main/java/com/hbm/render/util/HorsePronter.java index bec1e9ef6..117f58db0 100644 --- a/src/main/java/com/hbm/render/util/HorsePronter.java +++ b/src/main/java/com/hbm/render/util/HorsePronter.java @@ -123,7 +123,7 @@ public class HorsePronter { GL11.glTranslated(offset.xCoord, offset.yCoord, offset.zCoord); GL11.glRotated(rotation.xCoord, 0, 1, 0); GL11.glRotated(rotation.yCoord, 1, 0, 0); - GL11.glRotated(rotation.zCoord, 0, 0, 1); //TODO: check pitch and roll axis + GL11.glRotated(rotation.zCoord, 0, 0, 1); GL11.glTranslated(-offset.xCoord, -offset.yCoord, -offset.zCoord); } diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 1337d34c0..3b7676d73 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -14,6 +14,7 @@ import com.hbm.blocks.generic.BlockGlyphidSpawner.TileEntityGlpyhidSpawner; import com.hbm.blocks.generic.BlockLoot.TileEntityLoot; import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal; import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie; +import com.hbm.blocks.generic.BlockRebar.TileEntityRebar; import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder; import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe; import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate; @@ -456,6 +457,8 @@ public class TileMappings { put(TileEntityRailSwitch.class, "tileentity_rail_switch"); + put(TileEntityRebar.class, "tileentity_rebar"); + // OC Compat items boolean ocPresent = Loader.isModLoaded("OpenComputers"); diff --git a/src/main/java/com/hbm/uninos/NodeNet.java b/src/main/java/com/hbm/uninos/NodeNet.java index f37446cec..eb4c99233 100644 --- a/src/main/java/com/hbm/uninos/NodeNet.java +++ b/src/main/java/com/hbm/uninos/NodeNet.java @@ -2,7 +2,7 @@ package com.hbm.uninos; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Random; import java.util.Set; @@ -16,7 +16,7 @@ public abstract class NodeNet { public static Random rand = new Random(); public boolean valid = true; - public Set links = new HashSet(); + public Set links = new LinkedHashSet(); public HashMap receiverEntries = new HashMap(); public HashMap providerEntries = new HashMap(); diff --git a/src/main/java/com/hbm/uninos/networkproviders/PneumaticNetworkProvider.java b/src/main/java/com/hbm/uninos/networkproviders/PneumaticNetworkProvider.java index 330db1821..47d7c108f 100644 --- a/src/main/java/com/hbm/uninos/networkproviders/PneumaticNetworkProvider.java +++ b/src/main/java/com/hbm/uninos/networkproviders/PneumaticNetworkProvider.java @@ -2,7 +2,7 @@ package com.hbm.uninos.networkproviders; import com.hbm.uninos.INetworkProvider; -public class PneumaticNetworkProvider implements INetworkProvider{ +public class PneumaticNetworkProvider implements INetworkProvider { public static PneumaticNetworkProvider THE_PROVIDER = new PneumaticNetworkProvider(); diff --git a/src/main/java/com/hbm/uninos/networkproviders/RebarNetwork.java b/src/main/java/com/hbm/uninos/networkproviders/RebarNetwork.java new file mode 100644 index 000000000..23afb5ad8 --- /dev/null +++ b/src/main/java/com/hbm/uninos/networkproviders/RebarNetwork.java @@ -0,0 +1,9 @@ +package com.hbm.uninos.networkproviders; + +import com.hbm.uninos.NodeNet; + +public class RebarNetwork extends NodeNet { + + @Override + public void update() { } +} diff --git a/src/main/java/com/hbm/uninos/networkproviders/RebarNetworkProvider.java b/src/main/java/com/hbm/uninos/networkproviders/RebarNetworkProvider.java new file mode 100644 index 000000000..df9b22707 --- /dev/null +++ b/src/main/java/com/hbm/uninos/networkproviders/RebarNetworkProvider.java @@ -0,0 +1,13 @@ +package com.hbm.uninos.networkproviders; + +import com.hbm.uninos.INetworkProvider; + +public class RebarNetworkProvider implements INetworkProvider { + + public static RebarNetworkProvider THE_PROVIDER = new RebarNetworkProvider(); + + @Override + public RebarNetwork provideNetwork() { + return new RebarNetwork(); + } +} diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 2cc9428b9..599e12787 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -752,6 +752,7 @@ hbmfluid.coalgas=Kohlebenzin hbmfluid.coalgas_leaded=Bleikohlebenzin hbmfluid.colloid=Kolloid hbmfluid.coaloil=Kohleöl +hbmfluid.concrete=Nassbeton hbmfluid.coolant=Kühlflüssigkeit hbmfluid.coolant_hot=Heiße Kühlflüssigkeit hbmfluid.crackoil=Crack-Öl @@ -1417,6 +1418,7 @@ item.blades_schrabidium.name=Schrabidiumsägeblatt item.blades_steel.name=Stahlsägeblatt item.blades_titanium.name=Titansägeblatt item.blowtorch.name=Lötlampe +item.blueprint_folder.name=Blaupausenbuch item.blueprints.name=Blaupausen item.board_copper.name=Kupfertafel item.boat_rubber.name=Schlauchboot @@ -4029,6 +4031,7 @@ tile.concrete_colored_ext.pink.name=Builder's Choice Concrete - Männliches Pink tile.concrete_colored_ext.purple.name=Builder's Choice Concrete - Mysteriöses Lila tile.concrete_colored_ext.sand.name=Builder's Choice Concrete - Wüstensturm tile.concrete_pillar.name=Stahlbetonsäule +tile.concrete_rebar.name=Stahlbeton tile.concrete_slab.asphalt.name=Asphaltstufe tile.concrete_slab.concrete.name=Betonfliesenstufe tile.concrete_slab.concrete_asbestos.name=Asbestbetonstufe @@ -4752,6 +4755,7 @@ tile.reactor_ejector.name=Reaktor-Brennstoffauswurf tile.reactor_element.name=Reaktorkammer tile.reactor_hatch.name=Kraftwerkszugriffsluke tile.reactor_inserter.name=Reaktor-Brennstoffeinlass +tile.rebar.name=Armierungseisen tile.red_barrel.name=Explosives Fass tile.red_cable.name=Rotes Kupferkabel tile.red_cable_classic.name=Rotes Kupferkabel (Klassisch) diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 53f1112b2..ff4e2e5cc 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1461,6 +1461,7 @@ hbmfluid.coalgas=Coal Gasoline hbmfluid.coalgas_leaded=Leaded Coal Gasoline hbmfluid.coaloil=Coal Oil hbmfluid.colloid=Colloid +hbmfluid.concrete=Liquid Concrete hbmfluid.coolant=Coolant hbmfluid.coolant_hot=Hot Coolant hbmfluid.crackoil=Cracked Oil @@ -2161,6 +2162,7 @@ item.blades_desh.name=Desh Shredder Blades item.blades_steel.name=Steel Shredder Blades item.blades_titanium.name=Titanium Shredder Blades item.blowtorch.name=Blowtorch +item.blueprint_folder.name=Blueprint Booklet item.blueprints.name=Blueprints item.board_copper.name=Copper Panel item.boat_rubber.name=Rubber Boat @@ -5145,6 +5147,7 @@ tile.concrete_colored_ext.pink.name=Builder's Choice Concrete - Manly Pink tile.concrete_colored_ext.purple.name=Builder's Choice Concrete - Mysterious Purple tile.concrete_colored_ext.sand.name=Builder's Choice Concrete - Desert Storm tile.concrete_pillar.name=Rebar Reinforced Concrete Pillar +tile.concrete_rebar.name=Reinforced Concrete tile.concrete_slab.asphalt.name=Asphalt Slab tile.concrete_slab.concrete.name=Concrete Tile Slab tile.concrete_slab.concrete_asbestos.name=Asbestos Concrete Slab @@ -5903,6 +5906,7 @@ tile.reactor_ejector.name=Reactor Waste Ejector tile.reactor_element.name=Reactor Chamber tile.reactor_hatch.name=Reactor Access Hatch tile.reactor_inserter.name=Reactor Fuel Inserter +tile.rebar.name=Rebar tile.red_barrel.name=Explosive Barrel tile.red_cable.name=Red Copper Cable tile.red_cable_classic.name=Red Copper Cable (Classic) diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_rebar.png b/src/main/resources/assets/hbm/textures/blocks/concrete_rebar.png new file mode 100644 index 0000000000000000000000000000000000000000..bc2d6579fc7b332ff87fe4cdb73b371b33da0e5b GIT binary patch literal 599 zcmV-d0;v6oP)cZ8Sg!P-?x4UffyrwN{JXF03n11-nNZW3P9^? zt(m5Y&(BX{jA*UtFShURZ;UaNQYfWxo+sXW0E{tB(bv}(!!RI(VB0qOQVPqm@O(b; z-cw59_xG1l3PK1%2-I4UQu6cjL*Mrd!_XA#wZ=6Oab#d)4c zYc1AVlv3^2Wm%}TvTYmtzVr6>_8+;{np!J4XJprPxy#@V+^<34IxAurRCr{o@ts8LLjB2>pIqTQz&{`8h;13bhaMU!~kmdjY002ovPDHLkV1g!h5_$jt literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/blocks/concrete_rebar_alt.png b/src/main/resources/assets/hbm/textures/blocks/concrete_rebar_alt.png new file mode 100644 index 0000000000000000000000000000000000000000..c6d616f3ec1f7a930f8585a153f36526c44b6195 GIT binary patch literal 652 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 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/gui/fluids/concrete.png b/src/main/resources/assets/hbm/textures/gui/fluids/concrete.png new file mode 100644 index 0000000000000000000000000000000000000000..5d76282fe5c8438b922d95686c704a2396eb572e GIT binary patch literal 646 zcmV;10(t$3P)*cR5k zi@XS)Hd=_8IY;N4KVM&8f9H9|drzL{e1CsqjN$qDnd9*Yz%)&4+eQe15CX$6pp>Gj zDt6N}F^(f41gfgy^YfEo7yt+%q~aJO<2d5IM{5nhJkRXLab%h%>bk~zk8_U4xn8eW zYni4AV+iAp_Jl$J|`;xd7h(`;&!{;8z`mH1b}fI z)BW=DLS5Hrtr3xALu<{tuB_{da?T+lbX~_ZO;~F&#*pVZzrVk{zP>U|6W)82Qiw?U zaIH1Udrt^~x3{-csI_LEXRNifZHrQhx~}QEjx5U%5!Q7j%QALVRZ*7Z|6+6xLeic}^TCtu<}iQWOQlFwnLwP167{ z3TcoDeOVS_j2L6?5C1Jo2!TA$IUbM6O4oH< zE|)u%5BcLbvfu9kxZQ3^W?k0_AQ1uJ{r#P)s&LM+^WIaIB_e`zF2(b(BO)|SL*Mr} g=Qy2C06cc+AKE5D8*cmd+5i9m07*qoM6N<$f(yhcMgRZ+ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/assembly_nuke.png b/src/main/resources/assets/hbm/textures/items/assembly_nuke.png index 3243576ba0105458024c50259a8ff68560cfe096..4a6dcc92f19e28b0e740e051498302a3f15442d7 100644 GIT binary patch delta 372 zcmV-)0gL|U0-pnrG=Ek}L_t(IjjdC=Y63wNJtGPUArJy0rr1VIVUte%hF~+F;18r* z{~_#0_yHC|SkfA>k|{&BNZ4X;u@)Cg5o2*vgq_T|D+H1Q12gBGd*?6@;EzyMD}9v>9v`~0Iny4;%qN@FkBQsh98YiTam{A)Q~=bDiGO$6l}yZB;!Y;`4WcNr zXXGU?#s~l;N#YH+sPF(l7>3FwC=4I8#d^I55di>#AOHaLdOa9pWHy_5X=-lQEXx4E z7Q1t1wt9idWFocj@=CHSt2DSMbY@1Y)k44D|4v{&_f{xS#6F(8ST2`Hk_7da{Z8Ex z2{VI;&EK45k*oXCj%k{r(P-ds zI9M)@jIGTQ Stvc=i0000;yBBhjeZMSV3j0*}#DJ|!G!x>|q zibNqYj^l&CGXw>aB-z+XslN&QhV_it-oZIX-}jq@JkR|c>VKlJqYw~6Y&)on!rp{H z*L9et=}@&S%SYvT1^{TS(KHQ%1%rs;aX8`b>NOOZW!4$bkIpvitu4 O00003Zh;@y>_0x62=qOt5_^rq`axFemN++l9pwG?)`+)$OU~>XbEUc+`5|$?Jnl z%V~iVRtM3(gB+$IC_V>X9 zCw@pd>$;@{or&x)H#RgdFt{^csDEL94g literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/blueprint_folder_discover.png b/src/main/resources/assets/hbm/textures/items/blueprint_folder_discover.png new file mode 100644 index 0000000000000000000000000000000000000000..451232e7c18547b4ed45789cb7b10b639e82d885 GIT binary patch literal 301 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#VfyUv+oBh#1=dy#!J4%a61VaSo*fe)ce!v=I+c>*hykJrums2|bLj{{lk5&bD zD*XRKbnOji`^2R-bSC#D&M4|Ve>8Fb|4p-xNLal!Q|mKkOY%`$ zx7+XIK|M>}EkRQgPE1WGy}=Tfuz_QLI)g!6{N=>QrzG#l`i*ssnSwWVxgcJG&~C^499Wm6DbxYBg-&y)EH wQ#(ZR?tEo>kg+UIV2YXW0o5+9JLjvIcQGe0+TB>u2=p(5r>mdKI;Vst0FUc)%m4rY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/items/blueprint_folder_secret.png b/src/main/resources/assets/hbm/textures/items/blueprint_folder_secret.png new file mode 100644 index 0000000000000000000000000000000000000000..d23d7ce41724d7c28b30f70c4ad38149d30cc6b9 GIT binary patch literal 270 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 Date: Wed, 23 Jul 2025 16:34:11 +0200 Subject: [PATCH 2/2] cast yourself a whole house, cast yourself a new mother, cast a vacation straight to fucking hell --- changelog | 4 + .../com/hbm/blocks/generic/BlockRebar.java | 152 ++++++-- .../java/com/hbm/crafting/ToolRecipes.java | 1 + .../ContainerMachineChemicalFactory.java | 9 + .../ContainerMachineChemicalPlant.java | 4 +- .../hbm/inventory/gui/GuiInfoContainer.java | 2 + .../recipes/ChemicalPlantRecipes.java | 6 + .../inventory/recipes/ShredderRecipes.java | 10 +- src/main/java/com/hbm/items/ModItems.java | 6 +- .../com/hbm/items/tool/ItemRebarPlacer.java | 337 ++++++++++++++++++ .../java/com/hbm/main/CraftingManager.java | 2 +- src/main/resources/assets/hbm/lang/de_DE.lang | 2 + src/main/resources/assets/hbm/lang/en_US.lang | 2 + .../assets/hbm/textures/gui/gui_rebar.png | Bin 0 -> 3367 bytes .../hbm/textures/items/rebar_placer.png | Bin 0 -> 513 bytes 15 files changed, 498 insertions(+), 39 deletions(-) create mode 100644 src/main/java/com/hbm/items/tool/ItemRebarPlacer.java create mode 100644 src/main/resources/assets/hbm/textures/gui/gui_rebar.png create mode 100644 src/main/resources/assets/hbm/textures/items/rebar_placer.png diff --git a/changelog b/changelog index 958bb0f23..fa222ff1a 100644 --- a/changelog +++ b/changelog @@ -7,9 +7,13 @@ * Rebar * When hooked up to liquid concrete using pipes, will fill to create reinforced concrete * Fills bottom to top, so connect the pipes to the top +* Rebar placer + * Can be configured with different types of concrete, reinforced or not, or even colored + * Rebar created with the rebar placer will remember its type and assume it when being filled with liquid concrete ## Changed * The alternate recipes for nitric acid and xenon gas in the chemical plant now require blueprints +* The chemical plant now has a recipe for making cobblestone from 25mB of lava (which can be liquefacted into even more lava, useful for cobblestone generation) ## Fixed * Fixed a few assembler recipes using the old crafting numbers which sometimes exceed the stack limit diff --git a/src/main/java/com/hbm/blocks/generic/BlockRebar.java b/src/main/java/com/hbm/blocks/generic/BlockRebar.java index 67b9f13c7..391533e0a 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockRebar.java +++ b/src/main/java/com/hbm/blocks/generic/BlockRebar.java @@ -7,11 +7,16 @@ import org.lwjgl.opengl.GL11; import com.hbm.blocks.ModBlocks; import com.hbm.config.ClientConfig; +import com.hbm.inventory.RecipesCommon.ComparableStack; import com.hbm.inventory.fluid.FluidType; import com.hbm.inventory.fluid.Fluids; import com.hbm.inventory.fluid.tank.FluidTank; +import com.hbm.items.ModItems; +import com.hbm.items.tool.ItemRebarPlacer; import com.hbm.lib.Library; import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.main.ServerProxy; import com.hbm.render.block.ISBRHUniversal; import com.hbm.render.util.RenderBlocksNT; import com.hbm.tileentity.IBufPacketReceiver; @@ -24,6 +29,7 @@ import com.hbm.uninos.networkproviders.RebarNetwork; import com.hbm.uninos.networkproviders.RebarNetworkProvider; import com.hbm.util.BobMathUtil; import com.hbm.util.Compat; +import com.hbm.util.InventoryUtil; import com.hbm.util.fauxpointtwelve.BlockPos; import com.hbm.util.fauxpointtwelve.DirPos; @@ -41,9 +47,13 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.MovingObjectPosition.MovingObjectType; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; @@ -97,10 +107,18 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { public static class TileEntityRebar extends TileEntityLoadedBase implements IFluidReceiverMK2, IBufPacketReceiver { + public Block concrete; + public int concreteMeta; public int progress; public int prevProgress; protected RebarNode node; public boolean hasConnection = false; + + public TileEntityRebar setup(Block b, int m) { + this.concrete = b; + this.concreteMeta = m; + return this; + } @Override public void updateEntity() { @@ -115,7 +133,11 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { } if(this.progress >= 1_000) { - worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.concrete_rebar); + if(concrete != null && ItemRebarPlacer.isValidConk(Item.getItemFromBlock(concrete), concreteMeta)) { + worldObj.setBlock(xCoord, yCoord, zCoord, concrete, concreteMeta, 3); + } else { + worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.concrete_rebar); + } return; } @@ -158,6 +180,11 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { super.readFromNBT(nbt); this.progress = nbt.getInteger("progress"); this.hasConnection = nbt.getBoolean("hasConnection"); + + if(nbt.hasKey("block")) { + this.concrete = Block.getBlockById(nbt.getInteger("block")); + this.concreteMeta = nbt.getInteger("meta"); + } } @Override @@ -165,6 +192,11 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { super.writeToNBT(nbt); nbt.setInteger("progress", this.progress); nbt.setBoolean("hasConnection", this.hasConnection); + + if(this.concrete != null) { + nbt.setInteger("block", Block.getIdFromBlock(this.concrete)); + nbt.setInteger("meta", this.concreteMeta); + } } public RebarNode createNode() { @@ -341,6 +373,14 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { TileEntityRebar rebar = (TileEntityRebar) o; if(rebar.progress > 0) rebars.add(rebar); } + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayer player = mc.thePlayer; + World world = mc.theWorld; + + double dx = player.prevPosX + (player.posX - player.prevPosX) * interp; + double dy = player.prevPosY + (player.posY - player.prevPosY) * interp; + double dz = player.prevPosZ + (player.posZ - player.prevPosZ) * interp; if(!rebars.isEmpty()) { @@ -348,19 +388,12 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { GL11.glShadeModel(GL11.GL_SMOOTH); //RenderHelper.enableStandardItemLighting(); - EntityRenderer entityRenderer = Minecraft.getMinecraft().entityRenderer; + EntityRenderer entityRenderer = mc.entityRenderer; entityRenderer.enableLightmap(interp); - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - World world = Minecraft.getMinecraft().theWorld; - - double dx = player.prevPosX + (player.posX - player.prevPosX) * interp; - double dy = player.prevPosY + (player.posY - player.prevPosY) * interp; - double dz = player.prevPosZ + (player.posZ - player.prevPosZ) * interp; - RenderBlocksNT renderer = RenderBlocksNT.INSTANCE.setWorld(world); renderer.setOverrideBlockTexture(((BlockRebar) ModBlocks.rebar).concrete); - Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture); + mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); Tessellator tess = Tessellator.instance; tess.startDrawingQuads(); @@ -370,26 +403,6 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { tess.setColorRGBA_F(1F, 1F, 1F, 1F); renderer.setRenderBounds(0, 0, 0, 1, rebar.progress / 1000D, 1); renderer.renderStandardBlock(ModBlocks.rebar, rebar.xCoord, rebar.yCoord, rebar.zCoord); - - /*IIcon icon = ((BlockRebar) ModBlocks.rebar).concrete; - double minU = icon.getInterpolatedU(renderer.renderMinX * 16.0D); - double maxU = icon.getInterpolatedU(renderer.renderMaxX * 16.0D); - double minV = icon.getInterpolatedV(renderer.renderMinZ * 16.0D); - double maxV = icon.getInterpolatedV(renderer.renderMaxZ * 16.0D); - - double minX = rebar.xCoord + renderer.renderMinX; - double maxX = rebar.xCoord + renderer.renderMaxX; - double minY = rebar.yCoord + renderer.renderMinY; - double maxY = rebar.yCoord + renderer.renderMaxY; - double minZ = rebar.zCoord + renderer.renderMinZ; - double maxZ = rebar.zCoord + renderer.renderMaxZ; - - //tess.setColorOpaque_F(0.5F, 1F, 1F); - tess.setNormal(0, 1, 0); - tess.addVertexWithUV(maxX, maxY, maxZ, maxU, maxV); - tess.addVertexWithUV(maxX, maxY, minZ, maxU, minV); - tess.addVertexWithUV(minX, maxY, minZ, minU, minV); - tess.addVertexWithUV(minX, maxY, maxZ, minU, maxV);*/ } tess.draw(); @@ -400,5 +413,84 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal { GL11.glShadeModel(GL11.GL_FLAT); GL11.glPopMatrix(); } + + if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.rebar_placer && player.getHeldItem().hasTagCompound() && + player.getHeldItem().stackTagCompound.hasKey("pos") && mc.objectMouseOver != null && mc.objectMouseOver.typeOfHit == MovingObjectType.BLOCK) { + + int[] pos = player.getHeldItem().stackTagCompound.getIntArray("pos"); + MovingObjectPosition mop = mc.objectMouseOver; + ForgeDirection dir = ForgeDirection.getOrientation(mop.sideHit); + int iX = mop.blockX + dir.offsetX; + int iY = mop.blockY + dir.offsetY; + int iZ = mop.blockZ + dir.offsetZ; + + double minX = Math.min(pos[0], iX) + 0.125; + double maxX = Math.max(pos[0], iX) + 0.875; + double minY = Math.min(pos[1], iY) + 0.125; + double maxY = Math.max(pos[1], iY) + 0.875; + double minZ = Math.min(pos[2], iZ) + 0.125; + double maxZ = Math.max(pos[2], iZ) + 0.875; + + GL11.glPushMatrix(); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glColor3f(1F, 1F, 1F); + + Tessellator tess = Tessellator.instance; + tess.setTranslation(-dx, -dy, -dz); + tess.startDrawing(GL11.GL_LINES); + tess.setBrightness(240); + tess.setColorRGBA_F(1F, 1F, 1F, 1F); + + // top + tess.addVertex(minX, maxY, minZ); + tess.addVertex(minX, maxY, maxZ); + + tess.addVertex(minX, maxY, maxZ); + tess.addVertex(maxX, maxY, maxZ); + + tess.addVertex(maxX, maxY, maxZ); + tess.addVertex(maxX, maxY, minZ); + + tess.addVertex(maxX, maxY, minZ); + tess.addVertex(minX, maxY, minZ); + + // bottom + tess.addVertex(minX, minY, minZ); + tess.addVertex(minX, minY, maxZ); + + tess.addVertex(minX, minY, maxZ); + tess.addVertex(maxX, minY, maxZ); + + tess.addVertex(maxX, minY, maxZ); + tess.addVertex(maxX, minY, minZ); + + tess.addVertex(maxX, minY, minZ); + tess.addVertex(minX, minY, minZ); + + // sides + tess.addVertex(minX, minY, minZ); + tess.addVertex(minX, maxY, minZ); + + tess.addVertex(maxX, minY, minZ); + tess.addVertex(maxX, maxY, minZ); + + tess.addVertex(maxX, minY, maxZ); + tess.addVertex(maxX, maxY, maxZ); + + tess.addVertex(minX, minY, maxZ); + tess.addVertex(minX, maxY, maxZ); + + tess.draw(); + tess.setTranslation(0, 0, 0); + + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glPopMatrix(); + + int rebarLeft = InventoryUtil.countAStackMatches(player, new ComparableStack(ModBlocks.rebar), true); + int rebarRequired = (Math.max(pos[0], iX) - Math.min(pos[0], iX) + 1) * (Math.max(pos[1], iY) - Math.min(pos[1], iY) + 1) * (Math.max(pos[2], iZ) - Math.min(pos[2], iZ) + 1); + MainRegistry.proxy.displayTooltip((rebarRequired > rebarLeft ? EnumChatFormatting.RED : EnumChatFormatting.GREEN) + (rebarLeft + " / " + rebarRequired), 1_000, ServerProxy.ID_CABLE); + } } } diff --git a/src/main/java/com/hbm/crafting/ToolRecipes.java b/src/main/java/com/hbm/crafting/ToolRecipes.java index d8d52b0ce..45ad0922c 100644 --- a/src/main/java/com/hbm/crafting/ToolRecipes.java +++ b/src/main/java/com/hbm/crafting/ToolRecipes.java @@ -156,6 +156,7 @@ public class ToolRecipes { CraftingManager.addRecipeAuto(ItemBlowtorch.getEmptyTool(ModItems.blowtorch), new Object[] { "CC ", " I ", "CCC", 'C', CU.plate528(), 'I', IRON.ingot() }); CraftingManager.addRecipeAuto(ItemBlowtorch.getEmptyTool(ModItems.acetylene_torch), new Object[] { "SS ", " PS", " T ", 'S', STEEL.plate528(), 'P', ANY_PLASTIC.ingot(), 'T', ModItems.tank_steel }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.boltgun), new Object[] { "DPS", " RD", " D ", 'D', DURA.ingot(), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'R', RUBBER.ingot(), 'S', STEEL.shell() }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.rebar_placer), new Object[] { "RDR", "DWD", "RDR", 'R', ModBlocks.rebar, 'D', ModItems.ducttape, 'W', ModItems.wrench }); //Bobmazon CraftingManager.addShapelessAuto(new ItemStack(ModItems.bobmazon), new Object[] { Items.book, Items.gold_nugget, Items.string, KEY_BLUE }); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalFactory.java b/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalFactory.java index 484dcfc21..fbdcba7a1 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalFactory.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalFactory.java @@ -3,6 +3,7 @@ package com.hbm.inventory.container; import com.hbm.inventory.SlotCraftingOutput; import com.hbm.inventory.SlotNonRetarded; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemBlueprints; import com.hbm.items.machine.ItemMachineUpgrade; import com.hbm.util.InventoryUtil; @@ -53,6 +54,14 @@ public class ContainerMachineChemicalFactory extends ContainerBase { if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) { if(!this.mergeItemStack(slotStack, 0, 1, false)) return null; + } else if(slotOriginal.getItem() instanceof ItemBlueprints) { + if(!this.mergeItemStack(slotStack, 4, 5, false)) return null; + } else if(slotOriginal.getItem() instanceof ItemBlueprints) { + if(!this.mergeItemStack(slotStack, 11, 12, false)) return null; + } else if(slotOriginal.getItem() instanceof ItemBlueprints) { + if(!this.mergeItemStack(slotStack, 18, 19, false)) return null; + } else if(slotOriginal.getItem() instanceof ItemBlueprints) { + if(!this.mergeItemStack(slotStack, 25, 26, false)) return null; } else if(slotOriginal.getItem() instanceof ItemMachineUpgrade) { if(!this.mergeItemStack(slotStack, 1, 4, false)) return null; } else { diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalPlant.java b/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalPlant.java index 2c4f4052a..30f50de65 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalPlant.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineChemicalPlant.java @@ -3,7 +3,7 @@ package com.hbm.inventory.container; import com.hbm.inventory.SlotCraftingOutput; import com.hbm.inventory.SlotNonRetarded; import com.hbm.items.ModItems; -import com.hbm.items.machine.ItemChemistryTemplate; +import com.hbm.items.machine.ItemBlueprints; import com.hbm.items.machine.ItemMachineUpgrade; import com.hbm.util.InventoryUtil; @@ -57,7 +57,7 @@ public class ContainerMachineChemicalPlant extends ContainerBase { if(slotOriginal.getItem() instanceof IBatteryItem || slotOriginal.getItem() == ModItems.battery_creative) { if(!this.mergeItemStack(slotStack, 0, 1, false)) return null; - } else if(slotOriginal.getItem() instanceof ItemChemistryTemplate) { + } else if(slotOriginal.getItem() instanceof ItemBlueprints) { if(!this.mergeItemStack(slotStack, 1, 2, false)) return null; } else if(slotOriginal.getItem() instanceof ItemMachineUpgrade) { if(!this.mergeItemStack(slotStack, 2, 4, false)) return null; diff --git a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java index d3f151798..7c57a4dab 100644 --- a/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java +++ b/src/main/java/com/hbm/inventory/gui/GuiInfoContainer.java @@ -292,6 +292,8 @@ public abstract class GuiInfoContainer extends GuiContainer implements INEIGuiHa this.drawGradientRect(minX + indent, minY, minX + indent + 16, minY + 16, 0xffb0b0b0, 0xffb0b0b0); } GL11.glEnable(GL11.GL_DEPTH_TEST); + RenderHelper.enableGUIStandardItemLighting(); + GL11.glEnable(GL12.GL_RESCALE_NORMAL); itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY); itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY, null); RenderHelper.disableStandardItemLighting(); diff --git a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java index ca0228ca0..f3b759658 100644 --- a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java @@ -116,6 +116,12 @@ public class ChemicalPlantRecipes extends GenericRecipes { .outputItems(DictFrame.fromOne(ModItems.fuel_additive, EnumFuelAdditive.DEICER))); /// THE CONC AND ASPHALE /// + this.register(new GenericRecipe("chem.cobble").setup(20, 100) + .inputFluids(new FluidStack(Fluids.WATER, 1_000), new FluidStack(Fluids.LAVA, 25)) + .outputItems(new ItemStack(Blocks.cobblestone))); + this.register(new GenericRecipe("chem.stone").setup(60, 500).setPools(GenericRecipes.POOL_PREFIX_DISCOVER) + .inputFluids(new FluidStack(Fluids.WATER, 1_000), new FluidStack(Fluids.LAVA, 25), new FluidStack(Fluids.AIR, 4_000)) + .outputItems(new ItemStack(Blocks.stone))); this.register(new GenericRecipe("chem.concrete").setup(100, 100) .inputItems(new ComparableStack(ModItems.powder_cement, 1), new ComparableStack(Blocks.gravel, 8), new OreDictStack(KEY_SAND, 8)) .inputFluids(new FluidStack(Fluids.WATER, 2_000)) diff --git a/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java b/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java index 908804a5e..af47669a1 100644 --- a/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java @@ -264,12 +264,12 @@ public class ShredderRecipes extends SerializableRecipe { ShredderRecipes.setRecipe(ModItems.crystal_cobalt, new ItemStack(ModItems.powder_cobalt, 3)); /* Misc recycling */ - ShredderRecipes.setRecipe(ModBlocks.steel_poles, new ItemStack(ModItems.powder_steel_tiny, 3)); - ShredderRecipes.setRecipe(ModBlocks.steel_roof, new ItemStack(ModItems.powder_steel_tiny, 13)); - ShredderRecipes.setRecipe(ModBlocks.steel_wall, new ItemStack(ModItems.powder_steel_tiny, 13)); - ShredderRecipes.setRecipe(ModBlocks.steel_corner, new ItemStack(ModItems.powder_steel_tiny, 26)); + ShredderRecipes.setRecipe(ModBlocks.steel_poles, new ItemStack(ModItems.powder_steel_tiny, 2)); + ShredderRecipes.setRecipe(ModBlocks.steel_roof, new ItemStack(ModItems.powder_steel_tiny, 9)); + ShredderRecipes.setRecipe(ModBlocks.steel_wall, new ItemStack(ModItems.powder_steel_tiny, 9)); + ShredderRecipes.setRecipe(ModBlocks.steel_corner, new ItemStack(ModItems.powder_steel_tiny, 18)); ShredderRecipes.setRecipe(ModBlocks.steel_beam, new ItemStack(ModItems.powder_steel_tiny, 3)); - ShredderRecipes.setRecipe(new ItemStack(ModBlocks.steel_scaffold, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.powder_steel_tiny, 7)); + ShredderRecipes.setRecipe(new ItemStack(ModBlocks.steel_scaffold, 1, OreDictionary.WILDCARD_VALUE), new ItemStack(ModItems.powder_steel_tiny, 4)); ShredderRecipes.setRecipe(ModItems.coil_copper, new ItemStack(ModItems.powder_red_copper, 1)); ShredderRecipes.setRecipe(ModItems.coil_copper_torus, new ItemStack(ModItems.powder_red_copper, 2)); ShredderRecipes.setRecipe(ModItems.coil_advanced_alloy, new ItemStack(ModItems.powder_advanced_alloy, 1)); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index ca9456f9d..df5e429b2 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -2075,6 +2075,8 @@ public class ModItems { public static Item hazmat_paa_legs; public static Item hazmat_paa_boots; + public static Item rebar_placer; + public static Item wand; public static Item wand_s; public static Item wand_d; @@ -4003,6 +4005,7 @@ public class ModItems { upgrade_stack = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_stack").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_stack"); upgrade_ejector = new ItemMetaUpgrade(3).setUnlocalizedName("upgrade_ejector").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":upgrade_ejector"); + rebar_placer = new ItemRebarPlacer().setUnlocalizedName("rebar_placer").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":rebar_placer"); wand = new ItemWand().setUnlocalizedName("wand_k").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand"); wand_s = new ItemWandS().setUnlocalizedName("wand_s").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s"); wand_d = new ItemWandD().setUnlocalizedName("wand_d").setMaxStackSize(1).setCreativeTab(MainRegistry.consumableTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_d"); @@ -7047,7 +7050,8 @@ public class ModItems { GameRegistry.registerItem(crystal_horn, crystal_horn.getUnlocalizedName()); GameRegistry.registerItem(crystal_charred, crystal_charred.getUnlocalizedName()); - //OP Tools + //Wands, Tools, Other Crap + GameRegistry.registerItem(rebar_placer, rebar_placer.getUnlocalizedName()); GameRegistry.registerItem(wand, wand.getUnlocalizedName()); GameRegistry.registerItem(wand_s, wand_s.getUnlocalizedName()); GameRegistry.registerItem(wand_d, wand_d.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/tool/ItemRebarPlacer.java b/src/main/java/com/hbm/items/tool/ItemRebarPlacer.java new file mode 100644 index 000000000..86b120769 --- /dev/null +++ b/src/main/java/com/hbm/items/tool/ItemRebarPlacer.java @@ -0,0 +1,337 @@ +package com.hbm.items.tool; + +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.opengl.GL11; + +import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockConcreteColoredExt.EnumConcreteType; +import com.hbm.blocks.generic.BlockRebar.TileEntityRebar; +import com.hbm.inventory.RecipesCommon.ComparableStack; +import com.hbm.inventory.SlotPattern; +import com.hbm.inventory.gui.GuiInfoContainer; +import com.hbm.items.ItemInventory; +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.util.ChatBuilder; +import com.hbm.util.InventoryUtil; +import com.hbm.util.ItemStackUtil; +import com.hbm.util.Tuple.Pair; +import com.hbm.util.i18n.I18nUtil; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +public class ItemRebarPlacer extends Item implements IGUIProvider { + + public static List> acceptableConk = new ArrayList(); + + public ItemRebarPlacer() { + this.setMaxStackSize(1); + + acceptableConk.add(new Pair(ModBlocks.concrete, 0)); + acceptableConk.add(new Pair(ModBlocks.concrete_rebar, 0)); + acceptableConk.add(new Pair(ModBlocks.concrete_smooth, 0)); + acceptableConk.add(new Pair(ModBlocks.concrete_pillar, 0)); + + for(int i = 0; i < 16; i++) acceptableConk.add(new Pair(ModBlocks.concrete_colored, i)); + for(int i = 0; i < EnumConcreteType.values().length; i++) acceptableConk.add(new Pair(ModBlocks.concrete_colored_ext, i)); + } + + public static boolean isValidConk(Item item, int meta) { + + for(Pair conk : acceptableConk) { + if(item == Item.getItemFromBlock(conk.getKey()) && meta == conk.getValue()) return true; + } + return false; + } + + @Override + public int getMaxItemUseDuration(ItemStack stack) { + return 1; + } + + // if the placer isn't equipped or no concrete is loaded, forget the cached position + @Override + public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean held) { + if(stack.hasTagCompound() && stack.stackTagCompound.hasKey("pos")) { + ItemStack theConk = ItemStackUtil.readStacksFromNBT(stack, 1)[0]; + + if(!held || theConk == null) { + stack.stackTagCompound.removeTag("pos"); + return; + } + + if(!isValidConk(theConk.getItem(), theConk.getItemDamage())) { + stack.stackTagCompound.removeTag("pos"); + return; + } + } + } + + @Override + public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { + if(!world.isRemote && player.isSneaking()) player.openGui(MainRegistry.instance, 0, world, 0, 0, 0); + return stack; + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { + + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) { + if(world.isRemote) return true; + if(!stack.hasTagCompound()) stack.stackTagCompound = new NBTTagCompound(); + ItemStack theConk = ItemStackUtil.readStacksFromNBT(stack, 1)[0]; + + boolean hasConk = theConk != null && isValidConk(theConk.getItem(), theConk.getItemDamage()); + + if(!hasConk) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("No valid concrete type set!").color(EnumChatFormatting.RED).flush()); + return true; + } + + ForgeDirection dir = ForgeDirection.getOrientation(side); + + if(!stack.stackTagCompound.hasKey("pos")) { + stack.stackTagCompound.setIntArray("pos", new int[] {x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ}); + } else { + int rebarLeft = InventoryUtil.countAStackMatches(player, new ComparableStack(ModBlocks.rebar), true); + if(rebarLeft <= 0) { + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("Out of rebar!").color(EnumChatFormatting.RED).flush()); + stack.stackTagCompound.removeTag("pos"); + return true; + } + + int[] pos = stack.stackTagCompound.getIntArray("pos"); + int iX = x + dir.offsetX; + int iY = y + dir.offsetY; + int iZ = z + dir.offsetZ; + + int minX = Math.min(pos[0], iX); + int maxX = Math.max(pos[0], iX); + int minY = Math.min(pos[1], iY); + int maxY = Math.max(pos[1], iY); + int minZ = Math.min(pos[2], iZ); + int maxZ = Math.max(pos[2], iZ); + + int rebarUsed = 0; + + outer: for(int k = minY; k <= maxY; k++) { + for(int j = minZ; j <= maxZ; j++) { + for(int i = minX; i<= maxX; i++) { + if(rebarLeft <= 0) break outer; + + if(world.getBlock(i, k, j).isReplaceable(world, i, k, j) && player.canPlayerEdit(i, k, j, side, stack)) { + world.setBlock(i, k, j, ModBlocks.rebar); + TileEntity tile = world.getTileEntity(i, k, j); + if(tile instanceof TileEntityRebar) { + ((TileEntityRebar) tile).setup(Block.getBlockFromItem(theConk.getItem()), theConk.getItemDamage()); + } + rebarUsed++; + rebarLeft--; + } + } + } + } + + InventoryUtil.tryConsumeAStack(player.inventory.mainInventory, 0, player.inventory.mainInventory.length - 1, new ComparableStack(ModBlocks.rebar, rebarUsed)); + + player.addChatMessage(ChatBuilder.start("[").color(EnumChatFormatting.DARK_AQUA) + .nextTranslation(this.getUnlocalizedName() + ".name").color(EnumChatFormatting.DARK_AQUA) + .next("] ").color(EnumChatFormatting.DARK_AQUA) + .next("Placed " + rebarUsed + " rebar!").color(EnumChatFormatting.GREEN).flush()); + + stack.stackTagCompound.removeTag("pos"); + player.inventoryContainer.detectAndSendChanges(); + } + + return true; + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerRebar(player.inventory, new InventoryRebar(player, player.getHeldItem())); + } + + @Override + @SideOnly(Side.CLIENT) + public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIRebar(player.inventory, new InventoryRebar(player, player.getHeldItem())); + } + + public static class InventoryRebar extends ItemInventory { + + public InventoryRebar(EntityPlayer player, ItemStack box) { + this.player = player; + this.target = box; + slots = new ItemStack[this.getSizeInventory()]; + + if(!box.hasTagCompound()) box.setTagCompound(new NBTTagCompound()); + + ItemStack[] fromNBT = ItemStackUtil.readStacksFromNBT(box, slots.length); + if(fromNBT != null) System.arraycopy(fromNBT, 0, slots, 0, slots.length); + } + + @Override public int getSizeInventory() { return 1; } + @Override public String getInventoryName() { return "container.rebar"; } + @Override public boolean hasCustomInventoryName() { return target.hasDisplayName(); } + @Override public int getInventoryStackLimit() { return 1; } + } + + public static class ContainerRebar extends Container { + + private InventoryRebar rebar; + + public ContainerRebar(InventoryPlayer invPlayer, InventoryRebar rebar) { + this.rebar = rebar; + + this.addSlotToContainer(new SlotPattern(rebar, 0, 53, 36)); + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 100 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 158)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + return null; + } + + @Override + public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) { + + //L/R: 0 + //M3: 3 + //SHIFT: 1 + //DRAG: 5 + + // prevents the player from moving around the currently open box + if(mode == 2 && button == player.inventory.currentItem) return null; + if(index == player.inventory.currentItem + 47) return null; + + if(index != 0) return super.slotClick(index, button, mode, player); + + Slot slot = this.getSlot(index); + + ItemStack ret = null; + ItemStack held = player.inventory.getItemStack(); + + if(slot.getHasStack()) ret = slot.getStack().copy(); + slot.putStack(held); + rebar.markDirty(); + + return ret; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return rebar.isUseableByPlayer(player); + } + + @Override + public void onContainerClosed(EntityPlayer player) { + super.onContainerClosed(player); + } + } + + public static class GUIRebar extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_rebar.png"); + private final InventoryRebar inventory; + + public GUIRebar(InventoryPlayer invPlayer, InventoryRebar box) { + super(new ContainerRebar(invPlayer, box)); + this.inventory = box; + + this.xSize = 176; + this.ySize = 182; + } + + @Override + public void drawScreen(int mouseX, int mouseY, float f) { + super.drawScreen(mouseX, mouseY, f); + + if(this.isMouseOverSlot(this.inventorySlots.getSlot(0), mouseX, mouseY) && !this.inventorySlots.getSlot(0).getHasStack()) { + + List lines = new ArrayList(); + List list = new ArrayList(); + for(Pair conk : acceptableConk) list.add(new ItemStack(conk.getKey(), 1, conk.getValue())); + ItemStack selected = list.get(0); + + if(list.size() > 1) { + int cycle = (int) ((System.currentTimeMillis() % (1000 * list.size())) / 1000); + selected = ((ItemStack) list.get(cycle)).copy(); + selected.stackSize = 0; + list.set(cycle, selected); + } + + if(list.size() < 10) { + lines.add(list.toArray()); + } else if(list.size() < 24) { + lines.add(list.subList(0, list.size() / 2).toArray()); + lines.add(list.subList(list.size() / 2, list.size()).toArray()); + } else { + int bound0 = (int) Math.ceil(list.size() / 3D); + int bound1 = (int) Math.ceil(list.size() / 3D * 2D); + lines.add(list.subList(0, bound0).toArray()); + lines.add(list.subList(bound0, bound1).toArray()); + lines.add(list.subList(bound1, list.size()).toArray()); + } + + lines.add(new Object[] {I18nUtil.resolveKey(selected.getDisplayName())}); + this.drawStackText(lines, mouseX, mouseY, this.fontRendererObj); + } + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = I18n.format(this.inventory.getInventoryName()); + if(inventory.hasCustomInventoryName()) name = inventory.target.getDisplayName(); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + if(inventory.slots[0] == null || !ItemRebarPlacer.isValidConk(inventory.slots[0].getItem(), inventory.slots[0].getItemDamage())) + drawTexturedModalRect(guiLeft + 87, guiTop + 17, 176, 0, 56, 56); + } + } +} diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 4788a6fd0..d170e553b 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -458,7 +458,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 4), new Object[] { "SS", "SS", 'S', ModBlocks.steel_beam }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate_wide), 4), new Object[] { "SS", 'S', ModBlocks.steel_grate }); addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.steel_grate), 1), new Object[] { "SS", 'S', ModBlocks.steel_grate_wide }); - addRecipeAuto(new ItemStack(ModBlocks.rebar, 1), new Object[] { "BB", "BB", 'B', STEEL.bolt() }); + addRecipeAuto(new ItemStack(ModBlocks.rebar, 8), new Object[] { "BB", "BB", 'B', STEEL.bolt() }); addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 0), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeGray" }); addRecipeAuto(new ItemStack(ModBlocks.steel_scaffold, 8, 1), new Object[] { "SSS", "SDS", "SSS", 'S', ModBlocks.steel_scaffold, 'D', "dyeRed" }); diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 599e12787..c3dbefea1 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -449,6 +449,7 @@ container.reactor=Brutreaktor container.reactorControl=Reaktorfernsteuerung container.reactorLarge=Großer Atomreaktor container.reactorSmall=Atomreaktor +container.rebar=Armiereisen-Platzierer container.reix=Rei-X Hauptrechner container.rtg=Radioisotopengenerator container.rtgFurnace=RTG-Ofen @@ -3118,6 +3119,7 @@ item.rbmk_tool.set=RBMK verlinkt! item.reacher.name=Wolfram-Greifzange item.reactor_core.name=Brutreaktorkern item.reactor_sensor.name=Reaktor-Fernsensor +item.rebar_placer.name=Armiereisen-Platzierer item.record.glass.desc=? ? ? item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index ff4e2e5cc..b02964bcc 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -853,6 +853,7 @@ container.reactorBreeding=Breeding Reactor container.reactorControl=Reactor Remote Control Block container.reactorLarge=Big Nuclear Reactor container.reactorResearch=Research Reactor +container.rebar=Rebar Placer container.reix=Rei-X Mainframe container.rtg=RT Generator container.rtgFurnace=RTG Furnace @@ -4073,6 +4074,7 @@ item.rbmk_tool.set=RBMK linked! item.reacher.name=Tungsten Reacher item.reactor_core.name=Breeding Reactor Core item.reactor_sensor.name=Reactor Remote Sensor +item.rebar_placer.name=Rebar Placer item.record.glass.desc=? ? ? item.record.lc.desc=Valve - Diabolic Adrenaline Guitar/Lambda Core item.record.ss.desc=Valve - Sector Sweep diff --git a/src/main/resources/assets/hbm/textures/gui/gui_rebar.png b/src/main/resources/assets/hbm/textures/gui/gui_rebar.png new file mode 100644 index 0000000000000000000000000000000000000000..a3dfeb186d5bad3432726fba276eae6e61191b93 GIT binary patch literal 3367 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 DddB2B literal 0 HcmV?d00001