Disabled erroring block, fixed DynBucketTest.TestItem model.

This commit is contained in:
RainWarrior 2016-03-25 00:49:12 +03:00
parent dd201c066e
commit c891d9fe16
2 changed files with 8 additions and 6 deletions

View file

@ -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"));
}
}

View file

@ -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<ItemStack, String>()
@ -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<? extends ItemBlock>)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<CustomVariant> VARIANT = PropertyEnum.create("type", CustomVariant.class);
@ -127,5 +128,5 @@ public class ForgeBlockStatesLoaderDebug {
public String getName() { return this.toString(); };
}
}
}*/
}