From c891d9fe168062763aa37d5000e1b3150cb67a84 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Fri, 25 Mar 2016 00:49:12 +0300 Subject: [PATCH] Disabled erroring block, fixed DynBucketTest.TestItem model. --- .../net/minecraftforge/debug/DynBucketTest.java | 1 + .../debug/ForgeBlockStatesLoaderDebug.java | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/test/java/net/minecraftforge/debug/DynBucketTest.java b/src/test/java/net/minecraftforge/debug/DynBucketTest.java index 360d8021b..167acd67d 100644 --- a/src/test/java/net/minecraftforge/debug/DynBucketTest.java +++ b/src/test/java/net/minecraftforge/debug/DynBucketTest.java @@ -87,6 +87,7 @@ public class DynBucketTest }); ModelBakery.registerItemVariants(dynBottle, bottle); ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(GameRegistry.findBlock(MODID, "simpletank")), 0, new ModelResourceLocation(new ResourceLocation(MODID, "simpletank"), "normal")); + ModelLoader.setCustomModelResourceLocation(GameRegistry.findItem(MODID, "testitem"), 0, new ModelResourceLocation(new ResourceLocation("minecraft", "stick"), "inventory")); } } diff --git a/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java b/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java index f8de9ec2f..492b9cb80 100644 --- a/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java +++ b/src/test/java/net/minecraftforge/debug/ForgeBlockStatesLoaderDebug.java @@ -35,7 +35,7 @@ public class ForgeBlockStatesLoaderDebug { public static final String MODID = "ForgeBlockStatesLoader"; public static final String ASSETS = "forgeblockstatesloader:"; - public static final Block blockCustom = new CustomMappedBlock(); + //public static final Block blockCustom = new CustomMappedBlock(); public static final String nameCustomWall = "custom_wall"; public static final BlockWall blockCustomWall = new BlockWall(Blocks.cobblestone); public static final ItemMultiTexture itemCustomWall = (ItemMultiTexture)new ItemMultiTexture(blockCustomWall, blockCustomWall, new Function() @@ -50,8 +50,8 @@ public class ForgeBlockStatesLoaderDebug { @EventHandler public void preInit(FMLPreInitializationEvent event) { - blockCustom.setUnlocalizedName(MODID + ".customBlock").setRegistryName("customBlock"); - GameRegistry.registerBlock(blockCustom); + //blockCustom.setUnlocalizedName(MODID + ".customBlock").setRegistryName("customBlock"); + //GameRegistry.registerBlock(blockCustom); blockCustomWall.setUnlocalizedName(MODID + ".customWall").setRegistryName(nameCustomWall); GameRegistry.registerBlock(blockCustomWall, (Class)null); @@ -65,7 +65,7 @@ public class ForgeBlockStatesLoaderDebug { @SideOnly(Side.CLIENT) public void preInitClient(FMLPreInitializationEvent event) { - ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().withName(CustomMappedBlock.VARIANT).build()); + //ModelLoader.setCustomStateMapper(blockCustom, new StateMap.Builder().withName(CustomMappedBlock.VARIANT).build()); ModelLoader.setCustomStateMapper(blockCustomWall, new IStateMapper() { @@ -91,7 +91,8 @@ public class ForgeBlockStatesLoaderDebug { } // this block is never actually used, it's only needed for the error message on load to see the variant it maps to - public static class CustomMappedBlock extends Block + // disabling until we can make it a proper test + /*public static class CustomMappedBlock extends Block { public static final PropertyEnum VARIANT = PropertyEnum.create("type", CustomVariant.class); @@ -127,5 +128,5 @@ public class ForgeBlockStatesLoaderDebug { public String getName() { return this.toString(); }; } - } + }*/ }