From 456a7251d479967e1afff04f5f1e4c46d5c59780 Mon Sep 17 00:00:00 2001 From: Boblet Date: Thu, 27 Jun 2024 16:37:13 +0200 Subject: [PATCH] a metric fuckton of recipes --- .../hbm/blocks/machine/MachineOreSlopper.java | 6 ++ .../container/ContainerOreSlopper.java | 50 +++++++++++++ .../java/com/hbm/inventory/fluid/Fluids.java | 5 +- .../com/hbm/inventory/gui/GUIOreSlopper.java | 41 +++++++++++ .../inventory/recipes/ArcFurnaceRecipes.java | 30 +++++++- .../inventory/recipes/CentrifugeRecipes.java | 37 ++++++++++ .../inventory/recipes/CombinationRecipes.java | 11 +++ .../recipes/CrystallizerRecipes.java | 56 +++++++++++++++ .../recipes/ElectrolyserMetalRecipes.java | 30 ++++++++ .../hbm/items/special/ItemBedrockOreNew.java | 66 +++++++++++++++--- .../machine/TileEntityMachineOreSlopper.java | 24 ++++++- src/main/resources/assets/hbm/lang/de_DE.lang | 33 +++++++++ src/main/resources/assets/hbm/lang/en_US.lang | 35 +++++++++- .../hbm/textures/gui/fluids/vitriol.png | Bin 0 -> 491 bytes .../hbm/textures/models/tank/tank_VITRIOL.png | Bin 0 -> 1242 bytes 15 files changed, 408 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/hbm/inventory/container/ContainerOreSlopper.java create mode 100644 src/main/java/com/hbm/inventory/gui/GUIOreSlopper.java create mode 100644 src/main/resources/assets/hbm/textures/gui/fluids/vitriol.png create mode 100644 src/main/resources/assets/hbm/textures/models/tank/tank_VITRIOL.png diff --git a/src/main/java/com/hbm/blocks/machine/MachineOreSlopper.java b/src/main/java/com/hbm/blocks/machine/MachineOreSlopper.java index 24b11eae7..42691c524 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineOreSlopper.java +++ b/src/main/java/com/hbm/blocks/machine/MachineOreSlopper.java @@ -4,6 +4,7 @@ import com.hbm.blocks.BlockDummyable; import com.hbm.tileentity.machine.TileEntityMachineOreSlopper; import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; @@ -28,4 +29,9 @@ public class MachineOreSlopper extends BlockDummyable { public int getOffset() { return 3; } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + return standardOpenBehavior(world, x, y, z, player, side); + } } diff --git a/src/main/java/com/hbm/inventory/container/ContainerOreSlopper.java b/src/main/java/com/hbm/inventory/container/ContainerOreSlopper.java new file mode 100644 index 000000000..1b74dc8f8 --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerOreSlopper.java @@ -0,0 +1,50 @@ +package com.hbm.inventory.container; + +import com.hbm.inventory.SlotCraftingOutput; +import com.hbm.tileentity.machine.TileEntityMachineOreSlopper; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; + +public class ContainerOreSlopper extends Container { + + public TileEntityMachineOreSlopper slopper; + + public ContainerOreSlopper(InventoryPlayer player, TileEntityMachineOreSlopper slopper) { + this.slopper = slopper; + + //Battery + this.addSlotToContainer(new Slot(slopper, 0, 8, 72)); + //Fluid ID + this.addSlotToContainer(new Slot(slopper, 1, 26, 72)); + //Input + this.addSlotToContainer(new Slot(slopper, 2, 71, 27)); + //Outputs + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 3, 134, 18)); + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 4, 152, 18)); + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 5, 134, 36)); + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 6, 152, 36)); + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 7, 134, 54)); + this.addSlotToContainer(new SlotCraftingOutput(player.player, slopper, 8, 152, 54)); + //Upgrades + this.addSlotToContainer(new Slot(slopper, 0, 62, 72)); + this.addSlotToContainer(new Slot(slopper, 0, 80, 72)); + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(player, j + i * 9 + 9, 8 + j * 18, 122 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(player, i, 8 + i * 18, 180)); + } + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return slopper.isUseableByPlayer(player); + } +} diff --git a/src/main/java/com/hbm/inventory/fluid/Fluids.java b/src/main/java/com/hbm/inventory/fluid/Fluids.java index 9a5fc151b..77e01d676 100644 --- a/src/main/java/com/hbm/inventory/fluid/Fluids.java +++ b/src/main/java/com/hbm/inventory/fluid/Fluids.java @@ -175,6 +175,7 @@ public class Fluids { public static FluidType THORIUM_SALT_DEPLETED; public static FluidType FULLERENE; public static FluidType STELLAR_FLUX; + public static FluidType VITRIOL; /* Lagacy names for compatibility purposes */ @Deprecated public static FluidType ACID; //JAOPCA uses this, apparently @@ -375,7 +376,8 @@ public class Fluids { HOTCRACKOIL_DS = new FluidType("HOTCRACKOIL_DS", 0x3A1A28, 2, 3, 0, EnumSymbol.NONE).setTemp(350).addTraits(LIQUID, VISCOUS, P_OIL); NAPHTHA_DS = new FluidType("NAPHTHA_DS", 0x63614E, 2, 1, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0x5F6D44)).addTraits(LIQUID, VISCOUS, P_FUEL); LIGHTOIL_DS = new FluidType("LIGHTOIL_DS", 0x63543E, 1, 2, 0, EnumSymbol.NONE).addContainers(new CD_Canister(0xB46B52)).addTraits(LIQUID, P_FUEL); - STELLAR_FLUX = new FluidType(139, "STELLAR_FLUX", 0xE300FF, 0, 4, 4, EnumSymbol.ANTIMATTER).addTraits(ANTI, GASEOUS); + STELLAR_FLUX = new FluidType("STELLAR_FLUX", 0xE300FF, 0, 4, 4, EnumSymbol.ANTIMATTER).addTraits(ANTI, GASEOUS); + VITRIOL = new FluidType(140, "VITRIOL", 0x6E5222, 2, 0, 1, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS); // ^ ^ ^ ^ ^ ^ ^ ^ //ADD NEW FLUIDS HERE @@ -489,6 +491,7 @@ public class Fluids { metaOrder.add(SALIENT); metaOrder.add(SEEDSLURRY); metaOrder.add(COLLOID); + metaOrder.add(VITRIOL); metaOrder.add(IONGEL); metaOrder.add(PEROXIDE); metaOrder.add(SULFURIC_ACID); diff --git a/src/main/java/com/hbm/inventory/gui/GUIOreSlopper.java b/src/main/java/com/hbm/inventory/gui/GUIOreSlopper.java new file mode 100644 index 000000000..26f4937fc --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIOreSlopper.java @@ -0,0 +1,41 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerOreSlopper; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.TileEntityMachineOreSlopper; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIOreSlopper extends GuiInfoContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_ore_slopper.png"); + private TileEntityMachineOreSlopper slopper; + + public GUIOreSlopper(InventoryPlayer player, TileEntityMachineOreSlopper slopper) { + super(new ContainerOreSlopper(player, slopper)); + this.slopper = slopper; + + this.xSize = 176; + this.ySize = 204; + } + + @Override + protected void drawGuiContainerForegroundLayer( int i, int j) { + + String name = this.slopper.hasCustomInventoryName() ? this.slopper.getInventoryName() : I18n.format(this.slopper.getInventoryName()); + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float interp, int x, int y) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java b/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java index 1be8bdd3c..80db4da72 100644 --- a/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ArcFurnaceRecipes.java @@ -25,6 +25,9 @@ import com.hbm.inventory.material.Mats.MaterialStack; import com.hbm.inventory.recipes.loader.SerializableRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemScraps; +import com.hbm.items.special.ItemBedrockOreNew; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -51,6 +54,24 @@ public class ArcFurnaceRecipes extends SerializableRecipe { recipes.put(new ComparableStack(ModBlocks.sand_quartz), new ArcFurnaceRecipe().solid(new ItemStack(ModBlocks.glass_quartz))); recipes.put(new OreDictStack(BORAX.dust()), new ArcFurnaceRecipe().solid(new ItemStack(ModItems.powder_boron_tiny, 3)).fluid(new MaterialStack(Mats.MAT_BORON, MaterialShapes.NUGGET.q(3)))); + for(BedrockOreType type : BedrockOreType.values()) { + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 2))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 3))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 2))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 3))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 2))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ArcFurnaceRecipe().solid(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type, 3))); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(5)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(2)))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(5)))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(1)), ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(1)))); + + int i3 = MaterialShapes.INGOT.q(3); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductAcid1, i3), ItemBedrockOreNew.toFluid(type.byproductAcid2, i3), ItemBedrockOreNew.toFluid(type.byproductAcid3, i3))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductSolvent1, i3), ItemBedrockOreNew.toFluid(type.byproductSolvent2, i3), ItemBedrockOreNew.toFluid(type.byproductSolvent3, i3))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type)), new ArcFurnaceRecipe().fluidNull(ItemBedrockOreNew.toFluid(type.byproductRad1, i3), ItemBedrockOreNew.toFluid(type.byproductRad2, i3), ItemBedrockOreNew.toFluid(type.byproductRad3, i3))); + } + // Autogen for simple single type items for(NTMMaterial material : Mats.orderedList) { int in = material.convIn; @@ -151,7 +172,7 @@ public class ArcFurnaceRecipes extends SerializableRecipe { public static HashMap getFluidRecipes() { HashMap recipes = new HashMap(); for(Entry recipe : ArcFurnaceRecipes.recipes.entrySet()) { - if(recipe.getValue().fluidOutput != null) { + if(recipe.getValue().fluidOutput != null && recipe.getValue().fluidOutput.length > 0) { Object[] out = new Object[recipe.getValue().fluidOutput.length]; for(int i = 0; i < out.length; i++) out[i] = ItemScraps.create(recipe.getValue().fluidOutput[i], true); recipes.put(recipe.getKey().copy(), out); @@ -244,6 +265,13 @@ public class ArcFurnaceRecipes extends SerializableRecipe { return this; } + public ArcFurnaceRecipe fluidNull(MaterialStack... outputs) { + List mat = new ArrayList(); + for(MaterialStack stack : outputs) if(stack != null) mat.add(stack); + if(!mat.isEmpty()) this.fluidOutput = mat.toArray(new MaterialStack[0]); + return this; + } + public ArcFurnaceRecipe solid(ItemStack output) { this.solidOutput = output; return this; diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index 5896e1a7e..a3aaea30c 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -25,7 +25,10 @@ import com.hbm.items.ItemEnums.EnumChunkType; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel; import com.hbm.items.machine.ItemWatzPellet.EnumWatzType; +import com.hbm.items.special.ItemBedrockOreNew; import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType; import com.hbm.items.special.ItemByproduct.EnumByproduct; import com.hbm.main.MainRegistry; import com.hbm.util.ItemStackUtil; @@ -509,6 +512,40 @@ public class CentrifugeRecipes extends SerializableRecipe { ItemStackUtil.carefulCopy(by3) }); } + for(BedrockOreType type : BedrockOreType.values()) { + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), new ItemStack(Blocks.gravel)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), new ItemStack(Blocks.gravel)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type), new ItemStack(Blocks.gravel)}); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type), ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type), ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new ItemStack[] {ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type), ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type), ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)}); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.primary1), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.extract(type.primary2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type, 2)}); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1), ItemBedrockOreNew.extract(type.byproductAcid2), ItemBedrockOreNew.extract(type.byproductAcid3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductAcid1, 2), ItemBedrockOreNew.extract(type.byproductAcid2, 2), ItemBedrockOreNew.extract(type.byproductAcid3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1), ItemBedrockOreNew.extract(type.byproductSolvent2), ItemBedrockOreNew.extract(type.byproductSolvent3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductSolvent1, 2), ItemBedrockOreNew.extract(type.byproductSolvent2, 2), ItemBedrockOreNew.extract(type.byproductSolvent3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1), ItemBedrockOreNew.extract(type.byproductRad2), ItemBedrockOreNew.extract(type.byproductRad3), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type)), new ItemStack[] {ItemBedrockOreNew.extract(type.byproductRad1, 2), ItemBedrockOreNew.extract(type.byproductRad2, 2), ItemBedrockOreNew.extract(type.byproductRad3, 2), ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)}); + } + List quartz = OreDictionary.getOres("crystalCertusQuartz"); if(quartz != null && !quartz.isEmpty()) { diff --git a/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java b/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java index 1fe93cf7e..e512e8529 100644 --- a/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CombinationRecipes.java @@ -24,6 +24,9 @@ import com.hbm.items.ItemEnums.EnumCokeType; import com.hbm.items.ItemEnums.EnumTarType; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemFluidIcon; +import com.hbm.items.special.ItemBedrockOreNew; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType; import com.hbm.util.Tuple.Pair; import net.minecraft.init.Blocks; @@ -63,6 +66,14 @@ public class CombinationRecipes extends SerializableRecipe { recipes.put(new ComparableStack(Items.reeds), new Pair(new ItemStack(Items.sugar, 2), new FluidStack(Fluids.ETHANOL, 50))); recipes.put(new ComparableStack(Blocks.clay), new Pair(new ItemStack(Blocks.brick_block, 1), null)); + + for(BedrockOreType type : BedrockOreType.values()) { + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE, type)), new Pair(ItemBedrockOreNew.make(BedrockOreGrade.BASE_ROASTED, type), new FluidStack(Fluids.VITRIOL, 50))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new Pair(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type), new FluidStack(Fluids.VITRIOL, 50))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new Pair(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type), new FluidStack(Fluids.VITRIOL, 50))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new Pair(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type), new FluidStack(Fluids.VITRIOL, 50))); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new Pair(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type), new FluidStack(Fluids.VITRIOL, 50))); + } } public static Pair getOutput(ItemStack stack) { diff --git a/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java b/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java index c18e36ace..2c5867d72 100644 --- a/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CrystallizerRecipes.java @@ -25,7 +25,10 @@ import com.hbm.items.ItemEnums.EnumTarType; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemChemicalDye.EnumChemDye; import com.hbm.items.machine.ItemFluidIcon; +import com.hbm.items.special.ItemBedrockOreNew; import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType; import com.hbm.items.special.ItemPlasticScrap.ScrapType; import com.hbm.main.MainRegistry; import com.hbm.util.Tuple.Pair; @@ -133,6 +136,59 @@ public class CrystallizerRecipes extends SerializableRecipe { registerRecipe(new ComparableStack(ModItems.ore_nitrocrystalline, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.ore_deepcleaned, 1, i), oreTime), organic); registerRecipe(new ComparableStack(ModItems.ore_nitrocrystalline, 1, i), new CrystallizerRecipe(new ItemStack(ModItems.ore_seared, 1, i), oreTime), hiperf); } + + int bedrock = 200; + int washing = 100; + for(BedrockOreType type : BedrockOreType.values()) { + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.BASE_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.BASE_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.BASE_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type), bedrock), new FluidStack(Fluids.SULFURIC_ACID, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type), bedrock), new FluidStack(Fluids.SULFURIC_ACID, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type), bedrock), new FluidStack(Fluids.SOLVENT, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type), bedrock), new FluidStack(Fluids.SOLVENT, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type), bedrock), new FluidStack(Fluids.SOLVENT, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type), bedrock), new FluidStack(Fluids.RADIOSOLVENT, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SULFURIC_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.SOLVENT_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_BYPRODUCT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.RAD_ARC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.RAD_WASHED, type), washing), new FluidStack(Fluids.WATER, 250)); + + FluidStack primary = new FluidStack(Fluids.HYDROGEN, 250); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type), bedrock), primary); + + FluidStack secondary = new FluidStack(Fluids.CHLORINE, 250); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_ROASTED, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSULFURIC, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NOSOLVENT, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_RAD, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_NORAD, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type), bedrock), secondary); + + registerRecipe(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new CrystallizerRecipe(ItemBedrockOreNew.make(BedrockOreGrade.BASE, type), bedrock).setReq(64), new FluidStack(Fluids.NITRIC_ACID, 1000)); + } FluidStack[] dyes = new FluidStack[] {new FluidStack(Fluids.WOODOIL, 100), new FluidStack(Fluids.FISHOIL, 100)}; for(FluidStack dye : dyes) { diff --git a/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java b/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java index 2e240f391..8932941c2 100644 --- a/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ElectrolyserMetalRecipes.java @@ -21,6 +21,9 @@ import com.hbm.inventory.recipes.loader.SerializableRecipe; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemFluidIcon; import com.hbm.items.machine.ItemScraps; +import com.hbm.items.special.ItemBedrockOreNew; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreGrade; +import com.hbm.items.special.ItemBedrockOreNew.BedrockOreType; import com.hbm.util.ItemStackUtil; import net.minecraft.item.ItemStack; @@ -128,6 +131,33 @@ public class ElectrolyserMetalRecipes extends SerializableRecipe { new MaterialStack(Mats.MAT_IRON, MaterialShapes.INGOT.q(4)), new ItemStack(ModItems.powder_copper, 4), new ItemStack(ModItems.powder_lithium_tiny, 3))); + + for(BedrockOreType type : BedrockOreType.values()) { + + MaterialStack f0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(7)); + MaterialStack f1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(4)); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_FIRST, type)), new ElectrolysisMetalRecipe( + f0 != null ? f0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)), + f1 != null ? f1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)), + f0 == null ? ItemBedrockOreNew.extract(type.primary1, 7) : new ItemStack(ModItems.dust), + f1 == null ? ItemBedrockOreNew.extract(type.primary2, 4) : new ItemStack(ModItems.dust))); + + MaterialStack s0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(4)); + MaterialStack s1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(7)); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.PRIMARY_SECOND, type)), new ElectrolysisMetalRecipe( + s0 != null ? s0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)), + s1 != null ? s1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1)), + s0 == null ? ItemBedrockOreNew.extract(type.primary1, 4) : new ItemStack(ModItems.dust), + s1 == null ? ItemBedrockOreNew.extract(type.primary2, 7) : new ItemStack(ModItems.dust))); + + MaterialStack c0 = ItemBedrockOreNew.toFluid(type.primary1, MaterialShapes.INGOT.q(2)); + MaterialStack c1 = ItemBedrockOreNew.toFluid(type.primary2, MaterialShapes.INGOT.q(2)); + recipes.put(new ComparableStack(ItemBedrockOreNew.make(BedrockOreGrade.CRUMBS, type)), new ElectrolysisMetalRecipe( + c0 != null ? c0 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)), + c1 != null ? c1 : new MaterialStack(Mats.MAT_SLAG, MaterialShapes.INGOT.q(1, 2)), + c0 == null ? ItemBedrockOreNew.extract(type.primary1, 2) : new ItemStack(ModItems.dust), + c1 == null ? ItemBedrockOreNew.extract(type.primary2, 2) : new ItemStack(ModItems.dust))); + } } public static ElectrolysisMetalRecipe getRecipe(ItemStack stack) { diff --git a/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java b/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java index c561cd214..15f3550f9 100644 --- a/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java +++ b/src/main/java/com/hbm/items/special/ItemBedrockOreNew.java @@ -3,6 +3,7 @@ package com.hbm.items.special; import static com.hbm.inventory.OreDictManager.*; import java.util.List; +import java.util.Locale; import com.hbm.items.ModItems; import com.hbm.util.EnumUtil; @@ -10,6 +11,10 @@ import com.hbm.util.EnumUtil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import com.hbm.inventory.material.Mats; +import com.hbm.inventory.material.Mats.MaterialStack; +import com.hbm.inventory.material.NTMMaterial; +import com.hbm.inventory.material.NTMMaterial.SmeltingBehavior; import com.hbm.items.ItemEnums.EnumChunkType; import com.hbm.lib.RefStrings; import com.hbm.render.icon.RGBMutatorInterpolatedComponentRemap; @@ -21,6 +26,8 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; +import net.minecraftforge.oredict.OreDictionary; public class ItemBedrockOreNew extends Item { @@ -66,18 +73,20 @@ public class ItemBedrockOreNew extends Item { @Override public String getItemStackDisplayName(ItemStack stack) { int meta = stack.getItemDamage(); - return this.getGrade(meta).name() + " " + this.getType(meta).suffix; + String type = StatCollector.translateToLocalFormatted(this.getUnlocalizedNameInefficiently(stack) + ".type." + this.getType(meta).suffix + ".name"); + return StatCollector.translateToLocalFormatted(this.getUnlocalizedNameInefficiently(stack) + ".grade." + this.getGrade(meta).name().toLowerCase(Locale.US) + ".name", type); } public static enum BedrockOreType { - // primary sulfuric solvent radsolvent - LIGHT_METAL( 0xFFFFFF, 0x353535, "light", IRON, CU, TI, AL, AL, CHLOROCALCITE, LI, NA, CHLOROCALCITE, LI, NA), - HEAVY_METAL( 0x868686, 0x000000, "heavy", W, PB, GOLD, GOLD, BE, W, PB, GOLD, BI, BI, GOLD), - RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE), B, LA, NB, ND, B, ZR, CO, ND, ZR), - ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", U, TH232, RA226, RA226, PO210, RA226, RA226, PO210, TC99, TC99, U238), - NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", COAL, S, LIGNITE, KNO, F, P_RED, F, S, CHLOROCALCITE, SI, SI), - CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", DIAMOND, SODALITE, CINNABAR, ASBESTOS, REDSTONE, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE); - + // primary sulfuric solvent radsolvent + LIGHT_METAL( 0xFFFFFF, 0x353535, "light", IRON, CU, TI, AL, AL, CHLOROCALCITE, LI, NA, CHLOROCALCITE, LI, NA), + HEAVY_METAL( 0x868686, 0x000000, "heavy", W, PB, GOLD, GOLD, BE, W, PB, GOLD, BI, BI, GOLD), + RARE_EARTH( 0xE6E6B6, 0x1C1C00, "rare", CO, EnumChunkType.RARE, B, LA, NB, ND, B, ZR, CO, ND, ZR), + ACTINIDE( 0xC1C7BD, 0x2B3227, "actinide", U, TH232, RA226, RA226, PO210, RA226, RA226, PO210, TC99, TC99, U238), + NON_METAL( 0xAFAFAF, 0x0F0F0F, "nonmetal", COAL, S, LIGNITE, KNO, F, P_RED, F, S, CHLOROCALCITE, SI, SI), + CRYSTALLINE( 0xE2FFFA, 0x1E8A77, "crystal", DIAMOND, SODALITE, CINNABAR, ASBESTOS, REDSTONE, CINNABAR, ASBESTOS, EMERALD, BORAX, MOLYSITE, SODALITE); + //sediment + public int light; public int dark; public String suffix; @@ -96,6 +105,39 @@ public class ItemBedrockOreNew extends Item { this.byproductRad1 = bR1; this.byproductRad2 = bR2; this.byproductRad3 = bR3; } } + + public static MaterialStack toFluid(Object o, int amount) { + if(o instanceof DictFrame) { + NTMMaterial mat = Mats.matByName.get(((DictFrame) o).mats[0]); + if(mat != null && mat.smeltable == SmeltingBehavior.SMELTABLE) { + return new MaterialStack(mat, amount); + } + } + return null; + } + + public static ItemStack extract(Object o) { + return extract(o, 1); + } + + public static ItemStack extract(Object o, int amount) { + if(o instanceof EnumChunkType) return new ItemStack(ModItems.chunk_ore, amount, ((EnumChunkType) o).ordinal()); + if(o instanceof DictFrame) { + DictFrame frame = (DictFrame) o; + List gems = OreDictionary.getOres(frame.gem(), false); if(!gems.isEmpty()) return fromList(gems, amount); + List dusts = OreDictionary.getOres(frame.dust(), false); if(!dusts.isEmpty()) return fromList(dusts, amount); + List crystals = OreDictionary.getOres(frame.crystal(), false); if(!crystals.isEmpty()) return fromList(crystals, amount); + List billets = OreDictionary.getOres(frame.billet(), false); if(!billets.isEmpty()) return fromList(billets, amount); + List ingots = OreDictionary.getOres(frame.ingot(), false); if(!ingots.isEmpty()) return fromList(ingots, amount); + } + return new ItemStack(ModItems.nothing); + } + + private static ItemStack fromList(List list, int amount) { + ItemStack first = list.get(0).copy(); + first.stackSize = amount; + return first; + } @Override @SideOnly(Side.CLIENT) @@ -150,7 +192,11 @@ public class ItemBedrockOreNew extends Item { } public static ItemStack make(BedrockOreGrade grade, BedrockOreType type) { - return new ItemStack(ModItems.bedrock_ore, 1, grade.ordinal() << 4 | type.ordinal()); + return make(grade, type, 1); + } + + public static ItemStack make(BedrockOreGrade grade, BedrockOreType type, int amount) { + return new ItemStack(ModItems.bedrock_ore, amount, grade.ordinal() << 4 | type.ordinal()); } public BedrockOreGrade getGrade(int meta) { diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineOreSlopper.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineOreSlopper.java index f8554ab4c..1fdbe4de6 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineOreSlopper.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineOreSlopper.java @@ -1,11 +1,21 @@ package com.hbm.tileentity.machine; +import com.hbm.inventory.container.ContainerOreSlopper; +import com.hbm.inventory.gui.GUIOreSlopper; +import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; -public class TileEntityMachineOreSlopper extends TileEntityMachineBase { +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.world.World; + +public class TileEntityMachineOreSlopper extends TileEntityMachineBase implements IGUIProvider { public TileEntityMachineOreSlopper() { - super(0); + super(11); } @Override @@ -18,4 +28,14 @@ public class TileEntityMachineOreSlopper extends TileEntityMachineBase { } + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerOreSlopper(player.inventory, this); + } + + @Override + @SideOnly(Side.CLIENT) + public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIOreSlopper(player.inventory, this); + } } diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index e87ccd894..9c93972a5 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -782,6 +782,7 @@ hbmfluid.tritium=Tritium hbmfluid.uf6=Uranhexafluorid hbmfluid.ultrahotsteam=Ultraverdichteter Dampf hbmfluid.unsaturateds=Ungesättigte Kohlenwasserstoffe +hbmfluid.vitriol=Vitriol hbmfluid.wastefluid=Flüssiger Atommüll hbmfluid.wastegas=Gasförmiger Atommüll hbmfluid.water=Wasser @@ -1259,6 +1260,38 @@ item.battery_su.name=Einwegbatterie item.battery_su_l.name=Große Einwegbatterie item.battery_trixite.name=Billige Spark-Batterie-Nachmache item.bdcl.name=BDCL +item.bedrock_ore.grade.base.name=%s-Bedrockerz +item.bedrock_ore.grade.base_roasted.name=Geröstetes %s-Bedrockerz +item.bedrock_ore.grade.base_washed.name=Gewaschenes %s-Bedrockerz +item.bedrock_ore.grade.primary.name=%s-Bedrockerz, Primärfraktion +item.bedrock_ore.grade.primary_roasted.name=%s-Bedrockerz, geröstete Primärfraktion +item.bedrock_ore.grade.primary_sulfuric.name=%s-Bedrockerz, schwefelige Primärfraktion +item.bedrock_ore.grade.primary_nosulfuric.name=%s-Bedrockerz, geteilte schwefelige Primärfraktion +item.bedrock_ore.grade.primary_solvent.name=%s-Bedrockerz, gelöste Primärfraktion +item.bedrock_ore.grade.primary_nosolvent.name=%s-Bedrockerz, geteilte gelöste Primärfraktion +item.bedrock_ore.grade.primary_rad.name=%s-Bedrockerz, gereinigte Primärfraktion +item.bedrock_ore.grade.primary_norad.name=%s-Bedrockerz, geteilte gereinigte Primärfraktion +item.bedrock_ore.grade.primary_first.name=%s-Bedrockerz, Primärfraktion, hohe Gewichtung +item.bedrock_ore.grade.primary_second.name=%s-Bedrockerz, Primärfraktion, niedrige Gewichtung +item.bedrock_ore.grade.crumbs.name=%s-Bedrockerzkrumen +item.bedrock_ore.grade.sulfuric_byproduct.name=%s-Bedrockerz, schwefeliges Nebenprodukt +item.bedrock_ore.grade.sulfuric_roasted.name=%s-Bedrockerz, geröstetes schwefeliges Nebenprodukt +item.bedrock_ore.grade.sulfuric_arc.name=%s-Bedrockerz, gebranntes schwefeliges Nebenprodukt +item.bedrock_ore.grade.sulfuric_washed.name=%s-Bedrockerz, gewaschenes schwefeliges Nebenprodukt +item.bedrock_ore.grade.solvent_byproduct.name=%s-Bedrockerz, gelöstes Nebenprodukt +item.bedrock_ore.grade.solvent_roasted.name=%s-Bedrockerz, geröstetes gelöstes Nebenprodukt +item.bedrock_ore.grade.solvent_arc.name=%s-Bedrockerz, gebranntes gelöstes Nebenprodukt +item.bedrock_ore.grade.solvent_washed.name=%s-Bedrockerz, gewaschenes gelöstes Nebenprodukt +item.bedrock_ore.grade.rad_byproduct.name=%s-Bedrockerz, gereinigtes Nebenprodukt +item.bedrock_ore.grade.rad_roasted.name=%s-Bedrockerz, geröstetes gereinigtes Nebenprodukt +item.bedrock_ore.grade.rad_arc.name=%s-Bedrockerz, gebranntes gereinigtes Nebenprodukt +item.bedrock_ore.grade.rad_washed.name=%s-Bedrockerz, gewaschenes gereinigtes Nebenprodukt +item.bedrock_ore.type.actinide.name=Actinoide +item.bedrock_ore.type.crystal.name=Kristall +item.bedrock_ore.type.heavy.name=Schwermetall +item.bedrock_ore.type.light.name=Leichtmetall +item.bedrock_ore.type.nonmetal.name=Nichtmetall +item.bedrock_ore.type.rare.name=Seltenerden item.beta.name=Beta-Features item.big_sword.name=Großes Schwert item.billet_am_mix.name=Reaktorfähiges Americiumbillet diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index 4d6007cde..26cdf1b9b 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -1474,6 +1474,7 @@ hbmfluid.tritium=Tritium hbmfluid.uf6=Uranium Hexafluoride hbmfluid.ultrahotsteam=Ultra Dense Steam hbmfluid.unsaturateds=Unsaturated Hydrocarbons +hbmfluid.vitriol=Vitriol hbmfluid.wastefluid=Liquid Nuclear Waste hbmfluid.wastegas=Gaseous Nuclear Waste hbmfluid.water=Water @@ -1483,8 +1484,6 @@ hbmfluid.xenon=Xenon Gas hbmfluid.xpjuice=Experience Juice hbmfluid.xylene=BTX - - hbmpseudofluid.none=Empty hbmpseudofluid.heuf6=Highly Enriched UF6 hbmpseudofluid.meuf6=Medium Enriched UF6 @@ -1966,6 +1965,38 @@ item.battery_su.name=SU-Battery item.battery_su_l.name=Large SU-Battery item.battery_trixite.name=Off-Brand Spark Battery item.bdcl.name=BDCL +item.bedrock_ore.grade.base.name=%s Bedrock Ore +item.bedrock_ore.grade.base_roasted.name=Roasted %s Bedrock Ore +item.bedrock_ore.grade.base_washed.name=Washed %s Bedrock Ore +item.bedrock_ore.grade.primary.name=%s Bedrock Ore, Primary Fraction +item.bedrock_ore.grade.primary_roasted.name=%s Bedrock Ore, Roasted Primary Fraction +item.bedrock_ore.grade.primary_sulfuric.name=%s Bedrock Ore, Sulfuric Primary Fraction +item.bedrock_ore.grade.primary_nosulfuric.name=%s Bedrock Ore, Separated Sulfuric Primary Fraction +item.bedrock_ore.grade.primary_solvent.name=%s Bedrock Ore, Dissolved Primary Fraction +item.bedrock_ore.grade.primary_nosolvent.name=%s Bedrock Ore, Separated Dissolved Primary Fraction +item.bedrock_ore.grade.primary_rad.name=%s Bedrock Ore, Cleaned Primary Fraction +item.bedrock_ore.grade.primary_norad.name=%s Bedrock Ore, Separated Cleaned Primary Fraction +item.bedrock_ore.grade.primary_first.name=%s Bedrock Ore, Primary Fraction, Higher Weight +item.bedrock_ore.grade.primary_second.name=%s Bedrock Ore, Primary Fraction, Lower Weight +item.bedrock_ore.grade.crumbs.name=%s Bedrock Ore Crumbs +item.bedrock_ore.grade.sulfuric_byproduct.name=%s Bedrock Ore, Sulfuric Byproduct +item.bedrock_ore.grade.sulfuric_roasted.name=%s Bedrock Ore, Roasted Sulfuric Byproduct +item.bedrock_ore.grade.sulfuric_arc.name=%s Bedrock Ore, Seared Sulfuric Byproduct +item.bedrock_ore.grade.sulfuric_washed.name=%s Bedrock Ore, Washed Sulfuric Byproduct +item.bedrock_ore.grade.solvent_byproduct.name=%s Bedrock Ore, Dissolved Byproduct +item.bedrock_ore.grade.solvent_roasted.name=%s Bedrock Ore, Roasted Dissolved Byproduct +item.bedrock_ore.grade.solvent_arc.name=%s Bedrock Ore, Seared Dissolved Byproduct +item.bedrock_ore.grade.solvent_washed.name=%s Bedrock Ore, Washed Dissolved Byproduct +item.bedrock_ore.grade.rad_byproduct.name=%s Bedrock Ore, Cleaned Byproduct +item.bedrock_ore.grade.rad_roasted.name=%s Bedrock Ore, Roasted Cleaned Byproduct +item.bedrock_ore.grade.rad_arc.name=%s Bedrock Ore, Seared Cleaned Byproduct +item.bedrock_ore.grade.rad_washed.name=%s Bedrock Ore, Washed Cleaned Byproduct +item.bedrock_ore.type.actinide.name=Actinide +item.bedrock_ore.type.crystal.name=Crystalline +item.bedrock_ore.type.heavy.name=Heavy Metal +item.bedrock_ore.type.light.name=Light Metal +item.bedrock_ore.type.nonmetal.name=Non-Metal +item.bedrock_ore.type.rare.name=Rare Earth item.beta.name=Beta Features item.big_sword.name=Great Sword item.billet_actinium.name=Actinium-227 Billet diff --git a/src/main/resources/assets/hbm/textures/gui/fluids/vitriol.png b/src/main/resources/assets/hbm/textures/gui/fluids/vitriol.png new file mode 100644 index 0000000000000000000000000000000000000000..c716b615472db55c1944d102c0f8da36c850643e GIT binary patch literal 491 zcmV%;Wf`W}%YB}%O42~5$82pZQ0 zR~d@>2h^Y6zy7Z43V?_ZVIbQe8!lv&ht!4sT@{H;k`d_qm&}Xh|My)hHcvr z5k#cGu+BO5eMdwNjkawoqXJ~5hG8f~|NQ)5`@ZLTz4Cs)nWm}W?)#n)LV=RkaU3zm z&~@Ec*1qpqmIV>PTFd!-=5#tSP16BV=0|Hy2!U_8coxDRj4=CO4NB>%M*nVz8ut}XJIe&Wx|#q0002ovPDHLkV1lK}Lx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/hbm/textures/models/tank/tank_VITRIOL.png b/src/main/resources/assets/hbm/textures/models/tank/tank_VITRIOL.png new file mode 100644 index 0000000000000000000000000000000000000000..12dd41f208b8d33c2c1c219a7348394bbb717d9d GIT binary patch literal 1242 zcmV<01SR{4P)g?9J@+{UpTYZduNIn4S6UpSd~l@bcC3 zzak=o#ao}%%{#wY5D}5n#Z-h;Yq7oL$WBe5fs{psiQ&>M%|AU zI_mb>W++;8Le{qSD$6fkzi(~Z#4AO_D>xCa5RF0`L7|NxUMV16p%L*aQ^YGcHN`7e zLp;A(kip`uS69KVy9YKmcBZaFp?kn*7f+#k;PB_Ssq4%a`}Na?m5Koy9_Q2dKU3q? zz%yROqD3bpG+z1i(Znl7UBxS(^@vvq2|at|)kg=tqLSD{bGggqurPge50Imc@am(9 zS9-dNS3Z3-Ejl5by~*^|AaXvaTq4CP=SU2%XPf8aD(xMYmk5^Y``(8ii)kg=vsyoE1*`tp(f*g%8 z&R!|%Dqi^<>!w8~Bs5-m9qT4u>FFw7b#l!Z+QZZqXv8&RMv$Y8@adzO+CqWG)D}Kb ztqFs%gfvae?)rmx%#HBGD@9x!2q(>p0~w6<04Ft!AV(X)y;n2Fy;pEzYKu%UwFR6s zr?z0%-2;rejo^TZ5zHJoV_X~vCoT@mR7w{I(xMZhdG8g4?g2*KMzHHPqLZmDFd0)@ zz=^3XGR4J#a7udSK+I0D7rr{%m(%0s@c@0a5fs`8;*}z;cvZh$#|JGsA-?e{WU@Kp zl_ITp6*3zFqwa(-wFRQlqBG}vgFG$T2;!9@jd&FjtwdSB$z7!r3cCqtHfBXd{SM zHM<9wA|kTAz7)MJ;#H!GBG;F@LcHpLtFXHVmr*S{rFcb)mTHl=*Ow~A?XqQuPHo}C ze4*<_b}i3hH{Q1B119&op!}R1U5uAkR+mMj`hQtjT^_HqdvJNTPE{_S9AvgdKP+9xOf_s0|h$w|(MOLMDx_CymB65wDchi#>}XYcn0M%F0oy{8&A5 z)#cK4wbr7GH_7#H@m2o5{&Ulw>w;@A))(sWs%RCr%R;6s z>3CIewbC}$%~?wEDw&G|%Y&h52Q&Ig^WwlczZU)fug|qkUq;=bn%