From 4ba77e96de30355f53ea05a44d2110d051cd938c Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 13 Jul 2026 14:58:01 +0200 Subject: [PATCH] fried dough balls. of octopus. --- changelog | 1 + .../com/hbm/blocks/generic/BlockWand.java | 21 ++--------- .../hbm/blocks/generic/BlockWandTandem.java | 2 + .../java/com/hbm/crafting/ToolRecipes.java | 1 - .../hbm/inventory/recipes/MachineRecipes.java | 3 -- src/main/java/com/hbm/items/ModItems.java | 37 +------------------ .../com/hbm/items/machine/ItemBattery.java | 21 +---------- .../com/hbm/items/tool/ItemAnchorRemote.java | 18 ++------- .../java/com/hbm/main/CraftingManager.java | 5 +-- src/main/java/com/hbm/main/MainRegistry.java | 4 ++ .../com/hbm/world/gen/nbt/NBTStructure.java | 30 ++++++++++++--- 11 files changed, 45 insertions(+), 98 deletions(-) diff --git a/changelog b/changelog index ff72aae47..67749c28e 100644 --- a/changelog +++ b/changelog @@ -4,6 +4,7 @@ * Each trinitite ore block now has four randomized texture variants * Trinitite ores now spawn fewer particles * The radiation effect caused by walking on trinitite ore is now much shorter but more intense to compensate +* Finally removed the old terra drill items after being deprecated for almost a year ## Fixed * Fixed burner press GUI offsets being incorrect diff --git a/src/main/java/com/hbm/blocks/generic/BlockWand.java b/src/main/java/com/hbm/blocks/generic/BlockWand.java index c25c390eb..8fbc8ae18 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockWand.java +++ b/src/main/java/com/hbm/blocks/generic/BlockWand.java @@ -19,33 +19,20 @@ public class BlockWand extends Block { setBlockBounds(1F/16F, 1F/16F, 1F/16F, 15F/16F, 15F/16F, 15F/16F); } - @Override - public boolean isOpaqueCube() { - return false; - } + public static int renderID = RenderingRegistry.getNextAvailableRenderId(); - @Override - public boolean renderAsNormalBlock() { - return false; - } + @Override public int getRenderType() { return renderID; } + @Override public boolean isOpaqueCube() { return false; } + @Override public boolean renderAsNormalBlock() { return false; } @Override public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { return null; } - public static int renderID = RenderingRegistry.getNextAvailableRenderId(); - - @Override - public int getRenderType() { - return renderID; - } - @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { Block block = world.getBlock(x, y, z); - return block != this; } - } \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java b/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java index 2a9342454..b512adefc 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java +++ b/src/main/java/com/hbm/blocks/generic/BlockWandTandem.java @@ -9,6 +9,7 @@ import com.hbm.blocks.IBlockSideRotation; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ModBlocks; import com.hbm.interfaces.IControlReceiver; +import com.hbm.interfaces.NotableComments; import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; @@ -73,6 +74,7 @@ import net.minecraftforge.common.util.ForgeDirection; * * @author hbm, Mellow */ +@NotableComments public class BlockWandTandem extends BlockContainer implements IBlockSideRotation, INBTBlockTransformable, IGUIProvider, ILookOverlay { private IIcon iconTop; diff --git a/src/main/java/com/hbm/crafting/ToolRecipes.java b/src/main/java/com/hbm/crafting/ToolRecipes.java index abe8c9dec..d54702964 100644 --- a/src/main/java/com/hbm/crafting/ToolRecipes.java +++ b/src/main/java/com/hbm/crafting/ToolRecipes.java @@ -62,7 +62,6 @@ public class ToolRecipes { CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_pickaxe, 1), new Object[] { "RDM", " PB", " P ", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_axe, 1), new Object[] { " DP", "RRM", " PB", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.elec_shovel, 1), new Object[] { " P", "RRM", " B", 'P', ANY_PLASTIC.ingot(), 'D', DURA.ingot(), 'R', DURA.bolt(), 'M', ModItems.motor, 'B', EnumBatteryPack.BATTERY_LEAD.stack() }); - CraftingManager.addShapelessAuto(new ItemStack(ModItems.centri_stick, 1), new Object[] { ModItems.centrifuge_element, ModItems.energy_core, KEY_STICK }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.smashing_hammer, 1), new Object[] { "STS", "SPS", " P ", 'S', STEEL.block(), 'T', W.block(), 'P', ANY_PLASTIC.ingot() }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.meteorite_sword, 1), new Object[] { " B", "GB ", "SG ", 'B', ModItems.blade_meteorite, 'G', GOLD.plate(), 'S', KEY_STICK }); CraftingManager.addRecipeAuto(new ItemStack(ModItems.dwarven_pickaxe, 1), new Object[] { "CIC", " S ", " S ", 'C', CU.ingot(), 'I', IRON.ingot(), 'S', KEY_STICK }); diff --git a/src/main/java/com/hbm/inventory/recipes/MachineRecipes.java b/src/main/java/com/hbm/inventory/recipes/MachineRecipes.java index e578f6fee..939647898 100644 --- a/src/main/java/com/hbm/inventory/recipes/MachineRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/MachineRecipes.java @@ -47,9 +47,6 @@ public class MachineRecipes { public ArrayList getBatteries() { ArrayList fuels = new ArrayList(); - fuels.add(new ItemStack(ModItems.battery_potato)); - fuels.add(new ItemStack(ModItems.battery_potatos)); - fuels.add(new ItemStack(ModItems.energy_core)); for(EnumBatteryPack num : EnumBatteryPack.values()) fuels.add(new ItemStack(ModItems.battery_pack, 1, num.ordinal())); for(EnumBatterySC num : EnumBatterySC.values()) fuels.add(new ItemStack(ModItems.battery_sc, 1, num.ordinal())); fuels.add(new ItemStack(ModItems.battery_creative)); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index f39c41fda..f44a125be 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -1547,7 +1547,6 @@ public class ModItems { public static Item battery_potatos; public static Item hev_battery; public static Item fusion_core; - @Deprecated public static Item energy_core; public static Item fuse; //by using these in crafting table recipes, i'm running the risk of making my recipes too greg-ian (which i don't like) //in the event that i forget about the meaning of the word "sparingly", please throw a brick at my head @@ -1793,9 +1792,6 @@ public class ModItems { public static Item starmetal_hoe; public static Item smashing_hammer; public static Item centri_stick; - public static Item drax; - public static Item drax_mk2; - public static Item drax_mk3; public static Item bismuth_pickaxe; public static Item bismuth_axe; public static Item volcanic_pickaxe; @@ -3704,7 +3700,6 @@ public class ModItems { battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos"); hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery"); fusion_core = new ItemFusionCore(2500000).setUnlocalizedName("fusion_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fusion_core"); - energy_core = new ItemBattery(10000000, 0, 1000).setUnlocalizedName("energy_core").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":energy_core"); fuse = new ItemCustomLore().setUnlocalizedName("fuse").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse"); screwdriver = new ItemTooling(ToolType.SCREWDRIVER, 100).setUnlocalizedName("screwdriver"); screwdriver_desh = new ItemTooling(ToolType.SCREWDRIVER, 0).setUnlocalizedName("screwdriver_desh"); @@ -4133,31 +4128,6 @@ public class ModItems { .addAbility(IToolHarvestAbility.CENTRIFUGE, 0).setMaxDamage(50).setUnlocalizedName("centri_stick").setTextureName(RefStrings.MODID + ":centri_stick"); smashing_hammer = new ItemToolAbility(12F, -0.1, MainRegistry.tMatSteel, EnumToolType.MINER) .addAbility(IToolHarvestAbility.SHREDDER, 0).setMaxDamage(2500).setUnlocalizedName("smashing_hammer").setTextureName(RefStrings.MODID + ":smashing_hammer"); - drax = new ItemToolAbilityPower(10F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 500000000, 100000, 5000) - .addAbility(IToolHarvestAbility.SMELTER, 0) - .addAbility(IToolHarvestAbility.SHREDDER, 0) - .addAbility(IToolHarvestAbility.LUCK, 1) - .addAbility(IToolAreaAbility.HAMMER, 1) - .addAbility(IToolAreaAbility.HAMMER_FLAT, 1) - .addAbility(IToolAreaAbility.RECURSION, 2).setUnlocalizedName("drax").setCreativeTab(null).setTextureName(RefStrings.MODID + ":drax"); - drax_mk2 = new ItemToolAbilityPower(15F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 1000000000, 250000, 7500) - .addAbility(IToolHarvestAbility.SMELTER, 0) - .addAbility(IToolHarvestAbility.SHREDDER, 0) - .addAbility(IToolHarvestAbility.CENTRIFUGE, 0) - .addAbility(IToolHarvestAbility.LUCK, 2) - .addAbility(IToolAreaAbility.HAMMER, 2) - .addAbility(IToolAreaAbility.HAMMER_FLAT, 2) - .addAbility(IToolAreaAbility.RECURSION, 4).setUnlocalizedName("drax_mk2").setCreativeTab(null).setTextureName(RefStrings.MODID + ":drax_mk2"); - drax_mk3 = new ItemToolAbilityPower(20F, -0.05, MainRegistry.tMatElec, EnumToolType.MINER, 2500000000L, 500000, 10000) - .addAbility(IToolHarvestAbility.SMELTER, 0) - .addAbility(IToolHarvestAbility.SHREDDER, 0) - .addAbility(IToolHarvestAbility.CENTRIFUGE, 0) - .addAbility(IToolHarvestAbility.CRYSTALLIZER, 0) - .addAbility(IToolHarvestAbility.SILK, 0) - .addAbility(IToolHarvestAbility.LUCK, 3) - .addAbility(IToolAreaAbility.HAMMER, 3) - .addAbility(IToolAreaAbility.HAMMER_FLAT, 3) - .addAbility(IToolAreaAbility.RECURSION, 5).setUnlocalizedName("drax_mk3").setCreativeTab(null).setTextureName(RefStrings.MODID + ":drax_mk3"); ToolMaterial matBismuth = EnumHelper.addToolMaterial("HBM_BISMUTH", 4, 0, 50F, 0.0F, 200).setRepairItem(new ItemStack(ModItems.ingot_bismuth)); bismuth_pickaxe = new ItemToolAbility(15F, 0, matBismuth, EnumToolType.MINER) @@ -5173,7 +5143,6 @@ public class ModItems { GameRegistry.registerItem(battery_potatos, battery_potatos.getUnlocalizedName()); GameRegistry.registerItem(hev_battery, hev_battery.getUnlocalizedName()); GameRegistry.registerItem(fusion_core, fusion_core.getUnlocalizedName()); - GameRegistry.registerItem(energy_core, energy_core.getUnlocalizedName()); //Folders GameRegistry.registerItem(blueprints, blueprints.getUnlocalizedName()); @@ -5929,9 +5898,6 @@ public class ModItems { GameRegistry.registerItem(dnt_sword, dnt_sword.getUnlocalizedName()); GameRegistry.registerItem(smashing_hammer, smashing_hammer.getUnlocalizedName()); GameRegistry.registerItem(centri_stick, centri_stick.getUnlocalizedName()); - GameRegistry.registerItem(drax, drax.getUnlocalizedName()); - GameRegistry.registerItem(drax_mk2, drax_mk2.getUnlocalizedName()); - GameRegistry.registerItem(drax_mk3, drax_mk3.getUnlocalizedName()); GameRegistry.registerItem(bismuth_pickaxe, bismuth_pickaxe.getUnlocalizedName()); GameRegistry.registerItem(bismuth_axe, bismuth_axe.getUnlocalizedName()); GameRegistry.registerItem(volcanic_pickaxe, volcanic_pickaxe.getUnlocalizedName()); @@ -5939,7 +5905,8 @@ public class ModItems { GameRegistry.registerItem(chlorophyte_pickaxe, chlorophyte_pickaxe.getUnlocalizedName()); GameRegistry.registerItem(chlorophyte_axe, chlorophyte_axe.getUnlocalizedName()); GameRegistry.registerItem(mese_pickaxe, mese_pickaxe.getUnlocalizedName()); - GameRegistry.registerItem(mese_axe, mese_axe.getUnlocalizedName()); GameRegistry.registerItem(matchstick, matchstick.getUnlocalizedName()); + GameRegistry.registerItem(mese_axe, mese_axe.getUnlocalizedName()); + GameRegistry.registerItem(matchstick, matchstick.getUnlocalizedName()); GameRegistry.registerItem(balefire_and_steel, balefire_and_steel.getUnlocalizedName()); GameRegistry.registerItem(crowbar, crowbar.getUnlocalizedName()); GameRegistry.registerItem(wrench, wrench.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/items/machine/ItemBattery.java b/src/main/java/com/hbm/items/machine/ItemBattery.java index bc35e2803..f3c840fd3 100644 --- a/src/main/java/com/hbm/items/machine/ItemBattery.java +++ b/src/main/java/com/hbm/items/machine/ItemBattery.java @@ -2,7 +2,6 @@ package com.hbm.items.machine; import java.util.List; -import com.hbm.items.ModItems; import com.hbm.util.BobMathUtil; import api.hbm.energymk2.IBatteryItem; @@ -10,7 +9,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -30,30 +28,15 @@ public class ItemBattery extends Item implements IBatteryItem { @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { long charge = maxCharge; + if(itemstack.hasTagCompound()) charge = getCharge(itemstack); - if(itemstack.getItem() != ModItems.fusion_core && itemstack.getItem() != ModItems.energy_core) { - list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE"); - } else { - String charge1 = BobMathUtil.getShortNumber((charge * 100) / this.maxCharge); - list.add("Charge: " + charge1 + "%"); - list.add("(" + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE)"); - } + list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE"); list.add("Charge rate: " + BobMathUtil.getShortNumber(chargeRate) + "HE/t"); list.add("Discharge rate: " + BobMathUtil.getShortNumber(dischargeRate) + "HE/t"); } - @Override - public EnumRarity getRarity(ItemStack p_77613_1_) { - - if(this == ModItems.fusion_core || this == ModItems.energy_core) { - return EnumRarity.uncommon; - } - - return EnumRarity.common; - } - public void chargeBattery(ItemStack stack, long i) { if(stack.getItem() instanceof ItemBattery) { if(stack.hasTagCompound()) { diff --git a/src/main/java/com/hbm/items/tool/ItemAnchorRemote.java b/src/main/java/com/hbm/items/tool/ItemAnchorRemote.java index 0ebd77c33..65a72b7ef 100644 --- a/src/main/java/com/hbm/items/tool/ItemAnchorRemote.java +++ b/src/main/java/com/hbm/items/tool/ItemAnchorRemote.java @@ -3,7 +3,6 @@ package com.hbm.items.tool; import java.util.List; import com.hbm.blocks.ModBlocks; -import com.hbm.items.ModItems; import com.hbm.items.machine.ItemBattery; import com.hbm.main.NTMSounds; import com.hbm.util.BobMathUtil; @@ -20,21 +19,10 @@ public class ItemAnchorRemote extends ItemBattery { } @Override - public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) { - + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) { long charge = maxCharge; - - if(itemstack.hasTagCompound()) - charge = getCharge(itemstack); - - if(itemstack.getItem() != ModItems.fusion_core && itemstack.getItem() != ModItems.energy_core) { - list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE"); - } else { - String charge1 = BobMathUtil.getShortNumber((charge * 100) / this.maxCharge); - list.add("Charge: " + charge1 + "%"); - list.add("(" + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE)"); - } - + if(stack.hasTagCompound()) charge = getCharge(stack); + list.add("Energy stored: " + BobMathUtil.getShortNumber(charge) + "/" + BobMathUtil.getShortNumber(maxCharge) + "HE"); list.add("Charge rate: " + BobMathUtil.getShortNumber(chargeRate) + "HE/t"); } diff --git a/src/main/java/com/hbm/main/CraftingManager.java b/src/main/java/com/hbm/main/CraftingManager.java index 6a2c5ab1e..9f25e38bc 100644 --- a/src/main/java/com/hbm/main/CraftingManager.java +++ b/src/main/java/com/hbm/main/CraftingManager.java @@ -703,11 +703,10 @@ public class CraftingManager { addShapelessAuto(new ItemStack(ModItems.ams_catalyst_dineutronium, 1), new Object[] { ModItems.ams_catalyst_blank, ModItems.rune_hagalaz, ModItems.rune_hagalaz, ModItems.rune_thurisaz, ModItems.rune_thurisaz, DNT.dust(), DNT.dust(), DNT.dust(), DNT.dust() }); addRecipeAuto(new ItemStack(ModBlocks.barrel_plastic, 1), new Object[] { "IPI", "I I", "IPI", 'I', ModItems.plate_polymer, 'P', AL.plate() }); addRecipeAuto(new ItemStack(ModBlocks.barrel_steel, 1), new Object[] { "IPI", "I I", "IPI", 'I', STEEL.plate(), 'P', STEEL.ingot() }); - addRecipeAuto(new ItemStack(ModBlocks.barrel_tcalloy, 1), new Object[] { "IPI", "I I", "IPI", 'I', "ingotTcAlloy", 'P', TI.plate() }); - addRecipeAuto(new ItemStack(ModBlocks.barrel_antimatter, 1), new Object[] { "IPI", "I I", "IPI", 'I', BIGMT.plate(), 'P', ModItems.coil_gold_torus }); + addRecipeAuto(new ItemStack(ModBlocks.barrel_tcalloy, 1), new Object[] { "IPI", "I I", "IPI", 'I', TCALLOY.ingot(), 'P', TI.plate() }); + addRecipeAuto(new ItemStack(ModBlocks.barrel_antimatter, 1), new Object[] { "IPI", "I I", "IPI", 'I', BIGMT.plate(), 'P', BSCCO.wireDense() }); addRecipeAuto(new ItemStack(ModBlocks.tesla, 1), new Object[] { "CCC", "PIP", "WTW", 'C', ModItems.coil_copper, 'I', IRON.ingot(), 'P', ANY_PLASTIC.ingot(), 'T', ModBlocks.machine_transformer, 'W', KEY_PLANKS }); addRecipeAuto(new ItemStack(ModBlocks.struct_watz_core, 1), new Object[] { "CBC", "BHB", "CBC", 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ADVANCED), 'B', ANY_RESISTANTALLOY.plateCast(), 'H', ModBlocks.watz_cooler }); - addShapelessAuto(new ItemStack(ModItems.energy_core), new Object[] { ModItems.fusion_core, ModItems.fuse }); addRecipeAuto(new ItemStack(ModItems.catalytic_converter, 1), new Object[] { "PCP", "PBP", "PCP", 'P', ANY_HARDPLASTIC.ingot(), 'C', CO.dust(), 'B', ANY_BISMOID.ingot() }); addRecipeAuto(new ItemStack(ModItems.upgrade_nullifier, 1), new Object[] { "SPS", "PUP", "SPS", 'S', STEEL.plate(), 'P', ModItems.powder_fire, 'U', ModItems.upgrade_template }); diff --git a/src/main/java/com/hbm/main/MainRegistry.java b/src/main/java/com/hbm/main/MainRegistry.java index 0f4b640a6..f28893151 100644 --- a/src/main/java/com/hbm/main/MainRegistry.java +++ b/src/main/java/com/hbm/main/MainRegistry.java @@ -1631,6 +1631,10 @@ public class MainRegistry { ignoreMappings.add("hbm:item.blades_advanced_alloy"); ignoreMappings.add("hbm:tile.machine_minirtg"); ignoreMappings.add("hbm:tile.machine_powerrtg"); + ignoreMappings.add("hbm:item.energy_core"); + ignoreMappings.add("hbm:item.drax"); + ignoreMappings.add("hbm:item.drax_mk2"); + ignoreMappings.add("hbm:item.drax_mk3"); /// REMAP /// remapItems.put("hbm:item.gadget_explosive8", ModItems.early_explosive_lenses); 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 e9ddf68b0..ac8829106 100644 --- a/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java +++ b/src/main/java/com/hbm/world/gen/nbt/NBTStructure.java @@ -7,6 +7,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.*; +import java.util.function.Consumer; import java.util.function.Predicate; import com.hbm.config.ServerConfig; @@ -84,9 +85,25 @@ public class NBTStructure { // incredibly shitty system for translating legacy block definitions to new ones @Untested // i can't find a god damn factory - private static Map substitutions = new HashMap() {{ - put("hbm:tile.ore_coal_oil", "coal_ore"); + private static Map substitutions = new HashMap() {{ + put("hbm:tile.ore_coal_oil", new BlockMigration("coal_ore")); }}; + + public static class BlockMigration { + public String block; + public int meta; + // i may have misjudged, migration is only done when the palette is loaded, rendering this basically useless + public Consumer tileEntityTransformerObject; + + public BlockMigration(String block) { this(block, 0, null); } + public BlockMigration(String block, int meta) { this(block, meta, null); } + public BlockMigration(String block, Consumer teto) { this(block, 0, teto); } + public BlockMigration(String block, int meta, Consumer teto) { + this.block = block; + this.meta = meta; + this.tileEntityTransformerObject = teto; + } + } public NBTStructure(ResourceLocation resource) { // Can't use regular resource loading, servers don't know how! @@ -328,13 +345,16 @@ public class NBTStructure { NBTTagCompound p = paletteList.getCompoundTagAt(i); String blockName = p.getString("Name"); + int meta = 0; NBTTagCompound prop = p.getCompoundTag("Properties"); /// BOB PATCH /// - if(substitutions.containsKey(blockName)) blockName = substitutions.get(blockName); + if(substitutions.containsKey(blockName)) { + BlockMigration mig = substitutions.get(blockName); + blockName = mig.block; + meta = mig.meta; + } /// BOB PATCH /// - - int meta = 0; try { meta = Integer.parseInt(prop.getString("meta")); } catch(NumberFormatException ex) {