From 34092c375dfd912383a2acd8461dac86ad43c143 Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 27 May 2024 16:06:06 +0200 Subject: [PATCH] bash it with a rock a couple of times --- changelog | 45 +++---------------- .../java/com/hbm/crafting/PowderRecipes.java | 8 +++- .../ContainerMachineArcFurnaceLarge.java | 9 ++-- .../inventory/recipes/ShredderRecipes.java | 8 +--- src/main/java/com/hbm/items/ModItems.java | 7 ++- .../TileEntityMachineArcFurnaceLarge.java | 29 +++++++++++- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/changelog b/changelog index 51b49850a..d413388bb 100644 --- a/changelog +++ b/changelog @@ -1,42 +1,9 @@ -## Added -* Arc furnace - * A large version of the arc furnace that can do several types of recipe - * Solid mode smelts items like a furnace, however to work the recipe needs an ingredient or result that is oredicted as either an ore, block, ingot or plate - * Liquid mode smelts items like a crucible would, effectively liquiefying metals. Non-castable materials are voided - * Both modes have arc furnace exclusive recipes (smelting sand/quartz/fiberglass into silicon) - * Can be upgraded only with regular speed upgrades -* Soldering station - * Works similar to arc welders - * Used to assemble circuits from parts -* New circuits - * The old circuits will be phased out, the items remain but can be recycled - * Circuits use an entirely new approach for crafting, instead of upgrading tiers constantly, all circuits are made from common parts - * Circuits can be automated entirely with only autocrafters, presses and the soldering station, no assembler or chemplant required - * Legacy circuits can be recycled in any anvil, yielding the roughly equivalent new circuit - ## Changed -* Updated russian and italian localization -* Nerfed conventional explosives (dynamite, TNT, semtex, C4) in order to not outclass small nukes -* Plastic explosive blocks no longer drop and blocks -* Sellafite diamond ore now shreds into diamond gravel -* ICF vessel blocks now use half as much fullerite as before -* ICF capacitor and turbocharger blocks are now quite a bit cheaper -* MEP is no longer self-igniting -* The foundry storage basin now holds 4 blocks worth of material instead of 1 -* The small arc furnace is being retired and is no longer craftable. However, it will still function, and it can use any type of electrode without depleting it -* Wires now use the autogen system and are oredicted with the "wireFine" prefix (equivalent to GT fine wires, 1/8 of an ingot) -* Removed the assembler recipes for wires -* Increased the maximum durability for all stamps -* All upgrades now use the soldering station for their recipes, except for overdrive -* Overdrive upgrade recipes have been rebalanced +* The powder combination recipe for steel powder now yields steel scraps instead, meaning that it has to be smelted either via crucible or arc furnace + * In addition, there is now an alternate recipe combining four times the material, yielding larger steel scraps, allowing for higher throughput +* The new autogen wire items now use texture overrides, restoring the original textures +* Arc furnaces now start burning on the inside as the electrodes are inserted, making the process look a lot more violent ## Fixed -* Fixed missing localization for meteorite ores and the new crucible materials -* Removed the starmetal crystallization recipe, despite starmetal ore no longer existing -* Fixed the ICF structure block detection being incorrect, omitting some parts -* Fixed armor mods adding health showing only half as much as they actually do -* Fixed RBMK fuel xenon burn function being described wrong -* When converting ComparableStacks to ItemStacks, there is now a check that replaces null items with the nothing placeholder, fixing crashes caused by incorrect recipe configuration -* Fixed item icon lighting in the anvil's search field -* Fixed custom machine NEI handlers (again) -* Fixed FEL making sounds when turned on but not actually active +* Removed sand to silicon AE2 compat recipe which caused sand to be shreddable into the new silicon wafers, skipping the arc furnace entirely +* Fixed shift clicking into the arc furnace placing the entire stack into a single slot, ignoring stacksize limitations diff --git a/src/main/java/com/hbm/crafting/PowderRecipes.java b/src/main/java/com/hbm/crafting/PowderRecipes.java index 20eb1a2f1..42776ec55 100644 --- a/src/main/java/com/hbm/crafting/PowderRecipes.java +++ b/src/main/java/com/hbm/crafting/PowderRecipes.java @@ -4,8 +4,12 @@ import static com.hbm.inventory.OreDictManager.*; import com.hbm.config.GeneralConfig; import com.hbm.inventory.fluid.Fluids; +import com.hbm.inventory.material.MaterialShapes; +import com.hbm.inventory.material.Mats; +import com.hbm.inventory.material.Mats.MaterialStack; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemChemicalDye.EnumChemDye; +import com.hbm.items.machine.ItemScraps; import com.hbm.main.CraftingManager; import net.minecraft.init.Blocks; @@ -55,7 +59,9 @@ public class PowderRecipes { //Metal powders CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_magnetized_tungsten, 1), new Object[] { W.dust(), SA326.nugget() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_tcalloy, 1), new Object[] { STEEL.dust(), TC99.nugget() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_steel, 1), new Object[] { IRON.dust(), COAL.dust() }); + + CraftingManager.addShapelessAuto(ItemScraps.create(new MaterialStack(Mats.MAT_STEEL, MaterialShapes.INGOT.q(1))), new Object[] { IRON.dust(), COAL.dust() }); + CraftingManager.addShapelessAuto(ItemScraps.create(new MaterialStack(Mats.MAT_STEEL, MaterialShapes.INGOT.q(4))), new Object[] { IRON.dust(), IRON.dust(), IRON.dust(), IRON.dust(), COAL.dust(), COAL.dust(), COAL.dust(), COAL.dust() }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 1), new Object[] { new ItemStack(Items.coal, 1, 1), KEY_SAND }); CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_flux, 2), new Object[] { COAL.dust(), KEY_SAND }); diff --git a/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java b/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java index d445788e7..a3be25b0c 100644 --- a/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java +++ b/src/main/java/com/hbm/inventory/container/ContainerMachineArcFurnaceLarge.java @@ -4,6 +4,7 @@ import com.hbm.inventory.SlotNonRetarded; import com.hbm.items.ModItems; import com.hbm.items.machine.ItemMachineUpgrade; import com.hbm.tileentity.machine.TileEntityMachineArcFurnaceLarge; +import com.hbm.util.InventoryUtil; import api.hbm.energymk2.IBatteryItem; import net.minecraft.entity.player.EntityPlayer; @@ -56,13 +57,13 @@ public class ContainerMachineArcFurnaceLarge extends Container { } else { if(rStack.getItem() instanceof IBatteryItem || rStack.getItem() == ModItems.battery_creative) { - if(!this.mergeItemStack(stack, 3, 4, false)) return null; + if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 3, 4, false)) return null; } else if(rStack.getItem() == ModItems.arc_electrode) { - if(!this.mergeItemStack(stack, 4, 5, false)) return null; + if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 4, 5, false)) return null; } else if(rStack.getItem() instanceof ItemMachineUpgrade) { - if(!this.mergeItemStack(stack, 0, 3, false)) return null; + if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 0, 3, false)) return null; } else { - if(!this.mergeItemStack(stack, 5, 25, false)) return null; + if(!InventoryUtil.mergeItemStack(this.inventorySlots, stack, 5, 25, false)) return null; } } diff --git a/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java b/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java index f9a436189..d7f41593e 100644 --- a/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/ShredderRecipes.java @@ -207,6 +207,7 @@ public class ShredderRecipes extends SerializableRecipe { ShredderRecipes.setRecipe(ModItems.can_empty, new ItemStack(ModItems.powder_aluminium, 2)); ShredderRecipes.setRecipe(ModBlocks.machine_well, new ItemStack(ModItems.powder_steel, 32)); ShredderRecipes.setRecipe(DictFrame.fromOne(ModItems.chunk_ore, EnumChunkType.RARE), new ItemStack(ModItems.powder_desh_mix)); + ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2)); List logs = OreDictionary.getOres("logWood"); List planks = OreDictionary.getOres("plankWood"); @@ -215,13 +216,6 @@ public class ShredderRecipes extends SerializableRecipe { for(ItemStack log : logs) ShredderRecipes.setRecipe(log, new ItemStack(ModItems.powder_sawdust, 4)); for(ItemStack plank : planks) ShredderRecipes.setRecipe(plank, new ItemStack(ModItems.powder_sawdust, 1)); for(ItemStack sapling : saplings) ShredderRecipes.setRecipe(sapling, new ItemStack(Items.stick, 1)); - - List silicon = OreDictionary.getOres("itemSilicon"); - if(!silicon.isEmpty()) { - ShredderRecipes.setRecipe(Blocks.sand, silicon.get(0).copy()); - } else { - ShredderRecipes.setRecipe(Blocks.sand, new ItemStack(ModItems.dust, 2)); - } for(EnumBedrockOre ore : EnumBedrockOre.values()) { int i = ore.ordinal(); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 0d379ae56..fa8b6b902 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -3282,7 +3282,12 @@ public class ModItems { plate_cast = new ItemAutogen(MaterialShapes.CASTPLATE).aot(Mats.MAT_BISMUTH, "plate_cast_bismuth").setUnlocalizedName("plate_cast").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_cast"); plate_welded = new ItemAutogen(MaterialShapes.WELDEDPLATE).setUnlocalizedName("plate_welded").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":plate_welded"); heavy_component = new ItemAutogen(MaterialShapes.HEAVY_COMPONENT).setUnlocalizedName("heavy_component").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":heavy_component"); - wire_fine = new ItemAutogen(MaterialShapes.WIRE).setUnlocalizedName("wire_fine").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_fine"); + wire_fine = new ItemAutogen(MaterialShapes.WIRE) + .aot(Mats.MAT_ALUMINIUM, "wire_aluminium").aot(Mats.MAT_COPPER, "wire_copper") + .aot(Mats.MAT_MINGRADE, "wire_red_copper").aot(Mats.MAT_GOLD, "wire_gold") + .aot(Mats.MAT_TUNGSTEN, "wire_tungsten").aot(Mats.MAT_ALLOY, "wire_advanced_alloy") + .aot(Mats.MAT_CARBON, "wire_carbon").aot(Mats.MAT_SCHRABIDIUM, "wire_schrabidium") + .aot(Mats.MAT_MAGTUNG, "wire_magnetized_tungsten").setUnlocalizedName("wire_fine").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_fine"); wire_dense = new ItemAutogen(MaterialShapes.DENSEWIRE).setUnlocalizedName("wire_dense").setCreativeTab(MainRegistry.partsTab).setTextureName(RefStrings.MODID + ":wire_dense"); part_lithium = new Item().setUnlocalizedName("part_lithium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":part_lithium"); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java index dcf646ac9..fd280bc61 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineArcFurnaceLarge.java @@ -211,7 +211,7 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl } } - if(this.lid != this.prevLid && this.lid > this.prevLid && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 4, zCoord + 0.5) < 50) { + if(this.lid != this.prevLid && this.lid > this.prevLid && !(this.prevLid == 0 && this.lid == 1) && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 4, zCoord + 0.5) < 50) { NBTTagCompound data = new NBTTagCompound(); data.setString("type", "tower"); data.setFloat("lift", 0.01F); @@ -227,6 +227,33 @@ public class TileEntityMachineArcFurnaceLarge extends TileEntityMachineBase impl data.setFloat("strafe", 0.05F); for(int i = 0; i < 3; i++) MainRegistry.proxy.effectNT(data); } + + if(this.lid != this.prevLid && this.lid < this.prevLid && this.lid > 0.5F && this.hasMaterial && MainRegistry.proxy.me().getDistance(xCoord + 0.5, yCoord + 4, zCoord + 0.5) < 50) { + /*NBTTagCompound data = new NBTTagCompound(); + data.setString("type", "tower"); + data.setFloat("lift", 0.01F); + data.setFloat("base", 0.5F); + data.setFloat("max", 2F); + data.setInteger("life", 50 + worldObj.rand.nextInt(20)); + data.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextGaussian() * 0.25); + data.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextGaussian() * 0.25); + data.setDouble("posY", yCoord + 4); + data.setBoolean("noWind", true); + data.setFloat("alphaMod", prevLid / lid); + data.setInteger("color", 0x808080); + data.setFloat("strafe", 0.15F); + MainRegistry.proxy.effectNT(data);*/ + + if(worldObj.rand.nextInt(5) == 0) { + NBTTagCompound flame = new NBTTagCompound(); + flame.setString("type", "rbmkflame"); + flame.setDouble("posX", xCoord + 0.5 + worldObj.rand.nextGaussian() * 0.5); + flame.setDouble("posZ", zCoord + 0.5 + worldObj.rand.nextGaussian() * 0.5); + flame.setDouble("posY", yCoord + 2.75); + flame.setInteger("maxAge", 50); + for(int i = 0; i < 2; i++) MainRegistry.proxy.effectNT(flame); + } + } } }