diff --git a/changelog b/changelog index d44869881..86c641480 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +## Added +* Precision assembler + ## Changed * New fusion reactor and particle accelerator parts now have OpenComputers compat * Irradiation recipe config now has the `fusionOnly` flag, preventing the recipe from being done in the RBMK irradiation channel @@ -19,6 +22,11 @@ * The recipes are lengthy, require a lot of power and have a low chance of succeeding * Recipes require the divine pufferfish, driver of all innovation * Where can you get this much pufferfish? Go figure it out +* Chance output stacks no longer do an RNG call to determine if the whole stack is provided or none, rather, each single item of the stack has its own RNG call +* Hiperf bedrock ore processing of heavy metals now yields tantalium +* Bedrock coltan is no longer a dedicated bedrock ore type +* Alt fire is now available for 10ga double barrel shotguns, allowing only a single barrel to be fired at once +* The custom mapping function on RoR torches now supports up to 32 characters instead of 15 ## Fixed * Fixed gamebreaking issue causing crashes and world corruption where the multi detonator had its tooltip misspelled diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index e25ea9a61..0d1dfb832 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -1009,6 +1009,7 @@ public class ModBlocks { public static Block machine_excavator; public static Block machine_ore_slopper; + public static Block machine_annihilator; public static Block machine_autosaw; public static Block machine_mining_laser; @@ -1261,6 +1262,7 @@ public class ModBlocks { public static Block wand_jigsaw; public static Block wand_logic; public static Block wand_tandem; + public static Block wand_structure; public static Block logic_block; @@ -2066,7 +2068,7 @@ public class ModBlocks { fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); fusion_mhdt = new MachineFusionMHDT().setBlockName("fusion_mhdt").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); fusion_coupler = new MachineFusionCoupler().setBlockName("fusion_coupler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); - + machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); icf_component = new BlockICFComponent().setBlockName("icf_component").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":icf_component"); @@ -2251,6 +2253,7 @@ public class ModBlocks { machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_ore_slopper = new MachineOreSlopper().setBlockName("machine_ore_slopper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + machine_annihilator = new MachineAnnihilator().setBlockName("machine_annihilator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser"); barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade"); machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler"); @@ -2430,6 +2433,7 @@ public class ModBlocks { wand_jigsaw = new BlockWandJigsaw().setBlockName("wand_jigsaw").setBlockTextureName(RefStrings.MODID + ":wand_jigsaw"); wand_logic = new BlockWandLogic().setBlockName("wand_logic").setBlockTextureName(RefStrings.MODID + ":wand_logic"); wand_tandem = new BlockWandTandem().setBlockName("wand_tandem").setBlockTextureName(RefStrings.MODID + ":wand_tandem"); + wand_structure = new BlockWandStructure().setBlockName("wand_structure"); logic_block = new LogicBlock().setBlockName("logic_block").setBlockTextureName(RefStrings.MODID + ":logic_block"); @@ -3372,6 +3376,7 @@ public class ModBlocks { register(machine_autosaw); register(machine_excavator); register(machine_ore_slopper); + register(machine_annihilator); register(machine_mining_laser); register(barricade); register(machine_turbofan); @@ -3448,7 +3453,7 @@ public class ModBlocks { GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName()); GameRegistry.registerBlock(iter, iter.getUnlocalizedName()); GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName()); - + register(fusion_component); register(fusion_torus); register(fusion_klystron); @@ -3603,6 +3608,7 @@ public class ModBlocks { register(wand_jigsaw); register(wand_logic); register(wand_tandem); + register(wand_structure); register(logic_block); } @@ -3635,4 +3641,24 @@ public class ModBlocks { return ret; } + + public static Block getBlockFromStack(ItemStack stack) { + if(stack == null) return null; + if(!(stack.getItem() instanceof ItemBlock)) return null; + + return ((ItemBlock) stack.getItem()).field_150939_a; + } + + // Is this block a special structure handling block, so we can ignore it for blacklist selection, etc. + public static boolean isStructureBlock(Block block, boolean includeAir) { + if(block == null) return false; + if(block == wand_air) return includeAir; + if(block == wand_structure) return true; + if(block == wand_jigsaw) return true; + if(block == wand_logic) return true; + if(block == wand_tandem) return true; + if(block == wand_loot) return true; + return false; + } + } diff --git a/src/main/java/com/hbm/blocks/generic/BlockWandJigsaw.java b/src/main/java/com/hbm/blocks/generic/BlockWandJigsaw.java index d64470934..2c927fac1 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockWandJigsaw.java +++ b/src/main/java/com/hbm/blocks/generic/BlockWandJigsaw.java @@ -37,7 +37,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.inventory.Container; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -135,10 +134,10 @@ public class BlockWandJigsaw extends BlockContainer implements IBlockSideRotatio TileEntityWandJigsaw jigsaw = (TileEntityWandJigsaw) te; if(!player.isSneaking()) { - Block block = getBlock(world, player.getHeldItem()); + Block block = ModBlocks.getBlockFromStack(player.getHeldItem()); if(block == ModBlocks.wand_air) block = Blocks.air; - if(block != null && block != ModBlocks.wand_jigsaw && block != ModBlocks.wand_loot) { + if(block != null && !ModBlocks.isStructureBlock(block, false)) { jigsaw.replaceBlock = block; jigsaw.replaceMeta = player.getHeldItem().getItemDamage(); @@ -155,13 +154,6 @@ public class BlockWandJigsaw extends BlockContainer implements IBlockSideRotatio return false; } - private Block getBlock(World world, ItemStack stack) { - if(stack == null) return null; - if(!(stack.getItem() instanceof ItemBlock)) return null; - - return ((ItemBlock) stack.getItem()).field_150939_a; - } - @Override @SideOnly(Side.CLIENT) public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/com/hbm/blocks/generic/BlockWandLoot.java b/src/main/java/com/hbm/blocks/generic/BlockWandLoot.java index cf5cebce0..715da81a5 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockWandLoot.java +++ b/src/main/java/com/hbm/blocks/generic/BlockWandLoot.java @@ -33,7 +33,6 @@ import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -82,7 +81,7 @@ public class BlockWandLoot extends BlockContainer implements ILookOverlay, ITool @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) { - int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; + int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 3, 2); if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 2, 2); @@ -153,17 +152,14 @@ public class BlockWandLoot extends BlockContainer implements ILookOverlay, ITool } private Block getLootableBlock(World world, ItemStack stack) { - if(stack == null) return null; + Block block = ModBlocks.getBlockFromStack(stack); + if(block == null) return null; - if(stack.getItem() instanceof ItemBlock) { - Block block = ((ItemBlock) stack.getItem()).field_150939_a; + if(block == ModBlocks.deco_loot) return block; - if(block == ModBlocks.deco_loot) return block; - - if(block instanceof ITileEntityProvider) { - TileEntity te = ((ITileEntityProvider) block).createNewTileEntity(world, 12); - if(te instanceof IInventory) return block; - } + if(block instanceof ITileEntityProvider) { + TileEntity te = ((ITileEntityProvider) block).createNewTileEntity(world, 12); + if(te instanceof IInventory) return block; } return null; diff --git a/src/main/java/com/hbm/blocks/generic/BlockWandStructure.java b/src/main/java/com/hbm/blocks/generic/BlockWandStructure.java new file mode 100644 index 000000000..07d68da44 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockWandStructure.java @@ -0,0 +1,573 @@ +package com.hbm.blocks.generic; + +import java.io.File; +import java.io.FileFilter; +import java.io.FileNotFoundException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.lwjgl.input.Keyboard; + +import com.hbm.blocks.IBlockMulti; +import com.hbm.blocks.ILookOverlay; +import com.hbm.blocks.ModBlocks; +import com.hbm.config.StructureConfig; +import com.hbm.interfaces.IControlReceiver; +import com.hbm.inventory.gui.element.GuiFileList; +import com.hbm.lib.RefStrings; +import com.hbm.main.MainRegistry; +import com.hbm.packet.PacketDispatcher; +import com.hbm.packet.toserver.NBTControlPacket; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.tileentity.TileEntityLoadedBase; +import com.hbm.util.BufferUtil; +import com.hbm.util.Tuple.Pair; +import com.hbm.util.i18n.I18nUtil; +import com.hbm.world.gen.nbt.NBTStructure; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +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.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.event.ClickEvent; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.Container; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IIcon; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre; + +public class BlockWandStructure extends BlockContainer implements IBlockMulti, IGUIProvider, ILookOverlay { + + private IIcon saveIcon; + private IIcon loadIcon; + + public BlockWandStructure() { + super(Material.iron); + } + + @Override + public TileEntity createNewTileEntity(World worldIn, int meta) { + return new TileEntityWandStructure(); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconRegister) { + saveIcon = iconRegister.registerIcon(RefStrings.MODID + ":wand_structure_save"); + loadIcon = iconRegister.registerIcon(RefStrings.MODID + ":wand_structure_load"); + } + + @Override + public IIcon getIcon(int side, int meta) { + if(meta == 1) return loadIcon; + return saveIcon; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + TileEntity te = world.getTileEntity(x, y, z); + + if(!(te instanceof TileEntityWandStructure)) return false; + + TileEntityWandStructure structure = (TileEntityWandStructure) te; + + if(!player.isSneaking()) { + Block block = ModBlocks.getBlockFromStack(player.getHeldItem()); + if(block != null && !ModBlocks.isStructureBlock(block, true)) { + Pair bm = new Pair(block, player.getHeldItem().getItemDamage()); + + if(structure.blacklist.contains(bm)) { + structure.blacklist.remove(bm); + } else { + structure.blacklist.add(bm); + } + + return true; + } + + if(world.isRemote) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z); + + return true; + } + + return false; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + @SideOnly(Side.CLIENT) + public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) { + list.add(new ItemStack(itemIn, 1, 0)); + list.add(new ItemStack(itemIn, 1, 1)); + } + + @Override + public int getSubCount() { + return 2; + } + + @Override + public String getUnlocalizedName(ItemStack stack) { + int meta = stack.getItemDamage(); + if(meta == 1) return getUnlocalizedName() + ".load"; + return getUnlocalizedName() + ".save"; + } + + @Override + public int damageDropped(int meta) { + return meta; + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return null; + } + + @Override + public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + int meta = world.getBlockMetadata(x, y, z); + TileEntityWandStructure structure = (TileEntityWandStructure) world.getTileEntity(x, y, z); + if(meta == 1) return new GuiStructureLoad(structure); + return new GuiStructureSave(structure); + } + + @Override + public void printHook(Pre event, World world, int x, int y, int z) { + if(world.getBlockMetadata(x, y, z) != 0) return; + + TileEntity te = world.getTileEntity(x, y, z); + if(!(te instanceof TileEntityWandStructure)) return; + TileEntityWandStructure structure = (TileEntityWandStructure) te; + + List text = new ArrayList(); + + text.add(EnumChatFormatting.GRAY + "Name: " + EnumChatFormatting.RESET + structure.name); + + text.add(EnumChatFormatting.GRAY + "Blacklist:"); + for (Pair bm : structure.blacklist) { + text.add(EnumChatFormatting.RED + "- " + bm.getKey().getUnlocalizedName() + " : " + bm.getValue()); + } + + ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".save.name"), 0xffff00, 0x404000, text); + } + + public static class TileEntityWandStructure extends TileEntityLoadedBase implements IControlReceiver { + + public String name = ""; + + public int sizeX = 1; + public int sizeY = 1; + public int sizeZ = 1; + + public Set> blacklist = new HashSet<>(); + + @Override + public void updateEntity() { + if(!worldObj.isRemote) { + networkPackNT(256); + } + } + + public void saveStructure(EntityPlayer player) { + if(name.isEmpty()) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not save: invalid name")); + return; + } + + if(sizeX <= 0 || sizeY <= 0 || sizeZ <= 0) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not save: invalid dimensions")); + return; + } + + Pair air = new Pair(Blocks.air, 0); + blacklist.add(air); + + File file = NBTStructure.quickSaveArea(name + ".nbt", worldObj, xCoord, yCoord + 1, zCoord, xCoord + sizeX - 1, yCoord + sizeY, zCoord + sizeZ - 1, blacklist); + + blacklist.remove(air); + + if(file == null) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed to save structure")); + return; + } + + ChatComponentText fileText = new ChatComponentText(file.getName()); + fileText.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file.getParentFile().getAbsolutePath())); + fileText.getChatStyle().setUnderlined(true); + + player.addChatMessage(new ChatComponentText("Saved structure as ").appendSibling(fileText)); + } + + public void loadStructure(EntityPlayer player) { + if(name.isEmpty()) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not load: no filename specified")); + return; + } + + File structureDirectory = new File(Minecraft.getMinecraft().mcDataDir, "structures"); + structureDirectory.mkdir(); + + File structureFile = new File(structureDirectory, name + ".nbt"); + + boolean previousDebug = StructureConfig.debugStructures; + StructureConfig.debugStructures = true; + + try { + NBTStructure structure = new NBTStructure(structureFile); + + sizeX = structure.getSizeX(); + sizeY = structure.getSizeY(); + sizeZ = structure.getSizeZ(); + + structure.build(worldObj, xCoord, yCoord + 1, zCoord, 0, false, true); + + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 3); + + player.addChatMessage(new ChatComponentText("Structure loaded")); + + } catch (FileNotFoundException ex) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not load: file not found")); + } finally { + StructureConfig.debugStructures = previousDebug; + } + } + + @Override + public void serialize(ByteBuf buf) { + BufferUtil.writeString(buf, name); + + buf.writeInt(sizeX); + buf.writeInt(sizeY); + buf.writeInt(sizeZ); + + buf.writeInt(blacklist.size()); + for(Pair bm : blacklist) { + buf.writeInt(Block.getIdFromBlock(bm.getKey())); + buf.writeInt(bm.getValue()); + } + } + + @Override + public void deserialize(ByteBuf buf) { + name = BufferUtil.readString(buf); + + sizeX = buf.readInt(); + sizeY = buf.readInt(); + sizeZ = buf.readInt(); + + int count = buf.readInt(); + blacklist = new HashSet<>(); + for(int i = 0; i < count; i++) { + Block block = Block.getBlockById(buf.readInt()); + int meta = buf.readInt(); + blacklist.add(new Pair(block, meta)); + } + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + + name = nbt.getString("name"); + + sizeX = nbt.getInteger("sizeX"); + sizeY = nbt.getInteger("sizeY"); + sizeZ = nbt.getInteger("sizeZ"); + + int[] blocks = nbt.getIntArray("blocks"); + int[] metas = nbt.getIntArray("metas"); + + blacklist = new HashSet<>(); + for (int i = 0; i < blocks.length; i++) { + blacklist.add(new Pair(Block.getBlockById(blocks[i]), metas[i])); + } + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + + nbt.setString("name", name); + + nbt.setInteger("sizeX", sizeX); + nbt.setInteger("sizeY", sizeY); + nbt.setInteger("sizeZ", sizeZ); + + nbt.setIntArray("blocks", blacklist.stream().mapToInt(b -> Block.getIdFromBlock(b.getKey())).toArray()); + nbt.setIntArray("metas", blacklist.stream().mapToInt(b -> b.getValue()).toArray()); + } + + @Override + public boolean hasPermission(EntityPlayer player) { + return true; + } + + public void receiveControl(NBTTagCompound data) {} + + @Override + public void receiveControl(EntityPlayer player, NBTTagCompound nbt) { + readFromNBT(nbt); + markDirty(); + + if(nbt.getBoolean("save")) { + saveStructure(player); + } + + if(nbt.getBoolean("load")) { + loadStructure(player); + } + } + + @Override + @SideOnly(Side.CLIENT) + public AxisAlignedBB getRenderBoundingBox() { + return INFINITE_EXTENT_AABB; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } + + } + + @SideOnly(Side.CLIENT) + public static class GuiStructureSave extends GuiScreen { + + private final TileEntityWandStructure tile; + + private GuiTextField textName; + + private GuiTextField textSizeX; + private GuiTextField textSizeY; + private GuiTextField textSizeZ; + + private GuiButton performAction; + + private boolean saveOnClose = false; + + public GuiStructureSave(TileEntityWandStructure tile) { + this.tile = tile; + } + + @Override + public void initGui() { + Keyboard.enableRepeatEvents(true); + + textName = new GuiTextField(fontRendererObj, width / 2 - 150, 50, 300, 20); + textName.setText(tile.name); + + textSizeX = new GuiTextField(fontRendererObj, width / 2 - 150, 100, 50, 20); + textSizeX.setText("" + tile.sizeX); + textSizeY = new GuiTextField(fontRendererObj, width / 2 - 100, 100, 50, 20); + textSizeY.setText("" + tile.sizeY); + textSizeZ = new GuiTextField(fontRendererObj, width / 2 - 50, 100, 50, 20); + textSizeZ.setText("" + tile.sizeZ); + + performAction = new GuiButton(0, width / 2 - 150, 150, 300, 20, "SAVE"); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + drawDefaultBackground(); + + textName.drawTextBox(); + + textSizeX.drawTextBox(); + textSizeY.drawTextBox(); + textSizeZ.drawTextBox(); + + performAction.drawButton(mc, mouseX, mouseY); + + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void onGuiClosed() { + Keyboard.enableRepeatEvents(false); + + NBTTagCompound data = new NBTTagCompound(); + tile.writeToNBT(data); + + data.setString("name", textName.getText()); + + try { data.setInteger("sizeX", Integer.parseInt(textSizeX.getText())); } catch (Exception ex) {} + try { data.setInteger("sizeY", Integer.parseInt(textSizeY.getText())); } catch (Exception ex) {} + try { data.setInteger("sizeZ", Integer.parseInt(textSizeZ.getText())); } catch (Exception ex) {} + + if(saveOnClose) data.setBoolean("save", true); + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, tile.xCoord, tile.yCoord, tile.zCoord)); + } + + @Override + protected void keyTyped(char typedChar, int keyCode) { + super.keyTyped(typedChar, keyCode); + + textName.textboxKeyTyped(typedChar, keyCode); + + textSizeX.textboxKeyTyped(typedChar, keyCode); + textSizeY.textboxKeyTyped(typedChar, keyCode); + textSizeZ.textboxKeyTyped(typedChar, keyCode); + } + + @Override + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); + textName.mouseClicked(mouseX, mouseY, mouseButton); + + textSizeX.mouseClicked(mouseX, mouseY, mouseButton); + textSizeY.mouseClicked(mouseX, mouseY, mouseButton); + textSizeZ.mouseClicked(mouseX, mouseY, mouseButton); + + if(performAction.mousePressed(mc, mouseX, mouseY)) { + saveOnClose = true; + + mc.displayGuiScreen(null); + mc.setIngameFocus(); + } + } + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + } + + @SideOnly(Side.CLIENT) + public static class GuiStructureLoad extends GuiScreen { + + private final TileEntityWandStructure tile; + + private GuiTextField textName; + + private GuiFileList fileList; + + private GuiButton performAction; + + private boolean loadOnClose = false; + + private static File structureDirectory = new File(Minecraft.getMinecraft().mcDataDir, "structures"); + private static String nameFilter = ""; + private static final FileFilter structureFilter = new FileFilter() { + + public boolean accept(File file) { + if(!file.isFile() || !file.getName().endsWith(".nbt")) return false; + return nameFilter.isEmpty() || file.getName().contains(nameFilter); + } + + }; + + public GuiStructureLoad(TileEntityWandStructure tile) { + this.tile = tile; + } + + @Override + public void initGui() { + Keyboard.enableRepeatEvents(true); + + textName = new GuiTextField(fontRendererObj, width / 2 - 150, 50, 300, 20); + textName.setText(tile.name); + nameFilter = tile.name; + + structureDirectory.mkdir(); + + fileList = new GuiFileList(mc, structureDirectory.listFiles(structureFilter), this::selectFile, nameFilter, width, height, 70, height - 90, 16); + + performAction = new GuiButton(0, width / 2 - 150, height - 70, 300, 20, "LOAD"); + } + + public void selectFile(File file) { + String fileName = file.getName(); + textName.setText(fileName.substring(0, fileName.length() - 4)); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + fileList.drawScreen(mouseX, mouseY, partialTicks); + + textName.drawTextBox(); + + performAction.drawButton(mc, mouseX, mouseY); + + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void onGuiClosed() { + Keyboard.enableRepeatEvents(false); + + NBTTagCompound data = new NBTTagCompound(); + tile.writeToNBT(data); + + data.setString("name", textName.getText()); + + if(loadOnClose) data.setBoolean("load", true); + + PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, tile.xCoord, tile.yCoord, tile.zCoord)); + } + + @Override + protected void keyTyped(char typedChar, int keyCode) { + super.keyTyped(typedChar, keyCode); + + textName.textboxKeyTyped(typedChar, keyCode); + + if(!nameFilter.equals(textName.getText())) { + nameFilter = textName.getText(); + fileList = new GuiFileList(mc, structureDirectory.listFiles(structureFilter), this::selectFile, nameFilter, width, height, 70, height - 90, 16); + } + } + + @Override + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); + textName.mouseClicked(mouseX, mouseY, mouseButton); + + fileList.func_148179_a(mouseX, mouseY, mouseButton); + + fileList.select(textName.getText()); + + if(performAction.mousePressed(mc, mouseX, mouseY)) { + loadOnClose = true; + + mc.displayGuiScreen(null); + mc.setIngameFocus(); + } + } + + @Override + protected void mouseMovedOrUp(int mouseX, int mouseY, int state) { + super.mouseMovedOrUp(mouseX, mouseY, state); + fileList.func_148181_b(mouseX, mouseY, state); + } + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + } + +} diff --git a/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java b/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java index 1ad176e63..2a9342454 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java +++ b/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java @@ -44,7 +44,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -175,10 +174,10 @@ public class BlockWandTandem extends BlockContainer implements IBlockSideRotatio } if(!player.isSneaking()) { - Block block = getBlock(world, player.getHeldItem()); + Block block = ModBlocks.getBlockFromStack(player.getHeldItem()); if(block == ModBlocks.wand_air) block = Blocks.air; - if(block != null && block != ModBlocks.wand_jigsaw && block != ModBlocks.wand_loot) { + if(block != null && !ModBlocks.isStructureBlock(block, false)) { jigsaw.replaceBlock = block; jigsaw.replaceMeta = player.getHeldItem().getItemDamage(); jigsaw.markDirty(); @@ -196,13 +195,6 @@ public class BlockWandTandem extends BlockContainer implements IBlockSideRotatio return false; } - private Block getBlock(World world, ItemStack stack) { - if(stack == null) return null; - if(!(stack.getItem() instanceof ItemBlock)) return null; - - return ((ItemBlock) stack.getItem()).field_150939_a; - } - @Override @SideOnly(Side.CLIENT) public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java b/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java new file mode 100644 index 000000000..1330bd9e6 --- /dev/null +++ b/src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java @@ -0,0 +1,31 @@ +package com.hbm.blocks.machine; + +import com.hbm.blocks.BlockDummyable; +import com.hbm.tileentity.machine.TileEntityMachineAnnihilator; + +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MachineAnnihilator extends BlockDummyable { + + public MachineAnnihilator() { + super(Material.iron); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + if(meta >= 12) return new TileEntityMachineAnnihilator(); + return null; + } + + @Override + public int[] getDimensions() { + return new int[] {0, 0, 0, 0, 0, 0}; + } + + @Override + public int getOffset() { + return 0; + } +} diff --git a/src/main/java/com/hbm/commands/CommandLocate.java b/src/main/java/com/hbm/commands/CommandLocate.java index ec646c817..9c9c225f5 100644 --- a/src/main/java/com/hbm/commands/CommandLocate.java +++ b/src/main/java/com/hbm/commands/CommandLocate.java @@ -13,6 +13,7 @@ import net.minecraft.command.ICommandSender; import net.minecraft.command.PlayerNotFoundException; import net.minecraft.command.WrongUsageException; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; @@ -71,6 +72,8 @@ public class CommandLocate extends CommandBase { ChatComponentTranslation message = new ChatComponentTranslation("commands.locate.success.coordinates", structure.name, pos.chunkXPos * 16, pos.chunkZPos * 16); message.getChatStyle().setColor(EnumChatFormatting.GREEN); sender.addChatMessage(message); + } else if (args[0].equals("list")) { + sender.addChatMessage(new ChatComponentText(String.join(", ", NBTStructure.listStructures()))); } else { throw new WrongUsageException(getCommandUsage(sender), new Object[0]); } @@ -105,9 +108,9 @@ public class CommandLocate extends CommandBase { return Collections.emptyList(); if(args.length == 1) - return getListOfStringsMatchingLastWord(args, "structure"); + return getListOfStringsMatchingLastWord(args, "structure", "list"); - if(args.length == 2) { + if(args.length == 2 && args[0].equals("structure")) { List structures = NBTStructure.listStructures(); return getListOfStringsMatchingLastWord(args, structures.toArray(new String[structures.size()])); } diff --git a/src/main/java/com/hbm/config/GeneralConfig.java b/src/main/java/com/hbm/config/GeneralConfig.java index dd204d6fe..9dc23a824 100644 --- a/src/main/java/com/hbm/config/GeneralConfig.java +++ b/src/main/java/com/hbm/config/GeneralConfig.java @@ -47,13 +47,10 @@ public class GeneralConfig { public static boolean enable528ReasimBoilers = true; public static boolean enable528ColtanDeposit = true; public static boolean enable528ColtanSpawn = false; - public static boolean enable528BedrockDeposit = true; - public static boolean enable528BedrockSpawn = false; public static boolean enable528BosniaSimulator = true; - public static boolean enable528BedrockReplacement = true; public static boolean enable528NetherBurn = true; + public static boolean enable528PressurizedRecipes = true; public static int coltanRate = 2; - public static int bedrockRate = 50; public static boolean enableLBSM = false; public static boolean enableLBSMFullSchrab = true; @@ -68,7 +65,6 @@ public class GeneralConfig { public static boolean enableLBSMSimpleMedicineRecipes = true; public static boolean enableLBSMSafeCrates = true; public static boolean enableLBSMSafeMEDrives = true; - public static boolean enableLBSMIGen = true; public static int schrabRate = 20; public static String[] preferredOutputMod = new String[] {RefStrings.MODID}; @@ -129,18 +125,14 @@ public class GeneralConfig { + "528-Modus: Lassen Sie Vorsicht walten!\n" + "способ-528: действовать с осторожностью!"); - enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode.", false); + enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode, required TRUE for most subsequent toggles to work.", false); enable528ReasimBoilers = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_forceReasimBoilers", "Keeps the RBMK dial for ReaSim boilers on, preventing use of non-ReaSim boiler columns and forcing the use of steam in-/outlets", true); enable528ColtanDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanDepsoit", "Enables the coltan deposit. A large amount of coltan will spawn around a single random location in the world.", true); enable528ColtanSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanSpawning", "Enables coltan ore as a random spawn in the world. Unlike the deposit option, coltan will not just spawn in one central location.", false); - enable528BedrockDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBedrockDepsoit", "Enables bedrock coltan ores in the coltan deposit. These ores can be drilled to extract infinite coltan, albeit slowly.", true); - enable528BedrockSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBedrockSpawning", "Enables the bedrock coltan ores as a rare spawn. These will be rarely found anywhere in the world.", false); enable528BosniaSimulator = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBosniaSimulator", "Enables anti tank mines spawning all over the world.", true); - enable528BedrockReplacement = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528BedrockReplacement", "Replaces certain bedrock ores with ones that require additional processing.", true); enable528NetherBurn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528NetherBurn", "Whether players burn in the nether", true); + enable528PressurizedRecipes = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enable528PressurizedRecipes", "Sets some recipes to require pressurized input fluid", true); coltanRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_oreColtanFrequency", "Determines how many coltan ore veins are to be expected in a chunk. These values do not affect the frequency in deposits, and only apply if random coltan spanwing is enabled.", 2); - bedrockRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_bedrockColtanFrequency", "Determines how often (1 in X) bedrock coltan ores spawn. Applies for both the bedrock ores in the coltan deposit (if applicable) and the random bedrock ores (if applicable)", 50); - final String CATEGORY_LBSM = CommonConfig.CATEGORY_LBSM; @@ -162,9 +154,15 @@ public class GeneralConfig { enableLBSMSimpleMedicineRecipes = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_recipeSimpleMedicine", "When enabled, makes some medicine recipes (like ones that require bismuth) much more affordable", true); enableLBSMSafeCrates = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_safeCrates", "When enabled, prevents crates from becoming radioactive", true); enableLBSMSafeMEDrives = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_safeMEDrives", "When enabled, prevents ME Drives and Portable Cells from becoming radioactive", true); - enableLBSMIGen = CommonConfig.createConfigBool(config, CATEGORY_LBSM, "LBSM_iGen", "When enabled, restores the industrial generator to pre-nerf power", true); schrabRate = CommonConfig.createConfigInt(config, CATEGORY_LBSM, "LBSM_schrabOreRate", "Changes the amount of uranium ore needed on average to create one schrabidium ore using nukes. Standard mode value is 100", 20); if(enable528) enableLBSM = false; + + if(!enable528) { + enable528ReasimBoilers = false; + enable528BosniaSimulator = false; + enable528NetherBurn = false; + enable528PressurizedRecipes = false; + } } } diff --git a/src/main/java/com/hbm/config/VersatileConfig.java b/src/main/java/com/hbm/config/VersatileConfig.java index eae8519d9..ee0b4ac8d 100644 --- a/src/main/java/com/hbm/config/VersatileConfig.java +++ b/src/main/java/com/hbm/config/VersatileConfig.java @@ -12,28 +12,18 @@ import net.minecraft.potion.PotionEffect; public class VersatileConfig { public static Item getTransmutatorItem() { - - if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab) - return ModItems.ingot_schrabidium; - + if(GeneralConfig.enableLBSM && GeneralConfig.enableLBSMFullSchrab) return ModItems.ingot_schrabidium; return ModItems.ingot_schraranium; } public static int getSchrabOreChance() { - - if(GeneralConfig.enableLBSM) - return GeneralConfig.schrabRate; - + if(GeneralConfig.enableLBSM) return GeneralConfig.schrabRate; return 100; } public static void applyPotionSickness(EntityLivingBase entity, int duration) { - - if(PotionConfig.potionSickness == 0) - return; - - if(PotionConfig.potionSickness == 2) - duration *= 12; + if(PotionConfig.potionSickness == 0) return; + if(PotionConfig.potionSickness == 2) duration *= 12; PotionEffect eff = new PotionEffect(HbmPotion.potionsickness.id, duration * 20); eff.setCurativeItems(new ArrayList()); diff --git a/src/main/java/com/hbm/crafting/RodRecipes.java b/src/main/java/com/hbm/crafting/RodRecipes.java index bd15c0322..3fa693db7 100644 --- a/src/main/java/com/hbm/crafting/RodRecipes.java +++ b/src/main/java/com/hbm/crafting/RodRecipes.java @@ -48,7 +48,7 @@ public class RodRecipes { CraftingManager.addShapelessAuto(new ItemStack(ModItems.waste_zfb_mox, 2, 1), new Object[] { ModItems.rod_zirnox_zfb_mox_depleted }); //Breeding Rods - CraftingManager.addRecipeAuto(new ItemStack(ModItems.rod_empty, 16), new Object[] { "SSS", "L L", "SSS", 'S', STEEL.plate528(), 'L', PB.plate528() }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.rod_empty, 16), new Object[] { "SSS", "L L", "SSS", 'S', STEEL.plate(), 'L', PB.plate() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 2), new Object[] { ModItems.rod_dual_empty }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_dual_empty, 1), new Object[] { ModItems.rod_empty, ModItems.rod_empty }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.rod_empty, 4), new Object[] { ModItems.rod_quad_empty }); diff --git a/src/main/java/com/hbm/crafting/ToolRecipes.java b/src/main/java/com/hbm/crafting/ToolRecipes.java index 1fd1539b2..814607a6c 100644 --- a/src/main/java/com/hbm/crafting/ToolRecipes.java +++ b/src/main/java/com/hbm/crafting/ToolRecipes.java @@ -112,10 +112,10 @@ public class ToolRecipes { CraftingManager.addRecipeAuto(new ItemStack(ModItems.designator_manual, 1), new Object[] { " A", "#C#", "#B#", '#', ANY_PLASTIC.ingot(), 'A', PB.plate(), 'B', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'C', ModItems.designator }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.designator_arty_range, 1), new Object[] { ModItems.rangefinder, DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), ANY_PLASTIC.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.linker, 1), new Object[] { "I I", "ICI", "GGG", 'I', IRON.plate(), 'G', GOLD.plate(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED) }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', GOLD.wireFine(), 'I', CU.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG), 'P', STEEL.plate528() }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.oil_detector, 1), new Object[] { "W I", "WCI", "PPP", 'W', GOLD.wireFine(), 'I', CU.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG), 'P', STEEL.plate() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.turret_chip, 1), new Object[] { "WWW", "CPC", "WWW", 'W', GOLD.wireFine(), 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', GOLD.wireFine(), 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'S', STEEL.plate528(), 'G', GOLD.ingot() }); - CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', GOLD.wireFine(), 'P', ANY_RUBBER.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'G', GOLD.ingot(), 'S', STEEL.plate528(), 'B', ModItems.ingot_beryllium }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.survey_scanner, 1), new Object[] { "SWS", " G ", "PCP", 'W', GOLD.wireFine(), 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'S', STEEL.plate(), 'G', GOLD.ingot() }); + CraftingManager.addRecipeAuto(new ItemStack(ModItems.geiger_counter, 1), new Object[] { "GPP", "WCS", "WBB", 'W', GOLD.wireFine(), 'P', ANY_RUBBER.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'G', GOLD.ingot(), 'S', STEEL.plate(), 'B', ModItems.ingot_beryllium }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.dosimeter, 1), new Object[] { "WGW", "WCW", "WBW", 'W', KEY_PLANKS, 'G', KEY_ANYPANE, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE), 'B', BE.ingot() }); CraftingManager.addShapelessAuto(new ItemStack(ModBlocks.geiger), new Object[] { ModItems.geiger_counter }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.digamma_diagnostic), new Object[] { ModItems.geiger_counter, PO210.billet(), ASBESTOS.ingot() }); @@ -147,8 +147,8 @@ public class ToolRecipes { CraftingManager.addRecipeAuto(new ItemStack(ModItems.hand_drill_desh), new Object[] { " D", "S ", " S", 'D', DESH.ingot(), 'S', ANY_PLASTIC.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.chemistry_set), new Object[] { "GIG", "GCG", 'G', KEY_ANYGLASS, 'I', IRON.ingot(), 'C', CU.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.chemistry_set_boron), new Object[] { "GIG", "GCG", 'G', ModBlocks.glass_boron, 'I', STEEL.ingot(), 'C', CO.ingot() }); - 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(ItemBlowtorch.getEmptyTool(ModItems.blowtorch), new Object[] { "CC ", " I ", "CCC", 'C', CU.plate(), 'I', IRON.ingot() }); + CraftingManager.addRecipeAuto(ItemBlowtorch.getEmptyTool(ModItems.acetylene_torch), new Object[] { "SS ", " PS", " T ", 'S', STEEL.plate(), '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 }); diff --git a/src/main/java/com/hbm/handler/EntityEffectHandler.java b/src/main/java/com/hbm/handler/EntityEffectHandler.java index dcbfcb5b6..8a98850ac 100644 --- a/src/main/java/com/hbm/handler/EntityEffectHandler.java +++ b/src/main/java/com/hbm/handler/EntityEffectHandler.java @@ -106,7 +106,7 @@ public class EntityEffectHandler { } } //only sets players on fire so mod compatibility doesnt die - if((GeneralConfig.enable528 && GeneralConfig.enable528NetherBurn) && entity instanceof EntityPlayer && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) { + if(GeneralConfig.enable528NetherBurn && entity instanceof EntityPlayer && !entity.isImmuneToFire() && entity.worldObj.provider.isHellWorld) { entity.setFire(5); } diff --git a/src/main/java/com/hbm/inventory/OreDictManager.java b/src/main/java/com/hbm/inventory/OreDictManager.java index 02efa0586..cb9ceba78 100644 --- a/src/main/java/com/hbm/inventory/OreDictManager.java +++ b/src/main/java/com/hbm/inventory/OreDictManager.java @@ -776,9 +776,6 @@ public class OreDictManager { public String grip() { return GRIP.name() + mats[0]; } public String[] all(MaterialShapes shape) { return appendToAll(shape.prefixes); } - /** Returns cast (triple) plates if 528 mode is enabled or normal plates if not */ - public String plate528() { return GeneralConfig.enable528 ? plateCast() : plate(); } - private String[] appendToAll(String... prefix) { String[] names = new String[mats.length * prefix.length]; diff --git a/src/main/java/com/hbm/inventory/gui/GUIScreenRadioTorch.java b/src/main/java/com/hbm/inventory/gui/GUIScreenRadioTorch.java index cfd090b59..9300e8e60 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIScreenRadioTorch.java +++ b/src/main/java/com/hbm/inventory/gui/GUIScreenRadioTorch.java @@ -71,7 +71,7 @@ public class GUIScreenRadioTorch extends GuiScreen { this.remap[i].setTextColor(0x00ff00); this.remap[i].setDisabledTextColour(0x00ff00); this.remap[i].setEnableBackgroundDrawing(false); - this.remap[i].setMaxStringLength(15); + this.remap[i].setMaxStringLength(32); this.remap[i].setText(radio.mapping[i] == null ? "" : radio.mapping[i]); } } diff --git a/src/main/java/com/hbm/inventory/gui/element/GuiFileList.java b/src/main/java/com/hbm/inventory/gui/element/GuiFileList.java new file mode 100644 index 000000000..63364f3d4 --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/element/GuiFileList.java @@ -0,0 +1,99 @@ +package com.hbm.inventory.gui.element; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiListExtended; +import net.minecraft.client.renderer.Tessellator; + +@SideOnly(Side.CLIENT) +public class GuiFileList extends GuiListExtended { + + private List rows = new ArrayList<>(); + private int selectedId = -1; + + public GuiFileList(Minecraft mc, File[] files, Consumer onSelect, String nameFilter, int width, int height, int top, int bottom, int slotHeight) { + super(mc, width, height, top, bottom, slotHeight); + + for(File file : files) { + if(file.getName().equals(nameFilter + ".nbt")) { + selectedId = rows.size(); + } + rows.add(new Row(file, onSelect, width, slotHeight)); + } + } + + @Override + public IGuiListEntry getListEntry(int id) { + return rows.get(id); + } + + @Override + protected int getSize() { + return rows.size(); + } + + @Override + protected boolean isSelected(int id) { + return id == selectedId; + } + + public void select(String nameFilter) { + for(int i = 0; i < rows.size(); i++) { + Row row = rows.get(i); + if(row.file.getName().equals(nameFilter + ".nbt")) { + selectedId = i; + return; + } + } + } + + @SideOnly(Side.CLIENT) + public static class Row implements IGuiListEntry { + + private final Minecraft mc; + private final File file; + + private final int width; + private final int height; + + private final Consumer onSelect; + + public Row(File file, Consumer onSelect, int width, int height) { + this.mc = Minecraft.getMinecraft(); + this.file = file; + + this.width = width; + this.height = height; + + this.onSelect = onSelect; + } + + @Override + public void drawEntry(int id, int x, int y, int width, int height, Tessellator tess, int mouseX, int mouseY, boolean isVisible) { + mc.fontRenderer.drawString(file.getName(), x + 20, y + 1, 0xFFFFFF); + } + + @Override + public boolean mousePressed(int id, int mouseX, int mouseY, int button, int hoverX, int hoverY) { + if(hoverX < 0 || hoverX > width) return false; + if(hoverY < 0 || hoverY > height) return false; + + onSelect.accept(file); + + return true; + } + + @Override + public void mouseReleased(int id, int mouseX, int mouseY, int button, int hoverX, int hoverY) { + + } + + } + +} diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java index 1d044fea2..99f5fec56 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblerRecipes.java @@ -71,7 +71,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModItems.hazmat_cloth, 4), new AStack[] {new OreDictStack(PB.dust(), 4), new ComparableStack(Items.string, 8), },50); makeRecipe(new ComparableStack(ModItems.asbestos_cloth, 4), new AStack[] {new OreDictStack(ASBESTOS.ingot(), 2), new ComparableStack(Items.string, 6), new ComparableStack(Blocks.wool, 1), },50); makeRecipe(new ComparableStack(ModItems.filter_coal, 1), new AStack[] {new OreDictStack(COAL.dust(), 4), new ComparableStack(Items.string, 2), new ComparableStack(Items.paper, 1), },50); - makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 4), new OreDictStack(TI.plate528(), 4), new ComparableStack(ModItems.motor, 1), }, 100); + makeRecipe(new ComparableStack(ModItems.centrifuge_element, 1), new AStack[] {new OreDictStack(STEEL.plate(), 4), new OreDictStack(TI.plate(), 4), new ComparableStack(ModItems.motor, 1), }, 100); makeRecipe(new ComparableStack(ModItems.reactor_core, 1), new AStack[] {new OreDictStack(PB.ingot(), 8), new OreDictStack(BE.ingot(), 6), new OreDictStack(STEEL.plate(), 16), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(FIBER.ingot(), 2) },100); makeRecipe(new ComparableStack(ModItems.rtg_unit, 1), new AStack[] {new ComparableStack(ModItems.thermo_element, 2), new OreDictStack(CU.plateCast(), 1), new OreDictStack(PB.ingot(), 2), new OreDictStack(STEEL.plate(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.CAPACITOR.ordinal()), },100); makeRecipe(new ComparableStack(ModItems.drill_titanium, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(DURA.ingot(), 2), new OreDictStack(DURA.bolt(), 4), new OreDictStack(TI.plate(), 6), },100); @@ -111,33 +111,33 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.cmb_brick_reinforced, 8), new AStack[] {new ComparableStack(ModBlocks.block_magnetized_tungsten, 4), new ComparableStack(ModBlocks.brick_concrete, 4), new ComparableStack(ModBlocks.cmb_brick, 1), new OreDictStack(STEEL.plate(), 4), },200); makeRecipe(new ComparableStack(ModBlocks.seal_frame, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(AL.wireFine(), 4), new OreDictStack(REDSTONE.dust(), 2), new ComparableStack(ModBlocks.steel_roof, 5), },50); makeRecipe(new ComparableStack(ModBlocks.seal_controller, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(MINGRADE.ingot(), 1), new OreDictStack(REDSTONE.dust(), 4), new ComparableStack(ModBlocks.steel_roof, 5), },100); - makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG), }, 200); - makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()) }, 300); + makeRecipe(new ComparableStack(ModBlocks.machine_centrifuge, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new OreDictStack(CU.plate(), 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG), }, 200); + makeRecipe(new ComparableStack(ModBlocks.machine_gascent, 1), new AStack[] {new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.coil_tungsten, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()) }, 300); makeRecipe(new ComparableStack(ModBlocks.machine_diesel, 1), new AStack[] {new OreDictStack(STEEL.shell(), 1), new ComparableStack(ModItems.piston_selenium, 1), new OreDictStack(STEEL.plateCast(), 1), new ComparableStack(ModItems.coil_copper, 4), }, 60); - makeRecipe(new ComparableStack(ModBlocks.machine_rtg_grey, 1), new AStack[] {new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 3), },200); + makeRecipe(new ComparableStack(ModBlocks.machine_rtg_grey, 1), new AStack[] {new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate(), 4), new OreDictStack(MINGRADE.wireFine(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 3), },200); makeRecipe(new ComparableStack(ModBlocks.machine_battery, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 1), new OreDictStack(S.dust(), 12), new OreDictStack(PB.dust(), 12) },100); makeRecipe(new ComparableStack(ModBlocks.machine_lithium_battery, 1), new AStack[] {new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(CO.dust(), 12), new OreDictStack(LI.dust(), 12) },100); makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_battery, 1), new AStack[] {new OreDictStack(DESH.ingot(), 16), new OreDictStack(NP237.dust(), 12), new OreDictStack(SA326.dust(), 12) },200); makeRecipe(new ComparableStack(ModBlocks.machine_dineutronium_battery, 1), new AStack[] {new OreDictStack(DNT.ingot(), 24), new ComparableStack(ModItems.powder_spark_mix, 12), new ComparableStack(ModItems.battery_spark_cell_1000, 1), new OreDictStack(CMB.ingot(), 32) }, 300); - makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2) },200); + makeRecipe(new ComparableStack(ModBlocks.machine_shredder, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModBlocks.steel_beam, 2), new ComparableStack(Blocks.iron_bars, 2) },200); makeRecipe(new ComparableStack(ModBlocks.machine_well, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 20), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.pipes_steel, 1), new ComparableStack(ModItems.drill_titanium, 1) }, 200); makeRecipe(new ComparableStack(ModBlocks.machine_pumpjack, 1), new AStack[] {new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.plateWelded(), 8), new ComparableStack(ModItems.pipes_steel, 4), new ComparableStack(ModItems.tank_steel, 4), new OreDictStack(STEEL.plate(), 32), new ComparableStack(ModItems.drill_titanium, 1), new ComparableStack(ModItems.motor_desh) }, 400); - makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.tank_steel, 1), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.thermo_element, 3), },200); - makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200); - makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate528(), 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG) },350); + makeRecipe(new ComparableStack(ModBlocks.machine_flare, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(IRON.ingot(), 12), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.tank_steel, 1), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.thermo_element, 3), },200); + makeRecipe(new ComparableStack(ModBlocks.machine_coker, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(IRON.ingot(), 16), new OreDictStack(CU.plate(), 8), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.tank_steel, 2), new ComparableStack(ModBlocks.steel_grate, 4) },200); + makeRecipe(new ComparableStack(ModBlocks.machine_refinery, 1), new AStack[] {!exp ? new OreDictStack(STEEL.plateWelded(), 3) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(CU.plate(), 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG) },350); makeRecipe(new ComparableStack(ModBlocks.machine_epress, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.part_generic, 2, EnumPartType.PISTON_HYDRAULIC.ordinal()), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC) }, 100); makeRecipe(new ComparableStack(ModBlocks.machine_chemical_plant, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 8), new OreDictStack(CU.pipe(), 2), new ComparableStack(ModItems.plate_polymer, 16), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.coil_tungsten, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG) }, 200); makeRecipe(new ComparableStack(ModBlocks.machine_crystallizer, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(TI.shell(), 3), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC), },200); - makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate528(), 6), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4), },150); - makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150); + makeRecipe(new ComparableStack(ModBlocks.machine_fluidtank, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 2), new OreDictStack(STEEL.plate(), 6), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4), },150); + makeRecipe(new ComparableStack(ModBlocks.machine_bat9000, 1), new AStack[] {new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16), },150); makeRecipe(new ComparableStack(ModBlocks.machine_orbus, 1), new AStack[] {new OreDictStack(STEEL.ingot(), 12), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plate(), 12), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1) }, 200); - makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate528(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400); + makeRecipe(new ComparableStack(ModBlocks.machine_mining_laser, 1), new AStack[] {new ComparableStack(ModItems.tank_steel, 3), !exp ? new OreDictStack(STEEL.plate(), 16) : new OreDictStack(STEEL.heavyComp(), 3), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.motor, 3), !exp ? new OreDictStack(DURA.ingot(), 4) : new OreDictStack(DESH.heavyComp(), 1), new OreDictStack(DURA.bolt(), 8), new ComparableStack(ModBlocks.machine_battery, 3), },400); makeRecipe(new ComparableStack(ModBlocks.machine_turbofan, 1), new AStack[] {!exp ? new OreDictStack(TI.shell(), 8) : new OreDictStack(TI.heavyComp(), 1), new OreDictStack(DURA.pipe(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 12), new ComparableStack(ModItems.turbine_tungsten, 1), new OreDictStack(GOLD.wireDense(), 12), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal()) }, 300); makeRecipe(new ComparableStack(ModBlocks.machine_turbinegas, 1), new AStack[] {!exp ? new OreDictStack(STEEL.shell(), 10) : new OreDictStack(STEEL.heavyComp(), 2), new OreDictStack(GOLD.wireDense(), 12), new OreDictStack(DURA.pipe(), 4), new ComparableStack(ModBlocks.steel_scaffold, 8), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.turbine_tungsten, 3), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.ingot_rubber, 4), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.BASIC.ordinal())}, 600); - makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate528(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300); + makeRecipe(new ComparableStack(ModBlocks.machine_teleporter, 1), new AStack[] {new OreDictStack(TI.ingot(), 8), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1) },300); makeRecipe(new ComparableStack(ModBlocks.machine_schrabidium_transmutator, 1), new AStack[] {new OreDictStack(MAGTUNG.ingot(), 1), !exp ? new OreDictStack(TI.ingot(), 24) : new OreDictStack(TI.heavyComp(), 2), !exp ? new OreDictStack(ALLOY.plate(), 18) : new OreDictStack(ALLOY.heavyComp(), 1), new OreDictStack(STEEL.plateWelded(), 12), new ComparableStack(ModItems.plate_desh, 6), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModBlocks.machine_battery, 5), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.ADVANCED.ordinal()), },500); makeRecipe(new ComparableStack(ModBlocks.fusion_conductor, 1), new AStack[] {new ComparableStack(ModItems.coil_advanced_alloy, 5), }, 100); - makeRecipe(new ComparableStack(ModBlocks.fusion_center, 1), new AStack[] {new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(STEEL.plate528(), 6), new OreDictStack(ALLOY.wireFine(), 24), },200); + makeRecipe(new ComparableStack(ModBlocks.fusion_center, 1), new AStack[] {new OreDictStack(ANY_HARDPLASTIC.ingot(), 4), new OreDictStack(STEEL.plate(), 6), new OreDictStack(ALLOY.wireFine(), 24), },200); makeRecipe(new ComparableStack(ModBlocks.fusion_motor, 1), new AStack[] {new OreDictStack(TI.ingot(), 4), new OreDictStack(STEEL.ingot(), 2), new ComparableStack(ModItems.motor, 4), },250); makeRecipe(new ComparableStack(ModBlocks.fusion_heater, 4), new AStack[] {new OreDictStack(W.plateWelded(), 2), new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.magnetron, 2) }, 200); makeRecipe(new ComparableStack(ModBlocks.watz_element, 3), new AStack[] {new OreDictStack(STEEL.plateCast(), 2), new OreDictStack(ZR.ingot(), 2), new OreDictStack(BIGMT.ingot(), 2), new OreDictStack(ANY_HARDPLASTIC.ingot(), 4)},200); @@ -173,26 +173,26 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModItems.explosive_lenses, 1), new AStack[] {new OreDictStack(AL.plate(), 8), new OreDictStack(MINGRADE.wireFine(), 16), new OreDictStack(ANY_PLASTICEXPLOSIVE.ingot(), 4), new OreDictStack(CU.plate(), 2), new ComparableStack(ModItems.ball_tatb, 16), new OreDictStack(RUBBER.ingot(), 2)},500); //8 HE (To use 16 PBX ingots; rubber inserts) lenses w/ improved bridge-wire detonators, thin aluminum pushers, & duraluminum shell makeRecipe(new ComparableStack(ModItems.gadget_wireing, 1), new AStack[] {new OreDictStack(IRON.plate(), 1), new OreDictStack(GOLD.wireFine(), 12), },100); makeRecipe(new ComparableStack(ModItems.gadget_core, 1), new AStack[] {new OreDictStack(PU239.nugget(), 7), new OreDictStack(U238.nugget(), 3), },200); - makeRecipe(new ComparableStack(ModItems.boy_shielding, 1), new AStack[] {new OreDictStack(OreDictManager.getReflector(), 12), new OreDictStack(STEEL.plate528(), 4), },150); + makeRecipe(new ComparableStack(ModItems.boy_shielding, 1), new AStack[] {new OreDictStack(OreDictManager.getReflector(), 12), new OreDictStack(STEEL.plate(), 4), },150); makeRecipe(new ComparableStack(ModItems.boy_target, 1), new AStack[] {new OreDictStack(U235.nugget(), 18), },200); makeRecipe(new ComparableStack(ModItems.boy_bullet, 1), new AStack[] {new OreDictStack(U235.nugget(), 9), },100); - makeRecipe(new ComparableStack(ModItems.boy_propellant, 1), new AStack[] {new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate528(), 8), new OreDictStack(AL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 4), },100); - makeRecipe(new ComparableStack(ModItems.boy_igniter, 1), new AStack[] {new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 1), new OreDictStack(AL.plate528(), 6), new OreDictStack(STEEL.plate528(), 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 3), },150); //HE for gating purposes - makeRecipe(new ComparableStack(ModItems.man_igniter, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 9), },150); + makeRecipe(new ComparableStack(ModItems.boy_propellant, 1), new AStack[] {new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate(), 8), new OreDictStack(AL.plate(), 4), new OreDictStack(MINGRADE.wireFine(), 4), },100); + makeRecipe(new ComparableStack(ModItems.boy_igniter, 1), new AStack[] {new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 1), new OreDictStack(AL.plate(), 6), new OreDictStack(STEEL.plate(), 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 3), },150); //HE for gating purposes + makeRecipe(new ComparableStack(ModItems.man_igniter, 1), new AStack[] {new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 9), },150); makeRecipe(new ComparableStack(ModItems.man_core, 1), new AStack[] {new OreDictStack(PU239.nugget(), 8), new OreDictStack(BE.nugget(), 2), },250); makeRecipe(new ComparableStack(ModItems.mike_core, 1), new AStack[] {new OreDictStack(U238.nugget(), 24), new OreDictStack(PB.ingot(), 6), },250); - makeRecipe(new ComparableStack(ModItems.mike_deut, 1), new AStack[] {new OreDictStack(IRON.plate528(), 12), new OreDictStack(STEEL.plate528(), 16), new ComparableStack(ModItems.cell_deuterium, 10), },200); - makeRecipe(new ComparableStack(ModItems.mike_cooling_unit, 1), new AStack[] {new OreDictStack(IRON.plate528(), 8), new ComparableStack(ModItems.coil_copper, 5), new ComparableStack(ModItems.coil_tungsten, 5), new ComparableStack(ModItems.motor, 2), },200); - makeRecipe(new ComparableStack(ModItems.fleija_igniter, 1), new AStack[] {new OreDictStack(TI.plate528(), 6), new OreDictStack(SA326.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), },300); + makeRecipe(new ComparableStack(ModItems.mike_deut, 1), new AStack[] {new OreDictStack(IRON.plate(), 12), new OreDictStack(STEEL.plate(), 16), new ComparableStack(ModItems.cell_deuterium, 10), },200); + makeRecipe(new ComparableStack(ModItems.mike_cooling_unit, 1), new AStack[] {new OreDictStack(IRON.plate(), 8), new ComparableStack(ModItems.coil_copper, 5), new ComparableStack(ModItems.coil_tungsten, 5), new ComparableStack(ModItems.motor, 2), },200); + makeRecipe(new ComparableStack(ModItems.fleija_igniter, 1), new AStack[] {new OreDictStack(TI.plate(), 6), new OreDictStack(SA326.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), },300); makeRecipe(new ComparableStack(ModItems.fleija_core, 1), new AStack[] {new OreDictStack(U235.nugget(), 8), new OreDictStack(NP237.nugget(), 2), new OreDictStack(BE.nugget(), 4), new ComparableStack(ModItems.coil_copper, 2), },500); makeRecipe(new ComparableStack(ModItems.fleija_propellant, 1), new AStack[] {new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 3), new OreDictStack(SA326.plate(), 8), },400); - makeRecipe(new ComparableStack(ModItems.solinium_igniter, 1), new AStack[] {new OreDictStack(TI.plate528(), 4), new OreDictStack(ALLOY.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new ComparableStack(ModItems.coil_gold, 1), },400); + makeRecipe(new ComparableStack(ModItems.solinium_igniter, 1), new AStack[] {new OreDictStack(TI.plate(), 4), new OreDictStack(ALLOY.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new ComparableStack(ModItems.coil_gold, 1), },400); makeRecipe(new ComparableStack(ModItems.solinium_core, 1), new AStack[] {new OreDictStack(SA327.nugget(), 9), new OreDictStack(EUPH.nugget(), 1), },400); makeRecipe(new ComparableStack(ModItems.solinium_propellant, 1), new AStack[] {new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 3), new OreDictStack(OreDictManager.getReflector(), 2), new ComparableStack(ModItems.plate_polymer, 6), new OreDictStack(W.wireFine(), 6), new ComparableStack(ModItems.biomass_compressed, 4), },350); makeRecipe(new ComparableStack(ModItems.schrabidium_hammer, 1), new AStack[] {new OreDictStack(SA326.block(), 35), new ComparableStack(ModItems.billet_yharonite, 128), new ComparableStack(Items.nether_star, 3), new ComparableStack(ModItems.fragment_meteorite, 512), },1000); - makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate528(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 8), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300); + makeRecipe(new ComparableStack(ModBlocks.machine_radar, 1), new AStack[] {new OreDictStack(STEEL.plate(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 8), new ComparableStack(ModItems.magnetron, 3), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.coil_copper, 12), new ComparableStack(ModItems.crt_display, 4), },300); makeRecipe(new ComparableStack(ModBlocks.machine_radar_large, 1), new AStack[] {new OreDictStack(STEEL.plateWelded(), 6), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(ANY_RUBBER.ingot(), 16), new ComparableStack(ModItems.magnetron, 12), new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.coil_copper, 32), new ComparableStack(ModItems.crt_display, 4), },600); - makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate528(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.machine_transformer, 1), },1000); + makeRecipe(new ComparableStack(ModBlocks.machine_forcefield, 1), new AStack[] {new OreDictStack(ALLOY.plate(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.machine_transformer, 1), },1000); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_kerosene, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.pipe(), 1), new OreDictStack(W.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_solid, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new ComparableStack(ModItems.coil_tungsten, 1), new OreDictStack(DURA.ingot(), 4), new OreDictStack(STEEL.plate(), 4), },100); makeRecipe(new ComparableStack(ModItems.mp_thruster_10_xenon, 1), new AStack[] {new ComparableStack(ModItems.seg_10, 1), new OreDictStack(STEEL.plate(), 4), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.arc_electrode, 4), },100); @@ -372,7 +372,7 @@ import net.minecraft.item.ItemStack; new ComparableStack(ModItems.ingot_cft, 128) }, 1200); makeRecipe(new ComparableStack(ModBlocks.machine_combustion_engine, 1), new AStack[] { - new OreDictStack(STEEL.plate528(), 16), + new OreDictStack(STEEL.plate(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new OreDictStack(STEEL.shell(), 3), @@ -487,7 +487,7 @@ import net.minecraft.item.ItemStack; }, 100); makeRecipe(new ComparableStack(ModBlocks.machine_large_turbine, 1), new AStack[] { - !exp ? new OreDictStack(STEEL.plate528(), 12) : new OreDictStack(STEEL.heavyComp(), 1), + !exp ? new OreDictStack(STEEL.plate(), 12) : new OreDictStack(STEEL.heavyComp(), 1), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 6), @@ -498,7 +498,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_chungus, 1), new AStack[] { new OreDictStack(STEEL.shell(), 6), !exp ? new OreDictStack(STEEL.plateWelded(), 16) : new OreDictStack(STEEL.heavyComp(), 3), - !exp ? new OreDictStack(TI.plate528(), 12) : new OreDictStack(TI.heavyComp(), 1), + !exp ? new OreDictStack(TI.plate(), 12) : new OreDictStack(TI.heavyComp(), 1), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 16), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 3), @@ -511,7 +511,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_condenser_powered, 1), new AStack[] { !exp ? new OreDictStack(STEEL.plateWelded(), 8) : new OreDictStack(STEEL.heavyComp(), 3), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4), - !exp ? new OreDictStack(CU.plate528(), 16) : new OreDictStack(CU.heavyComp(), 3), + !exp ? new OreDictStack(CU.plate(), 16) : new OreDictStack(CU.heavyComp(), 3), new ComparableStack(ModItems.motor_desh, 3), new OreDictStack(STEEL.pipe(), 24), new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 4) @@ -521,8 +521,8 @@ import net.minecraft.item.ItemStack; new ComparableStack(ModBlocks.machine_lithium_battery, 3), new OreDictStack(ND.wireDense(), 32), !exp ? new OreDictStack(STEEL.ingot(), 16) : new OreDictStack(STEEL.heavyComp(), 3), - new OreDictStack(STEEL.plate528(), 32), - new OreDictStack(AL.plate528(), 32), + new OreDictStack(STEEL.plate(), 32), + new OreDictStack(AL.plate(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new OreDictStack(CU.plateCast(), 8), @@ -772,7 +772,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.rbmk_blank, 1), new AStack[] { new ComparableStack(ModBlocks.concrete_asbestos, 4), - !exp ? new OreDictStack(STEEL.plate528(), 4) : new OreDictStack(STEEL.plateCast(), 16), + !exp ? new OreDictStack(STEEL.plate(), 4) : new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(CU.ingot(), 4), new ComparableStack(ModItems.plate_polymer, 4) }, 100); @@ -793,14 +793,14 @@ import net.minecraft.item.ItemStack; new ComparableStack(ModBlocks.machine_difurnace_off, 1), new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(DESH.ingot(), 4), - new OreDictStack(PB.plate528(), 6), + new OreDictStack(PB.plate(), 6), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(CU.plate(), 12) }, 150); makeRecipe(new ComparableStack(ModBlocks.machine_vacuum_distill, 1), new AStack[] { !exp ? new OreDictStack(STEEL.plateCast(), 16) : new OreDictStack(STEEL.heavyComp(), 4), - !exp ? new OreDictStack(CU.plate528(), 16) : new OreDictStack(CU.heavyComp(), 4), + !exp ? new OreDictStack(CU.plate(), 16) : new OreDictStack(CU.heavyComp(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.pipe(), 12), @@ -809,7 +809,7 @@ import net.minecraft.item.ItemStack; }, 200); makeRecipe(new ComparableStack(ModBlocks.machine_catalytic_reformer, 1), new AStack[] { !exp ? new OreDictStack(STEEL.plateCast(), 12) : new OreDictStack(STEEL.heavyComp(), 4), - !exp ? new OreDictStack(CU.plate528(), 8) : new OreDictStack(CU.heavyComp(), 2), + !exp ? new OreDictStack(CU.plate(), 8) : new OreDictStack(CU.heavyComp(), 2), new OreDictStack(NB.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(STEEL.shell(), 3), @@ -838,7 +838,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_compressor, 1), new AStack[] { new OreDictStack(STEEL.plateCast(), 8), - new OreDictStack(CU.plate528(), 4), + new OreDictStack(CU.plate(), 4), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG) @@ -853,7 +853,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_electrolyser, 1), new AStack[] { !exp ? new OreDictStack(STEEL.plateCast(), 8) : new OreDictStack(STEEL.heavyComp(), 2), - !exp ? new OreDictStack(CU.plate528(), 16) : new OreDictStack(CU.heavyComp(), 1), + !exp ? new OreDictStack(CU.plate(), 16) : new OreDictStack(CU.heavyComp(), 1), new OreDictStack(RUBBER.ingot(), 8), new OreDictStack(STEEL.shell(), 3), new ComparableStack(ModItems.ingot_firebrick, 16), @@ -1069,8 +1069,8 @@ import net.minecraft.item.ItemStack; new ComparableStack(ModBlocks.hadron_coil_neodymium, 8), new OreDictStack(ALLOY.wireFine(), 64), new OreDictStack(STEEL.ingot(), 16), - new OreDictStack(STEEL.plate528(), 32), - new OreDictStack(AL.plate528(), 32), + new OreDictStack(STEEL.plate(), 32), + new OreDictStack(AL.plate(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new OreDictStack(CU.plateCast(), 8), @@ -1080,7 +1080,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.rbmk_console, 1), new AStack[] { new OreDictStack(STEEL.ingot(), 16), - new OreDictStack(AL.plate528(), 32), + new OreDictStack(AL.plate(), 32), new OreDictStack(ANY_RUBBER.ingot(), 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC), new ComparableStack(ModItems.circuit, 20, EnumCircuitType.CAPACITOR_BOARD), @@ -1089,7 +1089,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.rbmk_crane_console, 1), new AStack[] { new OreDictStack(STEEL.ingot(), 16), - new OreDictStack(AL.plate528(), 8), + new OreDictStack(AL.plate(), 8), new OreDictStack(ANY_RUBBER.ingot(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC), new ComparableStack(ModItems.circuit, 10, EnumCircuitType.CAPACITOR_BOARD), @@ -1145,7 +1145,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_liquefactor), new AStack[] { new OreDictStack(STEEL.ingot(), 8), - new OreDictStack(CU.plate528(), 12), + new OreDictStack(CU.plate(), 12), new OreDictStack(ANY_TAR.any(), 8), new OreDictStack(STEEL.shell(), 3), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), @@ -1155,7 +1155,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_solidifier), new AStack[] { new OreDictStack(ANY_CONCRETE.any(), 8), - new OreDictStack(AL.plate528(), 12), + new OreDictStack(AL.plate(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(STEEL.shell(), 3), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), @@ -1166,7 +1166,7 @@ import net.minecraft.item.ItemStack; makeRecipe(new ComparableStack(ModBlocks.machine_radiolysis), new AStack[] { new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(RUBBER.ingot(), 8), - new OreDictStack(PB.plate528(), 12), + new OreDictStack(PB.plate(), 12), new OreDictStack(CU.plateCast(), 4), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.thermo_element, 8) diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java index 68668dd57..2daebaf5f 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java @@ -125,7 +125,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { // machine parts this.register(new GenericRecipe("ass.centrifugetower").setup(100, 100).outputItems(new ItemStack(ModItems.centrifuge_element, 1)) - .inputItems(new OreDictStack(DURA.plate528(), 4), new OreDictStack(TI.plate528(), 4), new ComparableStack(ModItems.motor, 1))); + .inputItems(new OreDictStack(DURA.plate(), 4), new OreDictStack(TI.plate(), 4), new ComparableStack(ModItems.motor, 1))); this.register(new GenericRecipe("ass.reactorcore").setup(100, 100).outputItems(new ItemStack(ModItems.reactor_core, 1)) .inputItems(new OreDictStack(PB.plateCast(), 4), new OreDictStack(BE.ingot(), 8), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(ASBESTOS.ingot(), 4))); this.register(new GenericRecipe("ass.thermoelement").setup(60, 100).outputItems(new ItemStack(ModItems.thermo_element, 1)) @@ -222,7 +222,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { // machines this.register(new GenericRecipe("ass.shredder").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_shredder, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.motor, 2)) + .inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.motor, 2)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.STEEL_PLATING), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.motor, 2))); this.register(new GenericRecipe("ass.assembler").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_assembly_machine, 1)) .inputItems(new OreDictStack(STEEL.ingot(), 4), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG))); @@ -232,11 +232,13 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.purex").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_purex, 1)) .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(RUBBER.pipe(), 8), new OreDictStack(PB.plateCast(), 4), new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.LEAD_PLATING), new OreDictStack(STEEL.shell(), 4), new OreDictStack(RUBBER.pipe(), 12), new ComparableStack(ModItems.motor_desh, 3), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT))); + this.register(new GenericRecipe("ass.precass").setup(1_200, 100).outputItems(new ItemStack(ModBlocks.machine_precass, 1)) + .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(ZR.ingot(), 8), new ComparableStack(ModItems.motor, 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CAPACITOR_BOARD))); this.register(new GenericRecipe("ass.centrifuge").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_centrifuge, 1)) - .inputItems(new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(STEEL.plate528(), 8), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)) + .inputItems(new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(STEEL.plate(), 8), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)) .inputItemsEx(new ComparableStack(ModItems.centrifuge_element, 1), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.STEEL_PLATING), new OreDictStack(CU.plateCast(), 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG))); this.register(new GenericRecipe("ass.gascent").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_gascent, 1)) - .inputItems(new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate528(), 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal())) + .inputItems(new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(ANY_PLASTIC.ingot(), 8), new OreDictStack(DESH.ingot(), 2), new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal())) .inputItemsEx(new ComparableStack(ModItems.centrifuge_element, 4), new OreDictStack(STEEL.plateWelded(), 4), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.arcfurnace").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_arc_furnace, 1)) .inputItems(new OreDictStack(ANY_CONCRETE.any(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.ingot_firebrick, 16),new OreDictStack(STEEL.plateCast(), 8), new ComparableStack(ModBlocks.machine_transformer, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG.ordinal())) @@ -245,10 +247,10 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new OreDictStack(STEEL.plateWelded(), 2), new OreDictStack(TI.shell(), 3), new OreDictStack(DESH.ingot(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 2, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(TI.shell(), 3), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.electrolyzer").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_electrolyser, 1)) - .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate528(), 16), new OreDictStack(TI.shell(), 3), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.ingot_firebrick, 16), new ComparableStack(ModItems.coil_copper, 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC)) + .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate(), 16), new OreDictStack(TI.shell(), 3), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.ingot_firebrick, 16), new ComparableStack(ModItems.coil_copper, 16), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(TI.shell(), 3), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.ingot_firebrick, 16), new ComparableStack(ModItems.coil_copper, 16), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.rtg").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_rtg_grey, 1)) - .inputItems(new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4))); + .inputItems(new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(STEEL.plate(), 4), new OreDictStack(MINGRADE.wireFine(), 16), new OreDictStack(ANY_PLASTIC.ingot(), 4))); this.register(new GenericRecipe("ass.derrick").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_well, 1)) .inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(CU.plateCast(), 2), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.drill_titanium, 1)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.STEEL_PLATING), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.drill_titanium, 1))); @@ -259,25 +261,25 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new OreDictStack(STEEL.shell(), 24), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModBlocks.concrete_smooth, 64), new ComparableStack(ModItems.drill_titanium), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.plate_desh, 24), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.FERRO_PLATING), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModBlocks.concrete_smooth, 64), new ComparableStack(ModItems.drill_titanium), new ComparableStack(ModItems.motor_desh, 5), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.flarestack").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_flare, 1)) - .inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(CU.plate528(), 4), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.thermo_element, 3)) - .inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING), new OreDictStack(CU.plate528(), 4), new ComparableStack(ModItems.thermo_element, 3))); + .inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(CU.plate(), 4), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.thermo_element, 3)) + .inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING), new OreDictStack(CU.plate(), 4), new ComparableStack(ModItems.thermo_element, 3))); this.register(new GenericRecipe("ass.refinery").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_refinery, 1)) - .inputItems(new OreDictStack(STEEL.plateWelded(), 3), new OreDictStack(CU.plate528(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG)) + .inputItems(new OreDictStack(STEEL.plateWelded(), 3), new OreDictStack(CU.plate(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.STEEL_PLATING), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.plate_polymer, 8), new ComparableStack(ModItems.circuit, 5, EnumCircuitType.ANALOG))); this.register(new GenericRecipe("ass.crackingtower").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_catalytic_cracker, 1)) .inputItems(new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(STEEL.shell(), 6), new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(NB.ingot(), 2), new ComparableStack(ModItems.catalyst_clay, 12)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING), new OreDictStack(ANY_PLASTIC.ingot(), 16), new OreDictStack(NB.ingot(), 4))); this.register(new GenericRecipe("ass.radiolysis").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_radiolysis, 1)) - .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(PB.plate528(), 12), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.thermo_element, 8)) + .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(PB.plate(), 12), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 8), new ComparableStack(ModItems.thermo_element, 8)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new OreDictStack(CU.plateCast(), 4), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModItems.thermo_element, 8))); this.register(new GenericRecipe("ass.coker").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_coker, 1)) - .inputItems(new OreDictStack(STEEL.plateWelded(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(CU.plate528(), 8), new OreDictStack(RUBBER.ingot(), 4), new OreDictStack(NB.ingot(), 4)) + .inputItems(new OreDictStack(STEEL.plateWelded(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(CU.plate(), 8), new OreDictStack(RUBBER.ingot(), 4), new OreDictStack(NB.ingot(), 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.STEEL_PLATING), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(NB.ingot(), 4))); this.register(new GenericRecipe("ass.vaccumrefinery").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_vacuum_distill, 1)) - .inputItems(new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(CU.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.motor_desh, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CHIP_BISMOID)) + .inputItems(new OreDictStack(STEEL.plateCast(), 16), new OreDictStack(CU.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.sphere_steel, 1), new OreDictStack(STEEL.pipe(), 12), new ComparableStack(ModItems.motor_desh, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.CHIP_BISMOID)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.FERRO_PLATING), new OreDictStack(DURA.pipe(), 16), new ComparableStack(ModItems.motor_desh, 3), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CHIP_BISMOID), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.COMPUTER))); this.register(new GenericRecipe("ass.reformer").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_catalytic_reformer, 1)) - .inputItems(new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(CU.plate528(), 8), new OreDictStack(NB.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(STEEL.shell(), 3), new OreDictStack(STEEL.pipe(), 8), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)) + .inputItems(new OreDictStack(STEEL.plateCast(), 12), new OreDictStack(CU.plate(), 8), new OreDictStack(NB.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(STEEL.shell(), 3), new OreDictStack(STEEL.pipe(), 8), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(NB.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(DURA.pipe(), 16), new ComparableStack(ModItems.motor, 8), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.COMPUTER))); this.register(new GenericRecipe("ass.hydrotreater").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_hydrotreater, 1)) .inputItems(new OreDictStack(STEEL.plateWelded(), 8), new OreDictStack(CU.plateCast(), 4), new OreDictStack(NB.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(STEEL.shell(), 2), new OreDictStack(STEEL.pipe(), 8), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)) @@ -286,13 +288,13 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new OreDictStack(STEEL.plateWelded(), 16), new OreDictStack(ANY_HARDPLASTIC.ingot(), 16), new ComparableStack(ModItems.ingot_cft, 4), new OreDictStack(CU.pipe(), 12), new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BISMOID)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 6, EnumExpensiveType.BRONZE_TUBES), new OreDictStack(ANY_HARDPLASTIC.ingot(), 32), new ComparableStack(ModItems.ingot_cft, 4), new ComparableStack(ModItems.motor_bismuth, 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BISMOID), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.COMPUTER))); this.register(new GenericRecipe("ass.liquefactor").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_liquefactor, 1)) - .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(CU.plate528(), 12), new OreDictStack(ANY_TAR.any(), 4), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.coil_tungsten, 8)) + .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(CU.plate(), 12), new OreDictStack(ANY_TAR.any(), 4), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.coil_tungsten, 8)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(ANY_TAR.any(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR))); this.register(new GenericRecipe("ass.solidifier").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_solidifier, 1)) - .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(AL.plate528(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.coil_copper, 4)) + .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(AL.plate(), 12), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.circuit, 12, EnumCircuitType.CAPACITOR), new ComparableStack(ModItems.coil_copper, 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.CAPACITOR))); this.register(new GenericRecipe("ass.compressor").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_compressor, 1)) - .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate528(), 4), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)) + .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate(), 4), new OreDictStack(STEEL.shell(), 2), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.STEEL_PLATING), new OreDictStack(STEEL.shell(), 4), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 3, EnumCircuitType.ANALOG))); this.register(new GenericRecipe("ass.compactcompressor").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_compressor_compact, 1)) .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(TI.shell(), 4), new OreDictStack(CU.pipe(), 4), new ComparableStack(ModItems.motor, 2), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) @@ -331,20 +333,20 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.slopper").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_ore_slopper, 1)) .inputItems(new OreDictStack(STEEL.plateCast(), 6), new OreDictStack(TI.plate(), 8), new OreDictStack(CU.pipe(), 3), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ANALOG))); this.register(new GenericRecipe("ass.mininglaser").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_mining_laser, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(TI.shell(), 4), new OreDictStack(DURA.plate(), 4), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.motor, 3)) + .inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(TI.shell(), 4), new OreDictStack(DURA.plate(), 4), new ComparableStack(ModItems.crystal_redstone, 3), new ComparableStack(Items.diamond, 3), new OreDictStack(ANY_PLASTIC.ingot(), 8), new ComparableStack(ModItems.motor, 3)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(DURA.plate(), 4), new ComparableStack(ModItems.crystal_redstone, 12), new OreDictStack(ANY_PLASTIC.ingot(), 16), new ComparableStack(ModItems.motor_desh, 3))); this.register(new GenericRecipe("ass.teleporter").setup(100, 100).outputItems(new ItemStack(ModBlocks.machine_teleporter, 1)) - .inputItems(new OreDictStack(TI.plate(), 12), new OreDictStack(ALLOY.plate528(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1))); + .inputItems(new OreDictStack(TI.plate(), 12), new OreDictStack(ALLOY.plate(), 12), new OreDictStack(GOLD.wireFine(), 32), new ComparableStack(ModItems.entanglement_kit, 1), new ComparableStack(ModBlocks.machine_battery, 1))); this.register(new GenericRecipe("ass.radar").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_radar, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 12), new OreDictStack(ANY_RUBBER.ingot(), 12), new ComparableStack(ModItems.magnetron, 5), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.crt_display, 4)) + .inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(ANY_RUBBER.ingot(), 12), new ComparableStack(ModItems.magnetron, 5), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.circuit, 8, EnumCircuitType.BASIC.ordinal()), new ComparableStack(ModItems.crt_display, 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.motor, 3), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT), new ComparableStack(ModItems.crt_display, 4))); this.register(new GenericRecipe("ass.radarlarge").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_radar_large, 1)) .inputItems(new OreDictStack(STEEL.plateWelded(), 6), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new OreDictStack(ANY_RUBBER.ingot(), 24), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.motor_desh, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModItems.crt_display, 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 8), new OreDictStack(ANY_RUBBER.ingot(), 24), new ComparableStack(ModItems.magnetron, 16), new ComparableStack(ModItems.motor_desh, 3), new ComparableStack(ModItems.item_expensive, 6, EnumExpensiveType.CIRCUIT), new ComparableStack(ModItems.crt_display, 4))); this.register(new GenericRecipe("ass.forcefield").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_forcefield, 1)) - .inputItems(new OreDictStack(ALLOY.plate528(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.machine_transformer, 1))); + .inputItems(new OreDictStack(ALLOY.plate(), 8), new ComparableStack(ModItems.plate_desh, 4), new ComparableStack(ModItems.coil_gold_torus, 6), new ComparableStack(ModItems.coil_magnetized_tungsten, 12), new ComparableStack(ModItems.motor, 1), new ComparableStack(ModItems.upgrade_radius, 1), new ComparableStack(ModItems.upgrade_health, 1), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.ADVANCED), new ComparableStack(ModBlocks.machine_transformer, 1))); this.register(new GenericRecipe("ass.difurnacertg").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_difurnace_rtg_off, 1)) - .inputItems(new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(DESH.ingot(), 4), new OreDictStack(PB.plate528(), 6), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(CU.plate(), 12))); + .inputItems(new ComparableStack(ModItems.rtg_unit, 3), new OreDictStack(DESH.ingot(), 4), new OreDictStack(PB.plate(), 6), new OreDictStack(OreDictManager.getReflector(), 8), new OreDictStack(CU.plate(), 12))); this.register(new GenericRecipe("ass.strandcaster").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_strand_caster, 1)) .inputItems(new ComparableStack(ModItems.ingot_firebrick, 16), new OreDictStack(STEEL.plateCast(), 6), new OreDictStack(CU.plateWelded(), 2), new OreDictStack(STEEL.shell(), 2), new OreDictStack(ANY_CONCRETE.any(), 8)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.ingot_firebrick, 16), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_CONCRETE.any(), 8))); @@ -360,7 +362,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new OreDictStack(STEEL.shell(), 1), new OreDictStack(CU.plateCast(), 2), new ComparableStack(ModItems.coil_copper, 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.STEEL_PLATING), new OreDictStack(CU.pipe(), 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.canister_empty, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)) + .inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(CU.ingot(), 12), new OreDictStack(GOLD.wireDense(), 8), new ComparableStack(ModItems.canister_empty, 4), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(GOLD.wireDense(), 16), new ComparableStack(ModItems.canister_empty, 4), new ComparableStack(ModItems.item_expensive, 1, EnumExpensiveType.CIRCUIT))); 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))); @@ -380,10 +382,10 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItems(new OreDictStack(STEEL.pipe(), 12), new OreDictStack(STEEL.ingot(), 24), new OreDictStack(CU.plate(), 24), new OreDictStack(NB.ingot(), 4), new OreDictStack(RUBBER.ingot(), 12), new ComparableStack(ModBlocks.glass_quartz, 16)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.HEAVY_FRAME), new OreDictStack(NB.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new ComparableStack(ModBlocks.glass_quartz, 16))); this.register(new GenericRecipe("ass.iturbine").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_large_turbine, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 12), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 6), new OreDictStack(DURA.pipe(), 3), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) + .inputItems(new OreDictStack(STEEL.plate(), 12), new OreDictStack(RUBBER.ingot(), 4), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 6), new OreDictStack(DURA.pipe(), 3), new OreDictStack(STEEL.pipe(), 4), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.turbine_titanium, 3), new OreDictStack(GOLD.wireDense(), 16), new OreDictStack(DURA.pipe(), 16), new ComparableStack(ModItems.item_expensive, 3, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.leviturbine").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_chungus, 1)) - .inputItems(new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.plateWelded(), 16), new OreDictStack(TI.plate528(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 16), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 3), new ComparableStack(ModItems.flywheel_beryllium, 1), new OreDictStack(GOLD.wireDense(), 48), new OreDictStack(DURA.pipe(), 16), new OreDictStack(STEEL.pipe(), 16)) + .inputItems(new OreDictStack(STEEL.shell(), 6), new OreDictStack(STEEL.plateWelded(), 16), new OreDictStack(TI.plate(), 12), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 16), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 3), new ComparableStack(ModItems.flywheel_beryllium, 1), new OreDictStack(GOLD.wireDense(), 48), new OreDictStack(DURA.pipe(), 16), new OreDictStack(STEEL.pipe(), 16)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.HEAVY_FRAME), new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.turbine_tungsten, 5), new ComparableStack(ModItems.turbine_titanium, 12), new ComparableStack(ModItems.flywheel_beryllium, 1), new OreDictStack(GOLD.wireDense(), 64))); this.register(new GenericRecipe("ass.radgen").setup(400, 100).outputItems(new ItemStack(ModBlocks.machine_radgen, 1)).setPools(GenericRecipes.POOL_PREFIX_DISCOVER + "radgen") .inputItems(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(KEY_RED, 1)) @@ -391,7 +393,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { // condensers this.register(new GenericRecipe("ass.hpcondenser").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_condenser_powered, 1)) - .inputItems(new OreDictStack(STEEL.plateWelded(), 8), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4), new OreDictStack(CU.plate528(), 16), new ComparableStack(ModItems.motor_desh, 3), new OreDictStack(STEEL.pipe(), 24), new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 4)) + .inputItems(new OreDictStack(STEEL.plateWelded(), 8), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 4), new OreDictStack(CU.plate(), 16), new ComparableStack(ModItems.motor_desh, 3), new OreDictStack(STEEL.pipe(), 24), new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.motor_desh, 5), new OreDictStack(STEEL.pipe(), 24), new OreDictStack(Fluids.LUBRICANT.getDict(1_000), 16))); // batteries @@ -431,10 +433,10 @@ public class AssemblyMachineRecipes extends GenericRecipes { // fluid tanks this.register(new GenericRecipe("ass.tank").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_fluidtank, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4)) + .inputItems(new OreDictStack(STEEL.plate(), 8), new OreDictStack(STEEL.shell(), 4), new OreDictStack(ANY_TAR.any(), 4)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.STEEL_PLATING), new OreDictStack(ANY_TAR.any(), 4))); this.register(new GenericRecipe("ass.bat9k").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_bat9000, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16)) + .inputItems(new OreDictStack(STEEL.plate(), 16), new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 2), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModBlocks.steel_scaffold, 16), new OreDictStack(ANY_TAR.any(), 16))); this.register(new GenericRecipe("ass.orbus").setup(300, 100).outputItems(new ItemStack(ModBlocks.machine_orbus, 1)) .inputItems(new OreDictStack(ANY_RESISTANTALLOY.plateWelded(), 8), new OreDictStack(BIGMT.plateCast(), 4), new ComparableStack(ModItems.coil_advanced_alloy, 12), new ComparableStack(ModItems.battery_sc_polonium, 1)) @@ -442,7 +444,7 @@ public class AssemblyMachineRecipes extends GenericRecipes { // accelerators this.register(new GenericRecipe("ass.cyclotron").setup(600, 100).outputItems(new ItemStack(ModBlocks.machine_cyclotron, 1)) - .inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 3), new OreDictStack(ND.wireDense(), 32), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(STEEL.plate528(), 32), new OreDictStack(AL.plate528(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new OreDictStack(CU.plateCast(), 8), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)) + .inputItems(new ComparableStack(ModBlocks.machine_lithium_battery, 3), new OreDictStack(ND.wireDense(), 32), new OreDictStack(STEEL.ingot(), 16), new OreDictStack(STEEL.plate(), 32), new OreDictStack(AL.plate(), 32), new OreDictStack(ANY_PLASTIC.ingot(), 24), new OreDictStack(RUBBER.ingot(), 24), new OreDictStack(CU.plateCast(), 8), new ComparableStack(ModItems.circuit, 16, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.FERRO_PLATING), new OreDictStack(ND.wireDense(), 32), new OreDictStack(AL.plateWelded(), 16), new OreDictStack(RUBBER.ingot(), 32), new ComparableStack(ModItems.item_expensive, 8, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.beamline").setup(200, 100).outputItems(new ItemStack(ModBlocks.pa_beamline, 1)) .inputItems(new OreDictStack(STEEL.plateCast(), 8), new OreDictStack(CU.plate(), 16), new OreDictStack(GOLD.wireDense(), 4)) @@ -675,34 +677,34 @@ public class AssemblyMachineRecipes extends GenericRecipes { this.register(new GenericRecipe("ass.core1").setup(1_200, 100).outputItems(new ItemStack(ModItems.gadget_core, 1)) .inputItems(new OreDictStack(PU239.nugget(), 7), new OreDictStack(U238.nugget(), 3))); this.register(new GenericRecipe("ass.boyshield").setup(200, 100).outputItems(new ItemStack(ModItems.boy_shielding, 1)) - .inputItems(new OreDictStack(OreDictManager.getReflector(), 12), new OreDictStack(STEEL.plate528(), 4))); + .inputItems(new OreDictStack(OreDictManager.getReflector(), 12), new OreDictStack(STEEL.plate(), 4))); this.register(new GenericRecipe("ass.boytarget").setup(200, 100).outputItems(new ItemStack(ModItems.boy_target, 1)) .inputItems(new OreDictStack(U235.nugget(), 18))); this.register(new GenericRecipe("ass.boybullet").setup(200, 100).outputItems(new ItemStack(ModItems.boy_bullet, 1)) .inputItems(new OreDictStack(U235.nugget(), 9))); this.register(new GenericRecipe("ass.boypropellant").setup(200, 100).outputItems(new ItemStack(ModItems.boy_propellant, 1)) - .inputItems(new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate528(), 8), new OreDictStack(AL.plate528(), 4), new OreDictStack(MINGRADE.wireFine(), 4))); + .inputItems(new ComparableStack(ModItems.cordite, 8), new OreDictStack(IRON.plate(), 8), new OreDictStack(AL.plate(), 4), new OreDictStack(MINGRADE.wireFine(), 4))); this.register(new GenericRecipe("ass.boyigniter").setup(200, 100).outputItems(new ItemStack(ModItems.boy_igniter, 1)) .inputItems(new OreDictStack(AL.shell(), 3), new OreDictStack(DURA.plateCast(), 1), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 16))); this.register(new GenericRecipe("ass.manigniter").setup(200, 100).outputItems(new ItemStack(ModItems.man_igniter, 1)) - .inputItems(new OreDictStack(STEEL.plate528(), 6), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 9))); + .inputItems(new OreDictStack(STEEL.plate(), 6), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new OreDictStack(MINGRADE.wireFine(), 9))); this.register(new GenericRecipe("ass.mancore").setup(1_200, 100).outputItems(new ItemStack(ModItems.man_core, 1)) .inputItems(new OreDictStack(PU239.nugget(), 8), new OreDictStack(BE.nugget(), 2))); this.register(new GenericRecipe("ass.mikecore").setup(1_200, 100).outputItems(new ItemStack(ModItems.mike_core, 1)) .inputItems(new OreDictStack(U238.nugget(), 24), new OreDictStack(PB.ingot(), 6))); this.register(new GenericRecipe("ass.mikedeut").setup(600, 100).outputItems(new ItemStack(ModItems.mike_deut, 1)) - .inputItems(new OreDictStack(IRON.plate528(), 12), new OreDictStack(STEEL.plate528(), 16)) + .inputItems(new OreDictStack(IRON.plate(), 12), new OreDictStack(STEEL.plate(), 16)) .inputFluids(new FluidStack(Fluids.DEUTERIUM, 10_000))); this.register(new GenericRecipe("ass.mikecooler").setup(300, 100).outputItems(new ItemStack(ModItems.mike_cooling_unit, 1)) - .inputItems(new OreDictStack(IRON.plate528(), 8), new ComparableStack(ModItems.coil_copper, 5), new ComparableStack(ModItems.coil_tungsten, 5), new ComparableStack(ModItems.motor, 2))); + .inputItems(new OreDictStack(IRON.plate(), 8), new ComparableStack(ModItems.coil_copper, 5), new ComparableStack(ModItems.coil_tungsten, 5), new ComparableStack(ModItems.motor, 2))); this.register(new GenericRecipe("ass.fleijaigniter").setup(200, 100).outputItems(new ItemStack(ModItems.fleija_igniter, 1)) - .inputItems(new OreDictStack(TI.plate528(), 6), new OreDictStack(SA326.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()))); + .inputItems(new OreDictStack(TI.plate(), 6), new OreDictStack(SA326.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()))); this.register(new GenericRecipe("ass.fleijacore").setup(600, 100).outputItems(new ItemStack(ModItems.fleija_core, 1)) .inputItems(new OreDictStack(U235.nugget(), 8), new OreDictStack(NP237.nugget(), 2), new OreDictStack(BE.nugget(), 4), new ComparableStack(ModItems.coil_copper, 2))); this.register(new GenericRecipe("ass.fleijacharge").setup(300, 100).outputItems(new ItemStack(ModItems.fleija_propellant, 1)) .inputItems(new OreDictStack(ANY_HIGHEXPLOSIVE.ingot(), 3), new OreDictStack(SA326.plate(), 8))); this.register(new GenericRecipe("ass.soliniumigniter").setup(200, 100).outputItems(new ItemStack(ModItems.solinium_igniter, 1)) - .inputItems(new OreDictStack(TI.plate528(), 4), new OreDictStack(ALLOY.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new ComparableStack(ModItems.coil_gold, 1))); + .inputItems(new OreDictStack(TI.plate(), 4), new OreDictStack(ALLOY.wireFine(), 2), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.ADVANCED.ordinal()), new ComparableStack(ModItems.coil_gold, 1))); this.register(new GenericRecipe("ass.soliniumcore").setup(600, 100).outputItems(new ItemStack(ModItems.solinium_core, 1)) .inputItems(new OreDictStack(SA327.nugget(), 9), new OreDictStack(EUPH.nugget(), 1))); this.register(new GenericRecipe("ass.soliniumcharge").setup(300, 100).outputItems(new ItemStack(ModItems.solinium_propellant, 1)) diff --git a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java index d557b8f4d..610a20f5a 100644 --- a/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ChemicalPlantRecipes.java @@ -165,29 +165,29 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.polymer").setup(100, 100) .inputItems(new OreDictStack(COAL.dust(), 2), new OreDictStack(F.dust())) - .inputFluids(new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_polymer))); this.register(new GenericRecipe("chem.bakelite").setup(100, 100) - .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528 ? 1 : 0), new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0), new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_bakelite))); this.register(new GenericRecipe("chem.rubber").setup(100, 200) .inputItems(new OreDictStack(S.dust())) - .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528 ? 2 : 0)) + .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_rubber))); this.register(new GenericRecipe("chem.hardplastic").setup(100, 1_000) - .inputFluids(new FluidStack(Fluids.XYLENE, 500, GeneralConfig.enable528 ? 2 : 0), new FluidStack(Fluids.PHOSGENE, 500, GeneralConfig.enable528 ? 2 : 0)) + .inputFluids(new FluidStack(Fluids.XYLENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0), new FluidStack(Fluids.PHOSGENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_pc))); this.register(new GenericRecipe("chem.pvc").setup(100, 1_000) .inputItems(new OreDictStack(CD.dust())) - .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 250, GeneralConfig.enable528 ? 2 : 0), new FluidStack(Fluids.CHLORINE, 250, GeneralConfig.enable528 ? 2 : 0)) + .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0), new FluidStack(Fluids.CHLORINE, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_pvc, 2))); this.register(new GenericRecipe("chem.kevlar").setup(60, 300) - .inputFluids(new FluidStack(Fluids.AROMATICS, 200), new FluidStack(Fluids.NITRIC_ACID, 100), new FluidStack(GeneralConfig.enable528 ? Fluids.PHOSGENE : Fluids.CHLORINE, 100)) + .inputFluids(new FluidStack(Fluids.AROMATICS, 200), new FluidStack(Fluids.NITRIC_ACID, 100), new FluidStack(GeneralConfig.enable528PressurizedRecipes ? Fluids.PHOSGENE : Fluids.CHLORINE, 100)) .outputItems(new ItemStack(ModItems.plate_kevlar, 4))); this.register(new GenericRecipe("chem.meth").setup(60, 300) @@ -282,7 +282,7 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.rocketfuel").setup(200, 100) .inputItems(new ComparableStack(ModItems.solid_fuel, 2)) - .inputFluids(new FluidStack(Fluids.PETROLEUM, 200, GeneralConfig.enable528 ? 1 : 0), new FluidStack(Fluids.NITRIC_ACID, 100)) + .inputFluids(new FluidStack(Fluids.PETROLEUM, 200, GeneralConfig.enable528PressurizedRecipes ? 1 : 0), new FluidStack(Fluids.NITRIC_ACID, 100)) .outputItems(new ItemStack(ModItems.rocket_fuel, 4))); this.register(new GenericRecipe("chem.dynamite").setup(50, 100) @@ -291,7 +291,7 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.tnt").setup(100, 1_000) .inputItems(new OreDictStack(KNO.dust())) - .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ball_tnt, 4))); this.register(new GenericRecipe("chem.tatb").setup(50, 5_000) @@ -301,7 +301,7 @@ public class ChemicalPlantRecipes extends GenericRecipes { this.register(new GenericRecipe("chem.c4").setup(100, 1_000) .inputItems(new OreDictStack(KNO.dust())) - .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_c4, 4))); /// GLASS /// diff --git a/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java b/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java index 6cbb878dc..ceb841bf0 100644 --- a/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ChemplantRecipes.java @@ -28,20 +28,12 @@ import net.minecraft.item.ItemStack; @Deprecated public class ChemplantRecipes extends SerializableRecipe { - /** - * Nice order: The order in which the ChemRecipe are added to the recipes list - * Meta order: Fixed using the id param, saved in indexMapping - */ - public static HashMap indexMapping = new HashMap(); public static List recipes = new ArrayList(); @Override public void registerDefaults() { - //6-30, formerly oil cracking, coal liquefaction and solidification - registerOtherOil(); - recipes.add(new ChemRecipe(36, "COOLANT", 50) .inputItems(new OreDictStack(KNO.dust())) .inputFluids(new FluidStack(Fluids.WATER, 1800)) @@ -83,25 +75,17 @@ public class ChemplantRecipes extends SerializableRecipe { .inputItems( new OreDictStack(COAL.dust(), 2), new OreDictStack(F.dust())) - .inputFluids(new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_polymer))); recipes.add(new ChemRecipe(81, "BAKELITE", 100) .inputFluids( - new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528 ? 1 : 0), - new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528 ? 1 : 0)) + new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0), + new FluidStack(Fluids.PETROLEUM, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_bakelite))); recipes.add(new ChemRecipe(82, "RUBBER", 100) .inputItems(new OreDictStack(S.dust())) - .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528 ? 2 : 0)) + .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_rubber))); - /*recipes.add(new ChemRecipe(94, "PET", 100) - .inputItems(new OreDictStack(AL.dust())) - .inputFluids( - new FluidStack(Fluids.XYLENE, 500), - new FluidStack(Fluids.OXYGEN, 100)) - .outputItems(new ItemStack(ModItems.ingot_pet)));*/ - - //Laminate Glass going here recipes.add(new ChemRecipe(97, "LAMINATE", 100) .inputFluids( new FluidStack(Fluids.XYLENE, 250), @@ -112,14 +96,14 @@ public class ChemplantRecipes extends SerializableRecipe { .outputItems(new ItemStack(com.hbm.blocks.ModBlocks.reinforced_laminate))); recipes.add(new ChemRecipe(94, "PC", 100) .inputFluids( - new FluidStack(Fluids.XYLENE, 500, GeneralConfig.enable528 ? 2 : 0), - new FluidStack(Fluids.PHOSGENE, 500, GeneralConfig.enable528 ? 2 : 0)) + new FluidStack(Fluids.XYLENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0), + new FluidStack(Fluids.PHOSGENE, 500, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_pc))); recipes.add(new ChemRecipe(96, "PVC", 100) .inputItems(new OreDictStack(CD.dust())) .inputFluids( - new FluidStack(Fluids.UNSATURATEDS, 250, GeneralConfig.enable528 ? 2 : 0), - new FluidStack(Fluids.CHLORINE, 250, GeneralConfig.enable528 ? 2 : 0)) + new FluidStack(Fluids.UNSATURATEDS, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0), + new FluidStack(Fluids.CHLORINE, 250, GeneralConfig.enable528PressurizedRecipes ? 2 : 0)) .outputItems(new ItemStack(ModItems.ingot_pvc, 2))); recipes.add(new ChemRecipe(89, "DYNAMITE", 50) .inputItems( @@ -129,7 +113,7 @@ public class ChemplantRecipes extends SerializableRecipe { .outputItems(new ItemStack(ModItems.ball_dynamite, 2))); recipes.add(new ChemRecipe(83, "TNT", 150) .inputItems(new OreDictStack(KNO.dust())) - .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.AROMATICS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ball_tnt, 4))); recipes.add(new ChemRecipe(95, "TATB", 50) .inputItems(new ComparableStack(ModItems.ball_tnt)) @@ -137,10 +121,8 @@ public class ChemplantRecipes extends SerializableRecipe { .outputItems(new ItemStack(ModItems.ball_tatb))); recipes.add(new ChemRecipe(84, "C4", 150) .inputItems(new OreDictStack(KNO.dust())) - .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528 ? 1 : 0)) + .inputFluids(new FluidStack(Fluids.UNSATURATEDS, 500, GeneralConfig.enable528PressurizedRecipes ? 1 : 0)) .outputItems(new ItemStack(ModItems.ingot_c4, 4))); - //44, formerly deuterium - //45, formerly steam recipes.add(new ChemRecipe(46, "YELLOWCAKE", 250) .inputItems( new OreDictStack(U.billet(), 2), //12 nuggets: the numbers do match up :) @@ -211,7 +193,7 @@ public class ChemplantRecipes extends SerializableRecipe { recipes.add(new ChemRecipe(57, "SOLID_FUEL", 200) .inputItems(new ComparableStack(ModItems.solid_fuel, 2)) .inputFluids( - new FluidStack(Fluids.PETROLEUM, 200, GeneralConfig.enable528 ? 1 : 0), + new FluidStack(Fluids.PETROLEUM, 200, GeneralConfig.enable528PressurizedRecipes ? 1 : 0), new FluidStack(Fluids.NITRIC_ACID, 100)) .outputItems(new ItemStack(ModItems.rocket_fuel, 4))); recipes.add(new ChemRecipe(58, "ELECTROLYSIS", 150) @@ -242,34 +224,6 @@ public class ChemplantRecipes extends SerializableRecipe { .inputItems(new OreDictStack(IRON.dust())) .inputFluids(new FluidStack(Fluids.SCHRABIDIC, 250)) .outputItems(new ItemStack(ModItems.powder_schrabidate))); - recipes.add(new ChemRecipe(65, "COLTAN_CLEANING", 60) - .inputItems( - new OreDictStack(COLTAN.dust(), 2), - new OreDictStack(COAL.dust())) - .inputFluids( - new FluidStack(Fluids.PEROXIDE, 250), - new FluidStack(Fluids.HYDROGEN, 500)) - .outputItems( - new ItemStack(ModItems.powder_coltan), - new ItemStack(ModItems.powder_niobium), - new ItemStack(ModItems.dust)) - .outputFluids(new FluidStack(Fluids.WATER, 500))); - recipes.add(new ChemRecipe(66, "COLTAN_PAIN", 120) - .inputItems( - new ComparableStack(ModItems.powder_coltan), - new OreDictStack(F.dust())) - .inputFluids( - new FluidStack(Fluids.GAS, 1000), - new FluidStack(Fluids.OXYGEN, 500)) - .outputFluids(new FluidStack(Fluids.PAIN, 1000))); - recipes.add(new ChemRecipe(67, "COLTAN_CRYSTAL", 80) - .inputFluids( - new FluidStack(Fluids.PAIN, 1000), - new FluidStack(Fluids.PEROXIDE, 500)) - .outputItems( - new ItemStack(ModItems.gem_tantalium), - new ItemStack(ModItems.dust, 3)) - .outputFluids(new FluidStack(Fluids.WATER, 250))); recipes.add(new ChemRecipe(88, "LUBRICANT", 20) .inputFluids( new FluidStack(Fluids.HEATINGOIL, 500), @@ -366,9 +320,6 @@ public class ChemplantRecipes extends SerializableRecipe { new OreDictStack(ANY_PLASTIC.ingot(), 1)) .inputFluids(new FluidStack(Fluids.MUSTARDGAS, 4000)) .outputItems(new ItemStack(ModItems.ammo_arty, 1, 11))); - recipes.add(new ChemRecipe(101, "CC_CENTRIFUGE", 200) - .inputFluids(new FluidStack(Fluids.CHLOROCALCITE_CLEANED, 500), new FluidStack(Fluids.SULFURIC_ACID, 8_000)) - .outputFluids(new FluidStack(Fluids.POTASSIUM_CHLORIDE, 250), new FluidStack(Fluids.CALCIUM_CHLORIDE, 250))); recipes.add(new ChemRecipe(102, "THORIUM_SALT", 60) .inputFluids(new FluidStack(Fluids.THORIUM_SALT_DEPLETED, 16_000)) @@ -391,27 +342,6 @@ public class ChemplantRecipes extends SerializableRecipe { .outputItems(new ItemStack(ModBlocks.deco_rusty_steel, 8))); } - public static void registerOtherOil() { - recipes.add(new ChemRecipe(31, "BP_BIOGAS", 60) - .inputItems(new ComparableStack(ModItems.biomass, 16)) //if we assume 1B BF = 500k and translate that to 2B BG = 500k, then each biomass is worth ~31k or roughly 1.5 furnace operations - .inputFluids(new FluidStack(Fluids.AIR, 4000)) - .outputFluids(new FluidStack(2000, Fluids.BIOGAS))); - recipes.add(new ChemRecipe(32, "BP_BIOFUEL", 60) - .inputFluids(new FluidStack(1500, Fluids.BIOGAS), new FluidStack(250, Fluids.ETHANOL)) - .outputFluids(new FluidStack(1000, Fluids.BIOFUEL))); - recipes.add(new ChemRecipe(33, "LPG", 100) - .inputFluids(new FluidStack(2000, Fluids.PETROLEUM)) - .outputFluids(new FluidStack(1000, Fluids.LPG))); - recipes.add(new ChemRecipe(34, "OIL_SAND", 200) - .inputItems(new ComparableStack(ModBlocks.ore_oil_sand, 16), new OreDictStack(ANY_TAR.any(), 1)) - .outputItems(new ItemStack(Blocks.sand, 16)) - .outputFluids(new FluidStack(1000, Fluids.BITUMEN))); - recipes.add(new ChemRecipe(35, "ASPHALT", 100) - .inputItems(new ComparableStack(Blocks.gravel, 2), new ComparableStack(Blocks.sand, 6)) - .inputFluids(new FluidStack(1000, Fluids.BITUMEN)) - .outputItems(new ItemStack(ModBlocks.asphalt, 16))); - } - @Deprecated public static class ChemRecipe { public int listing; diff --git a/src/main/java/com/hbm/inventory/recipes/PrecAssRecipes.java b/src/main/java/com/hbm/inventory/recipes/PrecAssRecipes.java index 2f41c85f8..dd2776eb0 100644 --- a/src/main/java/com/hbm/inventory/recipes/PrecAssRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/PrecAssRecipes.java @@ -32,6 +32,8 @@ public class PrecAssRecipes extends GenericRecipes { @Override public void registerDefaults() { + + int min = 1_200; registerPair(new GenericRecipe("precass.controller").setup(400, 15_000L) .inputItems(new ComparableStack(ModItems.circuit, 32, EnumCircuitType.CHIP), @@ -44,7 +46,7 @@ public class PrecAssRecipes extends GenericRecipes { DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CONTROLLER), 10, 25); // all hail the pufferfish, driver of all innovation - this.register(new GenericRecipe("precass.blueprints").setup(5 * 60 * 20, 20_000L) + this.register(new GenericRecipe("precass.blueprints").setup(5 * min, 20_000L) .inputItems(new ComparableStack(Items.paper, 16), new OreDictStack(KEY_BLUE, 16), new ComparableStack(Items.fish, 16, FishType.PUFFERFISH)) @@ -52,7 +54,7 @@ public class PrecAssRecipes extends GenericRecipes { new ChanceOutput(new ItemStack(ModItems.blueprint_folder, 1, 0), 10), new ChanceOutput(new ItemStack(Items.paper, 16, 0), 90)) )); - this.register(new GenericRecipe("precass.beigeprints").setup(5 * 60 * 20, 50_000L) + this.register(new GenericRecipe("precass.beigeprints").setup(5 * min, 50_000L) .inputItems(new ComparableStack(Items.paper, 24), new OreDictStack(CINNABAR.gem(), 24), new ComparableStack(Items.fish, 32, FishType.PUFFERFISH)) @@ -76,14 +78,7 @@ public class PrecAssRecipes extends GenericRecipes { IOutput[] recycle = new IOutput[recipe.inputItem.length]; for(int i = 0; i < recycle.length; i++) { ItemStack stack = recipe.inputItem[i].extractForNEI().get(0).copy(); - int stackSize = (int) (recipe.inputItem[i].stacksize * fReclaim); - // if the resulting stack size is >= 1, use that, otherwise use the original stack size but a chance output percentage - if(stackSize > 0) { - stack.stackSize = stackSize; - recycle[i] = new ChanceOutput(stack); - } else { - recycle[i] = new ChanceOutput(stack, fReclaim); - } + recycle[i] = new ChanceOutput(stack, fReclaim); } FluidStack[] fluid = recipe.inputFluid != null ? new FluidStack[1] : null; diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 50a661b44..467ec2c29 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -259,7 +259,7 @@ public class AnvilRecipes extends SerializableRecipe { constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new ComparableStack(ModItems.ingot_firebrick, 16), - new OreDictStack(STEEL.plate528(), 4), + new OreDictStack(STEEL.plate(), 4), new OreDictStack(CU.ingot(), 8) }, new AnvilOutput(new ItemStack(ModBlocks.heater_oven))).setTier(2)); @@ -282,7 +282,7 @@ public class AnvilRecipes extends SerializableRecipe { new AStack[] { new OreDictStack(ANY_PLASTIC.ingot(), 4), new OreDictStack(CU.ingot(), 8), - new OreDictStack(STEEL.plate528(), 8), + new OreDictStack(STEEL.plate(), 8), new ComparableStack(ModItems.coil_tungsten, 8), new ComparableStack(ModItems.circuit, 1, EnumCircuitType.BASIC.ordinal()) }, new AnvilOutput(new ItemStack(ModBlocks.heater_electric))).setTier(3)); @@ -291,7 +291,7 @@ public class AnvilRecipes extends SerializableRecipe { new AStack[] { new OreDictStack(RUBBER.ingot(), 4), new OreDictStack(CU.ingot(), 16), - new OreDictStack(STEEL.plate528(), 16), + new OreDictStack(STEEL.plate(), 16), new OreDictStack(STEEL.pipe(), 3), }, new AnvilOutput(new ItemStack(ModBlocks.heater_heatex))).setTier(3)); @@ -366,7 +366,7 @@ public class AnvilRecipes extends SerializableRecipe { constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new OreDictStack(STEEL.ingot(), 4), - new OreDictStack(CU.plate528(), 16), + new OreDictStack(CU.plate(), 16), new ComparableStack(ModItems.plate_polymer, 8) }, new AnvilOutput(new ItemStack(ModBlocks.machine_boiler))).setTier(2)); @@ -405,7 +405,7 @@ public class AnvilRecipes extends SerializableRecipe { /*constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new OreDictStack(STEEL.ingot(), 6), - new OreDictStack(IRON.plate528(), 8), + new OreDictStack(IRON.plate(), 8), new OreDictStack(ANY_PLASTIC.ingot(), 4), new ComparableStack(ModItems.generator_steel, 2), new ComparableStack(ModItems.turbine_titanium, 1), @@ -492,13 +492,13 @@ public class AnvilRecipes extends SerializableRecipe { constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new ComparableStack(ModItems.tank_steel, 1), - new OreDictStack(PB.plate528(), 2), + new OreDictStack(PB.plate(), 2), new ComparableStack(ModItems.nuclear_waste, 10) }, new AnvilOutput(new ItemStack(ModBlocks.yellow_barrel))).setTier(3)); constructionRecipes.add(new AnvilConstructionRecipe( new AStack[] { new ComparableStack(ModItems.tank_steel, 1), - new OreDictStack(PB.plate528(), 2), + new OreDictStack(PB.plate(), 2), new ComparableStack(ModItems.nuclear_waste_vitrified, 10) }, new AnvilOutput(new ItemStack(ModBlocks.vitrified_barrel))).setTier(3)); diff --git a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipes.java b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipes.java index 879669229..288da9a29 100644 --- a/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/loader/GenericRecipes.java @@ -239,7 +239,12 @@ public abstract class GenericRecipes extends Serializab @Override public ItemStack collapse() { if(this.chance >= 1F) return getSingle(); - return RNG.nextFloat() <= chance ? getSingle() : null; + int finalSize = 0; + for(int i = 0; i < this.stack.stackSize; i++) if(RNG.nextFloat() <= chance) finalSize++; + if(finalSize <= 0) return null; + ItemStack finalStack = getSingle(); + finalStack.stackSize = finalSize; + return finalStack; } @Override public ItemStack getSingle() { return this.stack.copy(); } diff --git a/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java b/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java index a61fc2efd..ef67a0bff 100644 --- a/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java +++ b/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java @@ -129,8 +129,8 @@ public class ItemBedrockOreNew extends Item { public static enum BedrockOreType { // primary sulfuric solvent radsolvent - LIGHT_METAL( 0xFFFFFF, 0x353535, "light", o(MAT_IRON, 9), o(MAT_COPPER, 9), o(MAT_TITANIUM, 6), o(MAT_BAUXITE, 9), o(MAT_CRYOLITE, 3), o(MAT_CHLOROCALCITE, 5), o(MAT_LITHIUM, 5), o(MAT_SODIUM, 3), o(MAT_CHLOROCALCITE, 6), o(MAT_LITHIUM, 6), o(MAT_SODIUM, 6)), - HEAVY_METAL( 0x868686, 0x000000, "heavy", o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 2), o(MAT_GOLD, 2), o(MAT_BERYLLIUM, 3), o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 5), o(MAT_BISMUTH, 1), o(MAT_BISMUTH, 1), o(MAT_GOLD, 6)), + LIGHT_METAL( 0xFFFFFF, 0x353535, "light", o(MAT_IRON, 9), o(MAT_COPPER, 9), o(MAT_TITANIUM, 6), o(MAT_BAUXITE, 9), o(MAT_CRYOLITE, 3), o(MAT_CHLOROCALCITE, 5), o(MAT_LITHIUM, 5), o(MAT_SODIUM, 3), o(MAT_CHLOROCALCITE, 6), o(MAT_LITHIUM, 6), o(MAT_SODIUM, 6)), + HEAVY_METAL( 0x868686, 0x000000, "heavy", o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 2), o(MAT_GOLD, 2), o(MAT_BERYLLIUM, 3), o(MAT_TUNGSTEN, 9), o(MAT_LEAD, 9), o(MAT_GOLD, 5), o(MAT_BISMUTH, 1), o(MAT_TANTALIUM, 1), o(MAT_GOLD, 6)), RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", o(MAT_COBALT, 5), o(MAT_RAREEARTH, 5),o(MAT_BORON, 5), o(MAT_LANTHANIUM, 3), o(MAT_NIOBIUM, 4), o(MAT_NEODYMIUM, 3), o(MAT_STRONTIUM, 3), o(MAT_ZIRCONIUM, 3), o(MAT_NIOBIUM, 5), o(MAT_NEODYMIUM, 5), o(MAT_STRONTIUM, 3)), ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", o(MAT_URANIUM, 4), o(MAT_THORIUM, 4), o(MAT_RADIUM, 2), o(MAT_RADIUM, 2), o(MAT_POLONIUM, 2), o(MAT_RADIUM, 2), o(MAT_RADIUM, 2), o(MAT_POLONIUM, 2), o(MAT_TECHNETIUM, 1), o(MAT_TECHNETIUM, 1), o(MAT_U238, 1)), NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", o(MAT_COAL, 9), o(MAT_SULFUR, 9), o(MAT_LIGNITE, 9), o(MAT_KNO, 6), o(MAT_FLUORITE, 6), o(MAT_PHOSPHORUS, 5), o(MAT_FLUORITE, 6), o(MAT_SULFUR, 6), o(MAT_CHLOROCALCITE, 6), o(MAT_SILICON, 2), o(MAT_SILICON, 2)), diff --git a/src/main/java/com/hbm/items/tool/ItemWandS.java b/src/main/java/com/hbm/items/tool/ItemWandS.java index 55de41e9a..0323fca25 100644 --- a/src/main/java/com/hbm/items/tool/ItemWandS.java +++ b/src/main/java/com/hbm/items/tool/ItemWandS.java @@ -1,31 +1,26 @@ package com.hbm.items.tool; -import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.Set; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import com.hbm.blocks.ModBlocks; +import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure; import com.hbm.util.BobMathUtil; import com.hbm.util.Tuple.Pair; -import com.hbm.world.gen.nbt.NBTStructure; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.World; public class ItemWandS extends Item { - private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss"); - @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { list.add("Creative-only item"); @@ -34,106 +29,124 @@ public class ItemWandS extends Item { list.add("adds a block to the blacklist by crouch right-clicking!)"); if(stack.stackTagCompound != null) { - int px = stack.stackTagCompound.getInteger("x"); - int py = stack.stackTagCompound.getInteger("y"); - int pz = stack.stackTagCompound.getInteger("z"); + int px = stack.stackTagCompound.getInteger("x"); + int py = stack.stackTagCompound.getInteger("y"); + int pz = stack.stackTagCompound.getInteger("z"); if(px != 0 || py != 0 || pz != 0) { - list.add(EnumChatFormatting.AQUA + "From: " + px + ", " + py + ", " + pz); - } else { - list.add(EnumChatFormatting.AQUA + "No start position set"); - } + list.add(EnumChatFormatting.AQUA + "From: " + px + ", " + py + ", " + pz); + } else { + list.add(EnumChatFormatting.AQUA + "No start position set"); + } - Set> blocks = getBlocks(stack); + Set> blocks = getBlocks(stack); - if(blocks.size() > 0) { - list.add("Blacklist:"); - for(Pair block : blocks) { - list.add(EnumChatFormatting.RED + "- " + block.key.getUnlocalizedName()); - } - } - } + if(blocks.size() > 0) { + list.add("Blacklist:"); + for(Pair block : blocks) { + list.add(EnumChatFormatting.RED + "- " + block.key.getUnlocalizedName()); + } + } + } } - // why the fuck ye'd leave this whole thing obfuscated is beyond me - @Override - public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) { + // why the fuck ye'd leave this whole thing obfuscated is beyond me + @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(stack.stackTagCompound == null) { stack.stackTagCompound = new NBTTagCompound(); } if(player.isSneaking()) { - Pair target = new Pair(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z)); - Set> blocks = getBlocks(stack); + Pair target = new Pair(world.getBlock(x, y, z), world.getBlockMetadata(x, y, z)); + Set> blocks = getBlocks(stack); - if(blocks.contains(target)) { - blocks.remove(target); - if(world.isRemote) player.addChatMessage(new ChatComponentText("Removed from blacklist " + target.key.getUnlocalizedName())); - } else { - blocks.add(target); - if(world.isRemote) player.addChatMessage(new ChatComponentText("Added to blacklist " + target.key.getUnlocalizedName())); - } + if(blocks.contains(target)) { + blocks.remove(target); + if(world.isRemote) player.addChatMessage(new ChatComponentText("Removed from blacklist " + target.key.getUnlocalizedName())); + } else { + blocks.add(target); + if(world.isRemote) player.addChatMessage(new ChatComponentText("Added to blacklist " + target.key.getUnlocalizedName())); + } - setBlocks(stack, blocks); + setBlocks(stack, blocks); } else { - int px = stack.stackTagCompound.getInteger("x"); - int py = stack.stackTagCompound.getInteger("y"); - int pz = stack.stackTagCompound.getInteger("z"); + int px = stack.stackTagCompound.getInteger("x"); + int py = stack.stackTagCompound.getInteger("y"); + int pz = stack.stackTagCompound.getInteger("z"); if(px == 0 && py == 0 && pz == 0) { - setPosition(stack, x, y, z); + setPosition(stack, x, y, z); if(world.isRemote) player.addChatMessage(new ChatComponentText("First position set!")); } else { - setPosition(stack, 0, 0, 0); + setPosition(stack, 0, 0, 0); - Set> blocks = getBlocks(stack); - blocks.add(new Pair(Blocks.air, 0)); - blocks.add(new Pair(ModBlocks.spotlight_beam, 0)); + int minX = Math.min(x, px); + int minY = Math.min(y, py) - 1; + int minZ = Math.min(z, pz); - String filename = "structure_" + dateFormat.format(new Date()).toString() + ".nbt"; + int sizeX = Math.abs(x - px) + 1; + int sizeY = Math.abs(y - py) + 1; + int sizeZ = Math.abs(z - pz) + 1; - NBTStructure.saveArea(filename, world, x, y, z, px, py, pz, blocks); + world.setBlock(minX, minY, minZ, ModBlocks.wand_structure); - if(world.isRemote) player.addChatMessage(new ChatComponentText("Structure saved to: .minecraft/structures/" + filename)); + TileEntity te = world.getTileEntity(minX, minY, minZ); + if (te instanceof TileEntityWandStructure) { + TileEntityWandStructure structure = (TileEntityWandStructure) te; + + structure.sizeX = sizeX; + structure.sizeY = sizeY; + structure.sizeZ = sizeZ; + + structure.blacklist = getBlocks(stack); + } else { + if (world.isRemote) + player.addChatMessage(new ChatComponentText("Could not add a structure block!")); + return true; + } + + if (world.isRemote) + player.addChatMessage(new ChatComponentText("Structure block configured and added at: " + minX + ", " + minY + ", " + minZ)); } } - return true; - } + return true; + } - private void setPosition(ItemStack stack, int x, int y, int z) { - stack.stackTagCompound.setInteger("x", x); - stack.stackTagCompound.setInteger("y", y); - stack.stackTagCompound.setInteger("z", z); - } + private void setPosition(ItemStack stack, int x, int y, int z) { + stack.stackTagCompound.setInteger("x", x); + stack.stackTagCompound.setInteger("y", y); + stack.stackTagCompound.setInteger("z", z); + } - private Set> getBlocks(ItemStack stack) { - if(stack.stackTagCompound == null) { - return new HashSet<>(); - } + private Set> getBlocks(ItemStack stack) { + if(stack.stackTagCompound == null) { + return new HashSet<>(); + } - int[] blockIds = stack.stackTagCompound.getIntArray("blocks"); - int[] metas = stack.stackTagCompound.getIntArray("metas"); - Set> blocks = new HashSet<>(blockIds.length); + int[] blockIds = stack.stackTagCompound.getIntArray("blocks"); + int[] metas = stack.stackTagCompound.getIntArray("metas"); + Set> blocks = new HashSet<>(blockIds.length); - for(int i = 0; i < blockIds.length; i++) { - blocks.add(new Pair(Block.getBlockById(blockIds[i]), metas[i])); - } + for(int i = 0; i < blockIds.length; i++) { + blocks.add(new Pair(Block.getBlockById(blockIds[i]), metas[i])); + } - return blocks; - } + return blocks; + } @SuppressWarnings("unchecked") - private void setBlocks(ItemStack stack, Set> blocks) { - if(stack.stackTagCompound == null) { - stack.stackTagCompound = new NBTTagCompound(); - } + private void setBlocks(ItemStack stack, Set> blocks) { + if(stack.stackTagCompound == null) { + stack.stackTagCompound = new NBTTagCompound(); + } - stack.stackTagCompound.setIntArray("blocks", BobMathUtil.collectionToIntArray(blocks, i -> Block.getIdFromBlock(((Pair)i).getKey()))); - stack.stackTagCompound.setIntArray("metas", BobMathUtil.collectionToIntArray(blocks, i -> ((Pair)i).getValue())); - } + stack.stackTagCompound.setIntArray("blocks", BobMathUtil.collectionToIntArray(blocks, i -> Block.getIdFromBlock(((Pair)i).getKey()))); + stack.stackTagCompound.setIntArray("metas", BobMathUtil.collectionToIntArray(blocks, i -> ((Pair)i).getValue())); + } @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) { @@ -147,7 +160,7 @@ public class ItemWandS extends Item { if(world.isRemote) { player.addChatMessage(new ChatComponentText("Cleared blacklist")); - } + } } return stack; diff --git a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory10ga.java b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory10ga.java index 9a4764b5c..9c9388d27 100644 --- a/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory10ga.java +++ b/src/main/java/com/hbm/items/weapon/sedna/factory/XFactory10ga.java @@ -11,6 +11,7 @@ import com.hbm.items.weapon.sedna.Crosshair; import com.hbm.items.weapon.sedna.GunConfig; import com.hbm.items.weapon.sedna.ItemGunBaseNT; import com.hbm.items.weapon.sedna.Receiver; +import com.hbm.items.weapon.sedna.ItemGunBaseNT.GunState; import com.hbm.items.weapon.sedna.ItemGunBaseNT.LambdaContext; import com.hbm.items.weapon.sedna.ItemGunBaseNT.WeaponQuality; import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmo; @@ -22,6 +23,8 @@ import com.hbm.render.anim.BusAnimation; import com.hbm.render.anim.BusAnimationSequence; import com.hbm.render.anim.BusAnimationKeyframe.IType; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; @@ -54,7 +57,7 @@ public class XFactory10ga { .mag(new MagazineFullReload(0, 2).addConfigs(g10, g10_shrapnel, g10_du, g10_slug, g10_explosive)) .offset(0.75, -0.0625, -0.1875) .setupStandardFire().recoil(LAMBDA_RECOIL_DOUBLE_BARREL)) - .setupStandardConfiguration() + .setupStandardConfiguration().ps(LAMBDA_DOUBLE_SECONDARY) .anim(LAMBDA_DOUBLE_BARREL_ANIMS).orchestra(Orchestras.ORCHESTRA_DOUBLE_BARREL) ).setDefaultAmmo(EnumAmmo.G10, 6).setUnlocalizedName("gun_double_barrel"); ModItems.gun_double_barrel_sacred_dragon = new ItemGunBaseNT(WeaponQuality.B_SIDE, new GunConfig() @@ -64,7 +67,7 @@ public class XFactory10ga { .mag(new MagazineFullReload(0, 2).addConfigs(g10, g10_shrapnel, g10_du, g10_slug, g10_explosive)) .offset(0.75, -0.0625, -0.1875) .setupStandardFire().recoil(LAMBDA_RECOIL_DOUBLE_BARREL)) - .setupStandardConfiguration() + .setupStandardConfiguration().ps(LAMBDA_DOUBLE_SECONDARY) .anim(LAMBDA_DOUBLE_BARREL_ANIMS).orchestra(Orchestras.ORCHESTRA_DOUBLE_BARREL) ).setDefaultAmmo(EnumAmmo.G10_DU, 6).setUnlocalizedName("gun_double_barrel_sacred_dragon"); @@ -84,6 +87,39 @@ public class XFactory10ga { ItemGunBaseNT.setupRecoil(10, (float) (ctx.getPlayer().getRNG().nextGaussian() * 1.5)); }; + public static BiConsumer LAMBDA_DOUBLE_SECONDARY = (stack, ctx) -> { + + EntityLivingBase entity = ctx.entity; + EntityPlayer player = ctx.getPlayer(); + Receiver rec = ctx.config.getReceivers(stack)[0]; + int index = ctx.configIndex; + GunState state = ItemGunBaseNT.getState(stack, index); + + if(state == GunState.IDLE) { + + if(rec.getCanFire(stack).apply(stack, ctx)) { + rec.getOnFire(stack).accept(stack, ctx); + + if(rec.getFireSound(stack) != null) + entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, rec.getFireSound(stack), rec.getFireVolume(stack), rec.getFirePitch(stack)); + + ItemGunBaseNT.setState(stack, index, GunState.COOLDOWN); + ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterFire(stack)); + } else { + + if(rec.getDoesDryFire(stack)) { + ItemGunBaseNT.playAnimation(player, stack, GunAnimation.CYCLE_DRY, index); + ItemGunBaseNT.setState(stack, index, rec.getRefireAfterDry(stack) ? GunState.COOLDOWN : GunState.DRAWING); + ItemGunBaseNT.setTimer(stack, index, rec.getDelayAfterDryFire(stack)); + } + } + } + + if(state == GunState.RELOADING) { + ItemGunBaseNT.setReloadCancel(stack, true); + } + }; + @SuppressWarnings("incomplete-switch") public static BiFunction LAMBDA_DOUBLE_BARREL_ANIMS = (stack, type) -> { switch(type) { case EQUIP: return new BusAnimation() diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index a77d4a15c..9f0510e48 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -155,11 +155,6 @@ public class HbmWorldGen implements IWorldGenerator { WeightedRandomGeneric item = (WeightedRandomGeneric) WeightedRandom.getRandomItem(rand, BedrockOre.weightedOres); BedrockOreDefinition def = item.get(); - if(GeneralConfig.enable528 && GeneralConfig.enable528BedrockReplacement) { - BedrockOreDefinition replacement = BedrockOre.replacements.get(def.id); - if(replacement != null) def = replacement; - } - int randPosX = i + rand.nextInt(2) + 8; int randPosZ = j + rand.nextInt(2) + 8; BedrockOre.generate(world, randPosX, randPosZ, def.stack, def.acid, def.color, def.tier); @@ -175,15 +170,6 @@ public class HbmWorldGen implements IWorldGenerator { int colZ = (int) (colRand.nextGaussian() * 1500); int colRange = 750; - if((GeneralConfig.enable528BedrockSpawn || GeneralConfig.enable528BedrockDeposit) && rand.nextInt(GeneralConfig.bedrockRate) == 0) { - int x = i + rand.nextInt(16) + 8; - int z = j + rand.nextInt(16) + 8; - - if(GeneralConfig.enable528BedrockSpawn || (GeneralConfig.enable528BedrockDeposit && x <= colX + colRange && x >= colX - colRange && z <= colZ + colRange && z >= colZ - colRange)) { - BedrockOre.generate(world, x, z, new ItemStack(ModItems.fragment_coltan), null, 0xA78D7A, 1); - } - } - if(GeneralConfig.enable528ColtanDeposit) { for(int k = 0; k < 2; k++) { @@ -350,7 +336,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if(GeneralConfig.enable528 && GeneralConfig.enable528BosniaSimulator && rand.nextInt(16) == 0) { + if(GeneralConfig.enable528BosniaSimulator && rand.nextInt(16) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index b57d0becf..2f2d7f2f4 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -8,6 +8,7 @@ import com.hbm.blocks.generic.BlockPedestal.TileEntityPedestal; import com.hbm.blocks.generic.BlockPlushie.TileEntityPlushie; import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder; import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe; +import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure; import com.hbm.blocks.machine.Floodlight.TileEntityFloodlight; import com.hbm.blocks.machine.MachineFan.TileEntityFan; import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter; @@ -130,18 +131,18 @@ import java.util.*; import java.util.Map.Entry; public class ClientProxy extends ServerProxy { - + private static final I18nClient I18N = new I18nClient(); public RenderInfoSystem theInfoSystem = new RenderInfoSystem(); - + public ITranslate getI18n() { return I18N; } /** Runs just before item an block init */ @Override public void registerPreRenderInfo() { AdvancedModelLoader.registerModelHandler(new HmfModelLoader()); - + QMAWLoader.registerModFileURL(FMLCommonHandler.instance().findContainerFor(RefStrings.MODID).getSource()); } @@ -438,6 +439,8 @@ public class ClientProxy extends ServerProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileEntityVaultDoor.class, new RenderVaultDoor()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBlastDoor.class, new RenderBlastDoor()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDoorGeneric.class, new RenderDoorGeneric()); + //NBTStructure + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWandStructure.class, new RenderWandStructure()); } @Override @@ -459,7 +462,7 @@ public class ClientProxy extends ServerProxy { } } } - + // same crap but for items directly because why invent a new solution when this shit works just fine Iterator itItems = Item.itemRegistry.iterator(); while(itItems.hasNext()) { @@ -787,7 +790,7 @@ public class ClientProxy extends ServerProxy { public void registerBlockRenderer() { RenderingRegistry.registerBlockHandler(new RenderISBRHUniversal()); - + /// STOP DOING THIS /// RenderingRegistry.registerBlockHandler(new RenderScaffoldBlock()); RenderingRegistry.registerBlockHandler(new RenderTapeBlock()); diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 7920e59c5..e0efb97a8 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -261,7 +261,7 @@ public class CraftingManager { addRecipeAuto(new ItemStack(ModBlocks.capacitor_niobium, 1), new Object[] { "PPP", "ICI", "WWW", 'P', STEEL.plate(), 'I', RUBBER.ingot(), 'C', NB.block(), 'W', STEEL.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.capacitor_tantalium, 1), new Object[] { "PPP", "ICI", "WWW", 'P', STEEL.plate(), 'I', ANY_RESISTANTALLOY.ingot(), 'C', TA.block(), 'W', STEEL.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.capacitor_schrabidate, 1), new Object[] { "PPP", "ICI", "WWW", 'P', STEEL.plate(), 'I', ANY_RESISTANTALLOY.ingot(), 'C', SBD.block(), 'W', STEEL.ingot() }); - addRecipeAuto(new ItemStack(ModBlocks.machine_wood_burner, 1), new Object[] { "PPP", "CFC", "I I" , 'P', STEEL.plate528(), 'C', ModItems.coil_copper, 'I', IRON.ingot(), 'F', Blocks.furnace}); + addRecipeAuto(new ItemStack(ModBlocks.machine_wood_burner, 1), new Object[] { "PPP", "CFC", "I I" , 'P', STEEL.plate(), 'C', ModItems.coil_copper, 'I', IRON.ingot(), 'F', Blocks.furnace}); addRecipeAuto(new ItemStack(ModBlocks.machine_turbine, 1), new Object[] { "SMS", "PTP", "SMS", 'S', STEEL.ingot(), 'T', ModItems.turbine_titanium, 'M', ModItems.coil_copper, 'P', ANY_PLASTIC.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.machine_converter_he_rf, 1), new Object[] { "RRR", "WWW", "III", 'R', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CAPACITOR), 'W', REDSTONE.dust(), 'I', STEEL.ingot() }); addRecipeAuto(new ItemStack(ModBlocks.machine_converter_rf_he, 1), new Object[] { "RRR", "WWW", "III", 'R', REDSTONE.dust(), 'W', MINGRADE.wireFine(), 'I', STEEL.ingot() }); diff --git a/src/main/java/com/hbm/render/tileentity/RenderWandStructure.java b/src/main/java/com/hbm/render/tileentity/RenderWandStructure.java new file mode 100644 index 000000000..fd6b0dced --- /dev/null +++ b/src/main/java/com/hbm/render/tileentity/RenderWandStructure.java @@ -0,0 +1,92 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.tileentity.TileEntity; + +public class RenderWandStructure extends TileEntitySpecialRenderer { + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) { + if(!(tile instanceof TileEntityWandStructure)) return; + TileEntityWandStructure structure = (TileEntityWandStructure) tile; + + if(tile.getBlockMetadata() != 0) return; + + GL11.glPushMatrix(); + { + + double x1 = x; + double y1 = y + 1; + double z1 = z; + + double x2 = x + structure.sizeX; + double y2 = y + structure.sizeY + 1; + double z2 = z + structure.sizeZ; + + + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glColor3f(1F, 1F, 1F); + + + + Tessellator tess = Tessellator.instance; + tess.startDrawing(GL11.GL_LINES); + tess.setBrightness(240); + tess.setColorRGBA_F(1F, 1F, 1F, 1F); + + // top + tess.addVertex(x1, y2, z1); + tess.addVertex(x1, y2, z2); + + tess.addVertex(x1, y2, z2); + tess.addVertex(x2, y2, z2); + + tess.addVertex(x2, y2, z2); + tess.addVertex(x2, y2, z1); + + tess.addVertex(x2, y2, z1); + tess.addVertex(x1, y2, z1); + + // bottom + tess.addVertex(x1, y1, z1); + tess.addVertex(x1, y1, z2); + + tess.addVertex(x1, y1, z2); + tess.addVertex(x2, y1, z2); + + tess.addVertex(x2, y1, z2); + tess.addVertex(x2, y1, z1); + + tess.addVertex(x2, y1, z1); + tess.addVertex(x1, y1, z1); + + // sides + tess.addVertex(x1, y1, z1); + tess.addVertex(x1, y2, z1); + + tess.addVertex(x2, y1, z1); + tess.addVertex(x2, y2, z1); + + tess.addVertex(x2, y1, z2); + tess.addVertex(x2, y2, z2); + + tess.addVertex(x1, y1, z2); + tess.addVertex(x1, y2, z2); + + tess.draw(); + + + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + + } + GL11.glPopMatrix(); + } + +} diff --git a/src/main/java/com/hbm/saveddata/AnnihilatorSavedData.java b/src/main/java/com/hbm/saveddata/AnnihilatorSavedData.java new file mode 100644 index 000000000..955b87356 --- /dev/null +++ b/src/main/java/com/hbm/saveddata/AnnihilatorSavedData.java @@ -0,0 +1,165 @@ +package com.hbm.saveddata; + +import java.math.BigInteger; +import java.util.HashMap; +import java.util.List; +import java.util.Map.Entry; + +import com.hbm.inventory.fluid.FluidType; +import com.hbm.util.ItemStackUtil; +import com.hbm.inventory.RecipesCommon.ComparableStack; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagByte; +import net.minecraft.nbt.NBTTagByteArray; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.nbt.NBTTagShort; +import net.minecraft.nbt.NBTTagString; +import net.minecraft.world.World; +import net.minecraft.world.WorldSavedData; + +public class AnnihilatorSavedData extends WorldSavedData { + + public static final String KEY = "annihilator"; + + public HashMap pools = new HashMap(); + + public AnnihilatorSavedData() { + super(KEY); + this.markDirty(); + } + + public AnnihilatorSavedData(String name) { super(name); } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + + //NBTTagList list = nbt.getTagList(p_150295_1_, p_150295_2_) + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + NBTTagList list = new NBTTagList(); + + for(Entry entry : pools.entrySet()) { + list.appendTag(new NBTTagString(entry.getKey())); + NBTTagList poolList = new NBTTagList(); + entry.getValue().serialize(poolList); + list.appendTag(poolList); + } + + nbt.setTag("list", list); + } + + public static AnnihilatorSavedData getData(World worldObj) { + AnnihilatorSavedData data = (AnnihilatorSavedData) worldObj.perWorldStorage.loadData(AnnihilatorSavedData.class, KEY); + if(data == null) { + data = new AnnihilatorSavedData(); + worldObj.perWorldStorage.setData(KEY, data); + } + return data; + } + + public AnnihilatorPool grabPool(String pool) { + AnnihilatorPool poolInstance = pools.get(pool); + if(poolInstance == null) { + poolInstance = new AnnihilatorPool(); + pools.put(pool, poolInstance); + } + return poolInstance; + } + + /** For fluids */ + public void pushToPool(String pool, FluidType type, long amount) { + AnnihilatorPool poolInstance = grabPool(pool); + poolInstance.increment(type, amount); + this.markDirty(); + } + + /** For items (type + meta as well as only type), also handles ore dict */ + public void pushToPool(String pool, ItemStack stack) { + AnnihilatorPool poolInstance = grabPool(pool); + + poolInstance.increment(stack.getItem(), stack.stackSize); + poolInstance.increment(new ComparableStack(stack).makeSingular(), stack.stackSize); + + List oreDict = ItemStackUtil.getOreDictNames(stack); + for(String name : oreDict) poolInstance.increment(name, stack.stackSize); + + // originally a lookup for fluid containers was considered, but no one would use the annihilator like that, and it adds unnecessary overhead + + this.markDirty(); + } + + public static class AnnihilatorPool { + + /** + * Valid keys include: + *
    + *
  • Items, for wildcard
  • + *
  • ComparableStacks, for type + meta
  • + *
  • FluidTypes
  • + *
  • Strings, for ore dict keys
  • + *
+ * ItemStacks should be analyzed for all matching types and added accordingly. Any additions need to be added for (de)serializing + */ + public HashMap items = new HashMap(); + + public void increment(Object type, long amount) { + BigInteger counter = items.get(type); + if(counter == null) { + counter = BigInteger.valueOf(amount); + } else { + counter.add(BigInteger.valueOf(amount)); + } + items.put(type, counter); + } + + public void serialize(NBTTagList nbt) { + for(Entry entry : items.entrySet()) { + NBTTagList list = new NBTTagList(); + serializeKey(list, entry.getKey()); + list.appendTag(new NBTTagByteArray(entry.getValue().toByteArray())); + nbt.appendTag(list); + } + } + + /* + * this absolutely will not work because it was written under the assumption that NBTTagList can support arbitrary NBTTagBase + * even though an NBTTagList can only hold tags of a single type. this fucking sucks and implementing it better would have + * been easy, but we work with what we are given. + * + * alternative: keep the lists, but change all types to NBTTagByteArray since we can effectively reduce all other data + * types down into byte arrays anyway. if we can avoid NBTTagCompounds, we will. so much named tag crap we don't need just + * bloats the file size. + */ + public void serializeKey(NBTTagList list, Object key) { + if(key instanceof Item) { // 0 + Item item = (Item) key; + list.appendTag(new NBTTagByte((byte) 0)); + list.appendTag(new NBTTagString(Item.itemRegistry.getNameForObject(item))); + } + + if(key instanceof ComparableStack) { // 1 + ComparableStack item = (ComparableStack) key; + list.appendTag(new NBTTagByte((byte) 1)); + list.appendTag(new NBTTagString(Item.itemRegistry.getNameForObject(item.item))); + list.appendTag(new NBTTagShort((short) item.meta)); + } + + if(key instanceof FluidType) { // 2 + FluidType item = (FluidType) key; + list.appendTag(new NBTTagByte((byte) 2)); + list.appendTag(new NBTTagString(item.getUnlocalizedName())); + } + + if(key instanceof String) { // 3 + String item = (String) key; + list.appendTag(new NBTTagByte((byte)3)); + list.appendTag(new NBTTagString(item)); + } + } + } +} diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index caf2588aa..8da9a1a55 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -20,6 +20,7 @@ import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe; import com.hbm.blocks.generic.BlockSupplyCrate.TileEntitySupplyCrate; import com.hbm.blocks.generic.BlockWandJigsaw.TileEntityWandJigsaw; import com.hbm.blocks.generic.BlockWandLoot.TileEntityWandLoot; +import com.hbm.blocks.generic.BlockWandStructure.TileEntityWandStructure; import com.hbm.blocks.generic.BlockWandTandem.TileEntityWandTandem; import com.hbm.blocks.generic.BlockWandLogic.TileEntityWandLogic; import com.hbm.blocks.generic.DungeonSpawner.TileEntityDungeonSpawner; @@ -107,6 +108,7 @@ public class TileMappings { put(TileEntityMachineRTG.class, "tileentity_machine_rtg"); put(TileEntityMachineExcavator.class, "tileentity_ntm_excavator"); put(TileEntityMachineOreSlopper.class, "tileentity_ore_slopper"); + put(TileEntityMachineAnnihilator.class, "tileentity_annihilator"); put(TileEntityMachineDrain.class, "tileentity_fluid_drain"); put(TileEntityMachineFluidTank.class, "tileentity_fluid_tank"); put(TileEntityMachineTurbofan.class, "tileentity_machine_turbofan"); @@ -245,6 +247,7 @@ public class TileMappings { put(TileEntityWandJigsaw.class, "tileentity_wand_jigsaw"); put(TileEntityWandLogic.class, "tileentity_wand_spawner"); put(TileEntityWandTandem.class, "tileentity_wand_tandem"); + put(TileEntityWandStructure.class, "tileentity_wand_structure"); putNetwork(); putBombs(); @@ -442,7 +445,7 @@ public class TileMappings { put(TileEntityPipeExhaustPaintable.class, "tileentity_pipe_exhaust_paintable"); put(TileEntityFluidValve.class, "tileentity_pipe_valve"); put(TileEntityFluidPump.class, "tileentity_pipe_pump"); - + put(TileEntityPipeAnchor.class, "tileentity_pioe_anchor"); put(TileEntityCraneInserter.class, "tileentity_inserter"); @@ -496,7 +499,7 @@ public class TileMappings { if(IConfigurableMachine.class.isAssignableFrom(clazz)) { configurables.add((Class) clazz); } - + /** * Causes problems with most machines where two independently acting tiles work together (TU machines, RBMKs, fluid transfer) * Also breaks due to some sort of buffer leak in the threaded packets, if a boiler is involved (which uses a ByteBuf instead of the usual serializing) it crashes diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAnnihilator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAnnihilator.java new file mode 100644 index 000000000..98e75e7e9 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineAnnihilator.java @@ -0,0 +1,21 @@ +package com.hbm.tileentity.machine; + +import com.hbm.tileentity.TileEntityMachineBase; + +public class TileEntityMachineAnnihilator extends TileEntityMachineBase { + + public TileEntityMachineAnnihilator() { + super(8); + } + + @Override + public String getName() { + return "container.annihilator"; + } + + @Override + public void updateEntity() { + + } + +} diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java index 85b3834e8..ab08afd1a 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java @@ -103,7 +103,7 @@ public class RBMKDials { gameRules.get(RBMKKeys.KEY_REASIM_RANGE).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedInt(world, RBMKKeys.KEY_REASIM_RANGE, 1, 100))); gameRules.get(RBMKKeys.KEY_REASIM_COUNT).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedInt(world, RBMKKeys.KEY_REASIM_COUNT, 1, 24))); gameRules.get(RBMKKeys.KEY_REASIM_MOD).add(new Tuple.Pair<>(world, GameRuleHelper.getDoubleMinimum(world, RBMKKeys.KEY_REASIM_MOD, 0.0D))); - gameRules.get(RBMKKeys.KEY_REASIM_BOILERS).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_REASIM_BOILERS.keyString) || (GeneralConfig.enable528 && GeneralConfig.enable528ReasimBoilers))); + gameRules.get(RBMKKeys.KEY_REASIM_BOILERS).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_REASIM_BOILERS.keyString) || GeneralConfig.enable528ReasimBoilers)); gameRules.get(RBMKKeys.KEY_REASIM_BOILER_SPEED).add(new Tuple.Pair<>(world, GameRuleHelper.getClampedDouble(world, RBMKKeys.KEY_REASIM_BOILER_SPEED, 0.0D, 1.0D))); gameRules.get(RBMKKeys.KEY_DISABLE_MELTDOWNS).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_DISABLE_MELTDOWNS.keyString))); gameRules.get(RBMKKeys.KEY_ENABLE_MELTDOWN_OVERPRESSURE).add(new Tuple.Pair<>(world, world.getGameRules().getGameRuleBooleanValue(RBMKKeys.KEY_ENABLE_MELTDOWN_OVERPRESSURE.keyString))); diff --git a/src/main/java/com/hbm/world/feature/BedrockOre.java b/src/main/java/com/hbm/world/feature/BedrockOre.java index f4586c795..629658a85 100644 --- a/src/main/java/com/hbm/world/feature/BedrockOre.java +++ b/src/main/java/com/hbm/world/feature/BedrockOre.java @@ -1,7 +1,6 @@ package com.hbm.world.feature; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import com.hbm.blocks.BlockEnums.EnumStoneType; @@ -27,8 +26,6 @@ public class BedrockOre { public static List> weightedOres = new ArrayList(); public static List> weightedOresNether = new ArrayList(); - public static HashMap replacements = new HashMap(); - public static void init() { registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.IRON, 1), WorldConfig.bedrockIronSpawn); registerBedrockOre(weightedOres, new BedrockOreDefinition(EnumBedrockOre.COPPER, 1), WorldConfig.bedrockCopperSpawn); @@ -53,9 +50,6 @@ public class BedrockOre { registerBedrockOre(weightedOresNether, new BedrockOreDefinition(new ItemStack(Items.glowstone_dust, 4), 1, 0xF9FF4D), WorldConfig.bedrockGlowstoneSpawn); registerBedrockOre(weightedOresNether, new BedrockOreDefinition(new ItemStack(ModItems.powder_fire, 4), 1, 0xD7341F), WorldConfig.bedrockPhosphorusSpawn); registerBedrockOre(weightedOresNether, new BedrockOreDefinition(new ItemStack(Items.quartz, 4), 1, 0xF0EFDD), WorldConfig.bedrockQuartzSpawn); - - replacements.put("ore" + EnumBedrockOre.IRON.oreName, new BedrockOreDefinition(EnumBedrockOre.HEMATITE, 1)); - replacements.put("ore" + EnumBedrockOre.COPPER.oreName, new BedrockOreDefinition(EnumBedrockOre.MALACHITE, 1)); } public static void registerBedrockOre(List list, BedrockOreDefinition def, int weight) { diff --git a/src/main/java/com/hbm/world/gen/nbt/JigsawPiece.java b/src/main/java/com/hbm/world/gen/nbt/JigsawPiece.java index 039f8d154..6db8b75d1 100644 --- a/src/main/java/com/hbm/world/gen/nbt/JigsawPiece.java +++ b/src/main/java/com/hbm/world/gen/nbt/JigsawPiece.java @@ -9,17 +9,47 @@ import net.minecraft.world.gen.structure.StructureComponent.BlockSelector; // Assigned to a Component to build public class JigsawPiece { - // Translates a given name into a jigsaw piece, for serialization - protected static Map jigsawMap = new HashMap<>(); + // Translates a given name into a jigsaw piece, for serialization + protected static Map jigsawMap = new HashMap<>(); public final String name; public final NBTStructure structure; // Block modifiers, for randomization and terrain matching + /** + * Replaces matching blocks using the result of a BlockSelector + */ public Map blockTable; - public boolean conformToTerrain = false; // moves every single column to the terrain (digging out trenches, natural formations) - public boolean alignToTerrain = false; // aligns this component y-level individually, without moving individual columns (village houses) - public int heightOffset = 0; // individual offset for the structure + + /** + * Moves every single column to the terrain (for digging out trenches, natural formations, etc) + */ + public boolean conformToTerrain = false; + + /** + * Aligns this component y-level individually, without moving individual columns (like village houses) + */ + public boolean alignToTerrain = false; + + /** + * Height offset for this structure piece, -1 will sink the floor flush into the ground + */ + public int heightOffset = 0; + + /** + * Will fill any air gap beneath the jigsaw piece using the given selector + */ + public BlockSelector platform; + + /** + * If greater than 0, will limit the number of times this piece can spawn in a structure + */ + public int instanceLimit = 0; + + /** + * If set, will continue generation beyond the defined limits until this piece exists at least once + */ + public boolean required = false; public JigsawPiece(String name, NBTStructure structure) { this(name, structure, 0); diff --git a/src/main/java/com/hbm/world/gen/nbt/JigsawPool.java b/src/main/java/com/hbm/world/gen/nbt/JigsawPool.java index aaf0e70d2..8fbc0c533 100644 --- a/src/main/java/com/hbm/world/gen/nbt/JigsawPool.java +++ b/src/main/java/com/hbm/world/gen/nbt/JigsawPool.java @@ -23,6 +23,11 @@ public class JigsawPool { totalWeight += weight; } + public int getAverageWeight() { + if(pieces.size() == 0) return 1; + return totalWeight / pieces.size(); + } + protected JigsawPool clone() { JigsawPool clone = new JigsawPool(); clone.pieces = new ArrayList<>(this.pieces); diff --git a/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java b/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java index 4109338cc..04a7dda65 100644 --- a/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java +++ b/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java @@ -1,12 +1,16 @@ package com.hbm.world.gen.nbt; import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.*; import java.util.function.Predicate; +import org.apache.commons.io.IOUtils; + import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockWand; import com.hbm.blocks.generic.BlockWandTandem.TileEntityWandTandem; @@ -18,6 +22,7 @@ import com.hbm.util.Tuple.Pair; import com.hbm.util.Tuple.Quartet; import com.hbm.util.fauxpointtwelve.BlockPos; import com.hbm.world.gen.nbt.SpawnCondition.WorldCoordinate; +import com.hbm.world.gen.nbt.selector.BiomeBlockSelector; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.*; @@ -57,9 +62,11 @@ public class NBTStructure { private static Map namedMap = new HashMap<>(); - protected static Map> weightedMap = new HashMap<>(); + protected static Map> spawnMap = new HashMap<>(); protected static Map> customSpawnMap = new HashMap<>(); + private static Map> validBiomeCache = new HashMap<>(); + private String name; private boolean isLoaded; @@ -84,6 +91,34 @@ public class NBTStructure { } } + public NBTStructure(String name, InputStream stream) { + this.name = name; + loadStructure(stream); + } + + public NBTStructure(File file) throws FileNotFoundException { + this.name = file.getName(); + InputStream stream = new FileInputStream(file); + loadStructure(stream); + IOUtils.closeQuietly(stream); + } + + public String getName() { + return name.substring(0, name.length() - 4); // trim .nbt + } + + public int getSizeX() { + return size.x; + } + + public int getSizeY() { + return size.y; + } + + public int getSizeZ() { + return size.z; + } + public static void register() { MapGenStructureIO.registerStructure(Start.class, "NBTStructures"); MapGenStructureIO.func_143031_a(Component.class, "NBTComponents"); @@ -102,10 +137,8 @@ public class NBTStructure { return; } - List weightedList = weightedMap.computeIfAbsent(dimensionId, integer -> new ArrayList()); - for(int i = 0; i < spawn.spawnWeight; i++) { - weightedList.add(spawn); - } + List spawnList = spawnMap.computeIfAbsent(dimensionId, integer -> new ArrayList()); + spawnList.add(spawn); } public static void registerStructure(SpawnCondition spawn, int[] dimensionIds) { @@ -122,10 +155,8 @@ public class NBTStructure { public static void registerNullWeight(int dimensionId, int weight, Predicate predicate) { SpawnCondition spawn = new SpawnCondition(weight, predicate); - List weightedList = weightedMap.computeIfAbsent(dimensionId, integer -> new ArrayList()); - for(int i = 0; i < spawn.spawnWeight; i++) { - weightedList.add(spawn); - } + List spawnList = spawnMap.computeIfAbsent(dimensionId, integer -> new ArrayList()); + spawnList.add(spawn); } // Presents a list of all structures registered (so far) @@ -142,7 +173,7 @@ public class NBTStructure { } // Saves a selected area into an NBT structure (+ some of our non-standard stuff to support 1.7.10) - public static void saveArea(String filename, World world, int x1, int y1, int z1, int x2, int y2, int z2, Set> exclude) { + public static NBTTagCompound saveArea(World world, int x1, int y1, int z1, int x2, int y2, int z2, Set> exclude) { NBTTagCompound structure = new NBTTagCompound(); NBTTagList nbtBlocks = new NBTTagList(); NBTTagList nbtPalette = new NBTTagList(); @@ -249,6 +280,13 @@ public class NBTStructure { structure.setTag("entities", new NBTTagList()); + return structure; + } + + // Writes out a specified area to an .nbt file with a given name + public static File quickSaveArea(String filename, World world, int x1, int y1, int z1, int x2, int y2, int z2, Set> exclude) { + NBTTagCompound structure = saveArea(world, x1, y1, z1, x2, y2, z2, exclude); + try { File structureDirectory = new File(Minecraft.getMinecraft().mcDataDir, "structures"); structureDirectory.mkdir(); @@ -256,8 +294,12 @@ public class NBTStructure { File structureFile = new File(structureDirectory, filename); CompressedStreamTools.writeCompressed(structure, new FileOutputStream(structureFile)); + + return structureFile; } catch (Exception ex) { MainRegistry.logger.warn("Failed to save NBT structure", ex); + + return null; } } @@ -441,10 +483,14 @@ public class NBTStructure { } public void build(World world, int x, int y, int z) { - build(world, x, y, z, 0); + build(world, x, y, z, 0, true, false); } public void build(World world, int x, int y, int z, int coordBaseMode) { + build(world, x, y, z, coordBaseMode, true, false); + } + + public void build(World world, int x, int y, int z, int coordBaseMode, boolean center, boolean wipeExisting) { if(!isLoaded) { MainRegistry.logger.info("NBTStructure is invalid"); return; @@ -452,9 +498,11 @@ public class NBTStructure { HashMap worldItemPalette = getWorldItemPalette(); - boolean swizzle = coordBaseMode == 1 || coordBaseMode == 3; - x -= (swizzle ? size.z : size.x) / 2; - z -= (swizzle ? size.x : size.z) / 2; + if(center) { + boolean swizzle = coordBaseMode == 1 || coordBaseMode == 3; + x -= (swizzle ? size.z : size.x) / 2; + z -= (swizzle ? size.x : size.z) / 2; + } int maxX = size.x; int maxZ = size.z; @@ -466,16 +514,17 @@ public class NBTStructure { for(int by = 0; by < size.y; by++) { BlockState state = blockArray[bx][by][bz]; - if(state == null) continue; + if(state == null) { + if(wipeExisting) world.setBlock(rx, by + y, rz, Blocks.air, 0, 2); + continue; + } int ry = by + y; Block block = transformBlock(state.definition, null, world.rand); int meta = transformMeta(state.definition, null, coordBaseMode); - if(ry < 0 || ry >= world.getHeight()) continue; - Block existing = world.getBlock(rx, ry, rz); - if(existing == Blocks.bedrock) continue; + if(ry < 1) continue; world.setBlock(rx, ry, rz, block, meta, 2); @@ -535,12 +584,30 @@ public class NBTStructure { int minZ = Math.min(rotMinZ, rotMaxZ); int maxZ = Math.max(rotMinZ, rotMaxZ); + if(piece.blockTable != null || piece.platform != null) { + BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(generatingBounds.getCenterX(), generatingBounds.getCenterZ()); + + if(piece.blockTable != null) { + for(BlockSelector selector : piece.blockTable.values()) { + if(selector instanceof BiomeBlockSelector) { + ((BiomeBlockSelector) selector).nextBiome = biome; + } + } + } + + if(piece.platform instanceof BiomeBlockSelector) { + ((BiomeBlockSelector) piece.platform).nextBiome = biome; + } + } + for(int bx = minX; bx <= maxX; bx++) { for(int bz = minZ; bz <= maxZ; bz++) { int rx = rotateX(bx, bz, coordBaseMode) + totalBounds.minX; int rz = rotateZ(bx, bz, coordBaseMode) + totalBounds.minZ; int oy = piece.conformToTerrain ? world.getTopSolidOrLiquidBlock(rx, rz) + piece.heightOffset : totalBounds.minY; + boolean hasBase = false; + for(int by = 0; by < size.y; by++) { BlockState state = blockArray[bx][by][bz]; if(state == null) continue; @@ -550,9 +617,7 @@ public class NBTStructure { Block block = transformBlock(state.definition, piece.blockTable, world.rand); int meta = transformMeta(state.definition, piece.blockTable, coordBaseMode); - if(ry < 0 || ry >= world.getHeight()) continue; - Block existing = world.getBlock(rx, ry, rz); - if(existing == Blocks.bedrock) continue; + if(ry < 1) continue; world.setBlock(rx, ry, rz, block, meta, 2); @@ -560,6 +625,16 @@ public class NBTStructure { TileEntity te = buildTileEntity(world, block, worldItemPalette, state.nbt, coordBaseMode, structureName); world.setTileEntity(rx, ry, rz, te); } + + if(by == 0 && piece.platform != null && !block.getMaterial().isReplaceable()) hasBase = true; + } + + if(hasBase && !piece.conformToTerrain) { + for(int y = oy - 1; y > 0; y--) { + if(!world.getBlock(rx, y, rz).isReplaceable(world, rx, y, rz)) break; + piece.platform.selectBlocks(world.rand, 0, 0, 0, false); + world.setBlock(rx, y, rz, piece.platform.func_151561_a(), piece.platform.getSelectedBlockMetaData(), 2); + } } } } @@ -602,7 +677,7 @@ public class NBTStructure { for(int i = 0; i < items.tagCount(); i++) { NBTTagCompound item = items.getCompoundTagAt(i); - item.setShort("id", palette.get(item.getShort("id"))); + item.setShort("id", palette.getOrDefault(item.getShort("id"), (short)0)); } } @@ -940,6 +1015,8 @@ public class NBTStructure { List queuedComponents = new ArrayList<>(); if(spawn.structure == null) queuedComponents.add(startComponent); + Set requiredPieces = findRequiredPieces(spawn); + // Iterate through and build out all the components we intend to spawn while(!queuedComponents.isEmpty()) { queuedComponents.sort((a, b) -> b.priority - a.priority); // sort by placement priority descending @@ -956,7 +1033,10 @@ public class NBTStructure { if(fromComponent.piece.structure.fromConnections == null) continue; int distance = getDistanceTo(fromComponent.getBoundingBox()); - boolean fallbacksOnly = this.components.size() >= spawn.sizeLimit || distance >= spawn.rangeLimit; + + // Only generate fallback pieces once we hit our size limit, unless we have a required component + // Note that there is a HARD limit of 1024 pieces to prevent infinite generation + boolean fallbacksOnly = requiredPieces.size() == 0 && (components.size() >= spawn.sizeLimit || distance >= spawn.rangeLimit) || components.size() > 1024; for(List unshuffledList : fromComponent.piece.structure.fromConnections) { List connectionList = new ArrayList<>(unshuffledList); @@ -994,6 +1074,8 @@ public class NBTStructure { if(nextComponent != null) { addComponent(nextComponent, fromConnection.placementPriority); queuedComponents.add(nextComponent); + + requiredPieces.remove(nextComponent.piece); } else { // If we failed to fit anything in, grab something from the fallback pool, ignoring bounds check // unless we are perfectly abutting another piece, so grid layouts can work! @@ -1043,6 +1125,22 @@ public class NBTStructure { return new BlockPos(x, y, z); } + private Set findRequiredPieces(SpawnCondition spawn) { + Set requiredPieces = new HashSet<>(); + + if(spawn.pools == null) return requiredPieces; + + for(JigsawPool pool : spawn.pools.values()) { + for(Pair weight : pool.pieces) { + if(weight.getKey().required) { + requiredPieces.add(weight.getKey()); + } + } + } + + return requiredPieces; + } + private Component buildNextComponent(Random rand, SpawnCondition spawn, JigsawPool pool, Component fromComponent, JigsawConnection fromConnection) { JigsawPiece nextPiece = pool.get(rand); if(nextPiece == null) { @@ -1050,6 +1148,17 @@ public class NBTStructure { return null; } + if(nextPiece.instanceLimit > 0) { + int instances = 0; + for(Object component : components) { + if(component instanceof Component && ((Component) component).piece == nextPiece) { + instances++; + + if(instances >= nextPiece.instanceLimit) return null; + } + } + } + List connectionPool = nextPiece.structure.getConnectionPool(fromConnection.dir, fromConnection.targetName); if(connectionPool == null || connectionPool.isEmpty()) { MainRegistry.logger.warn("[Jigsaw] No valid connections for: " + fromConnection.targetName + " - in piece: " + nextPiece.name); @@ -1153,7 +1262,7 @@ public class NBTStructure { } } - if (!weightedMap.containsKey(worldObj.provider.dimensionId)) + if (!spawnMap.containsKey(worldObj.provider.dimensionId)) return null; int x = chunkX; @@ -1189,11 +1298,35 @@ public class NBTStructure { } private SpawnCondition findSpawn(BiomeGenBase biome) { - List spawnList = weightedMap.get(worldObj.provider.dimensionId); + Map dimensionCache = validBiomeCache.computeIfAbsent(worldObj.provider.dimensionId, integer -> new HashMap<>()); - for(int i = 0; i < 64; i++) { - SpawnCondition spawn = spawnList.get(rand.nextInt(spawnList.size())); - if(spawn.isValid(biome)) return spawn; + WeightedSpawnList filteredList; + if(!dimensionCache.containsKey(biome.biomeID)) { + List spawnList = spawnMap.get(worldObj.provider.dimensionId); + + filteredList = new WeightedSpawnList(); + for(SpawnCondition spawn : spawnList) { + if(spawn.isValid(biome)) { + filteredList.add(spawn); + filteredList.totalWeight += spawn.spawnWeight; + } + } + + dimensionCache.put(biome.biomeID, filteredList); + } else { + filteredList = dimensionCache.get(biome.biomeID); + } + + if(filteredList.totalWeight == 0) return null; + + int weight = rand.nextInt(filteredList.totalWeight); + + for(SpawnCondition spawn : filteredList) { + weight -= spawn.spawnWeight; + + if(weight < 0) { + return spawn; + } } return null; @@ -1201,4 +1334,10 @@ public class NBTStructure { } + private static class WeightedSpawnList extends ArrayList { + + public int totalWeight = 0; + + } + } diff --git a/src/main/java/com/hbm/world/gen/nbt/SpawnCondition.java b/src/main/java/com/hbm/world/gen/nbt/SpawnCondition.java index f84d3aad8..0c385e51e 100644 --- a/src/main/java/com/hbm/world/gen/nbt/SpawnCondition.java +++ b/src/main/java/com/hbm/world/gen/nbt/SpawnCondition.java @@ -18,34 +18,70 @@ public class SpawnCondition { public final String name; - // If defined, will spawn a single jigsaw piece, for single nbt structures + /** + * If defined, will spawn a single jigsaw piece, for single nbt structures + */ public JigsawPiece structure; - // If defined, will spawn in a non-nbt structure component + /** + * If defined, will spawn in a non-nbt structure component + */ public Function, StructureStart> start; - // If defined, will override regular spawn location checking, for placing at specific coordinates or with special rules + /** + * If defined, will override regular spawn location checking, for placing at specific coordinates or with special rules + */ public Predicate checkCoordinates; - // Our regular spawning mechanics, based on biome, you should generally use these + /** + * Defines whether the current biome is valid for spawning this structure + */ public Predicate canSpawn; + + /** + * The chance of this structure spawning relative to others, + * higher weights will spawn more often. + */ public int spawnWeight = 1; - // Named jigsaw pools that are referenced within the structure + /** + * Named jigsaw pools that are referenced by jigsaw blocks within the structure + */ public Map pools; + + /** + * The name of the "core" pool, which the structure starts generation from, + * must be a name of a pool defined within `pool` + */ public String startPool; - // Maximum amount of components in this structure + /** + * Maximum amount of components in this structure. + * Once the structure reaches this many components, + * it will only generate fallback pieces and stop + * + * Note: there is a hard limit of 1024 pieces to prevent infinite generation, + * even if some pieces are marked as required! + */ public int sizeLimit = 8; - // How far the structure can extend horizontally from the center, maximum of 128 - // This could be increased by changing GenStructure:range from 8, but this is already quite reasonably large + // This could be increased by changing GenStructure:range from 8, but this is + // already quite reasonably large + /** + * How far the structure can extend horizontally from the center, maximum of 128 + */ public int rangeLimit = 128; - // Height modifiers, will clamp height that the start generates at, allowing for: - // * Submarines that must spawn under the ocean surface - // * Bunkers that sit underneath the ground + /** + * Height modifiers, will clamp height that the start generates at, allowing for: + * * Submarines that must spawn under the ocean surface + * * Bunkers that sit underneath the ground + */ public int minHeight = 1; + + /** + * @see minHeight + */ public int maxHeight = 128; protected SpawnCondition(int weight, Predicate predicate) { diff --git a/src/main/java/com/hbm/world/gen/nbt/selector/BiomeBlockSelector.java b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeBlockSelector.java new file mode 100644 index 000000000..cf700c1a0 --- /dev/null +++ b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeBlockSelector.java @@ -0,0 +1,10 @@ +package com.hbm.world.gen.nbt.selector; + +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.structure.StructureComponent.BlockSelector; + +public abstract class BiomeBlockSelector extends BlockSelector { + + public BiomeGenBase nextBiome; + +} diff --git a/src/main/java/com/hbm/world/gen/nbt/selector/BiomeFillerSelector.java b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeFillerSelector.java new file mode 100644 index 000000000..73fcf9c9b --- /dev/null +++ b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeFillerSelector.java @@ -0,0 +1,12 @@ +package com.hbm.world.gen.nbt.selector; + +import java.util.Random; + +public class BiomeFillerSelector extends BiomeBlockSelector { + + @Override + public void selectBlocks(Random rand, int x, int y, int z, boolean notInterior) { + field_151562_a = nextBiome.fillerBlock; + } + +} diff --git a/src/main/java/com/hbm/world/gen/nbt/selector/BiomeTopSelector.java b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeTopSelector.java new file mode 100644 index 000000000..862f17ae1 --- /dev/null +++ b/src/main/java/com/hbm/world/gen/nbt/selector/BiomeTopSelector.java @@ -0,0 +1,12 @@ +package com.hbm.world.gen.nbt.selector; + +import java.util.Random; + +public class BiomeTopSelector extends BiomeBlockSelector { + + @Override + public void selectBlocks(Random rand, int x, int y, int z, boolean notInterior) { + field_151562_a = nextBiome.topBlock; + } + +} diff --git a/src/main/java/com/hbm/world/gen/nbt/selector/BrickSelector.java b/src/main/java/com/hbm/world/gen/nbt/selector/BrickSelector.java new file mode 100644 index 000000000..98852290d --- /dev/null +++ b/src/main/java/com/hbm/world/gen/nbt/selector/BrickSelector.java @@ -0,0 +1,15 @@ +package com.hbm.world.gen.nbt.selector; + +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.world.gen.structure.StructureComponent.BlockSelector; + +public class BrickSelector extends BlockSelector { + + @Override + public void selectBlocks(Random rand, int x, int y, int z, boolean notInterior) { + field_151562_a = Blocks.brick_block; + } + +} diff --git a/src/main/java/com/hbm/world/gen/nbt/selector/StoneBrickSelector.java b/src/main/java/com/hbm/world/gen/nbt/selector/StoneBrickSelector.java new file mode 100644 index 000000000..ff841d08b --- /dev/null +++ b/src/main/java/com/hbm/world/gen/nbt/selector/StoneBrickSelector.java @@ -0,0 +1,24 @@ +package com.hbm.world.gen.nbt.selector; + +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.world.gen.structure.StructureComponent.BlockSelector; + +public class StoneBrickSelector extends BlockSelector { + + @Override + public void selectBlocks(Random rand, int x, int y, int z, boolean notInterior) { + field_151562_a = Blocks.stonebrick; + float f = rand.nextFloat(); + + if (f < 0.2F) { + this.selectedBlockMetaData = 2; + } else if (f < 0.5F) { + this.selectedBlockMetaData = 1; + } else { + this.selectedBlockMetaData = 0; + } + } + +} diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index e89380a4b..879e27666 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -6354,6 +6354,8 @@ tile.wand_air.name=Structure Wand Block (Air) tile.wand_loot.name=Structure Wand Block (Lootable) tile.wand_jigsaw.name=Structure Wand Block (Jigsaw) tile.wand_logic.name=Structure Wand Block (Logic) +tile.wand_structure.load.name=Structure Loading Block +tile.wand_structure.save.name=Structure Saving Block tile.waste_earth.name=Dead Grass tile.waste_leaves.name=Dead Leaves tile.waste_log.name=Charred Log diff --git a/src/main/resources/assets/hbm/textures/blocks/wand_structure_load.png b/src/main/resources/assets/hbm/textures/blocks/wand_structure_load.png new file mode 100644 index 000000000..fbebc58e9 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/wand_structure_load.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/wand_structure_save.png b/src/main/resources/assets/hbm/textures/blocks/wand_structure_save.png new file mode 100644 index 000000000..9773d70e4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/wand_structure_save.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/processing/gui_annihilator.png b/src/main/resources/assets/hbm/textures/gui/processing/gui_annihilator.png new file mode 100644 index 000000000..0ee357a8e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/gui/processing/gui_annihilator.png differ diff --git a/src/main/resources/assets/hbm/textures/misc/player.png b/src/main/resources/assets/hbm/textures/misc/player.png deleted file mode 100644 index 1f8e0e129..000000000 Binary files a/src/main/resources/assets/hbm/textures/misc/player.png and /dev/null differ diff --git a/src/main/resources/assets/hbm/textures/player/player.png b/src/main/resources/assets/hbm/textures/player/player.png new file mode 100644 index 000000000..cb243856d Binary files /dev/null and b/src/main/resources/assets/hbm/textures/player/player.png differ diff --git a/src/main/resources/assets/hbm/textures/player/player_carousel.png b/src/main/resources/assets/hbm/textures/player/player_carousel.png new file mode 100644 index 000000000..6042cac3f Binary files /dev/null and b/src/main/resources/assets/hbm/textures/player/player_carousel.png differ diff --git a/src/main/resources/assets/hbm/textures/player/player_cf.png b/src/main/resources/assets/hbm/textures/player/player_cf.png new file mode 100644 index 000000000..40143904e Binary files /dev/null and b/src/main/resources/assets/hbm/textures/player/player_cf.png differ diff --git a/src/main/resources/assets/hbm/textures/player/player_monarch.png b/src/main/resources/assets/hbm/textures/player/player_monarch.png new file mode 100644 index 000000000..46ffef3d7 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/player/player_monarch.png differ