Whiteshirt found blocks and itemBlocks being registered for everything

This commit is contained in:
Mohammad-Ali Minaie
2018-02-25 15:17:33 -05:00
parent 0d7b17305e
commit ebad0995ef
3 changed files with 95 additions and 76 deletions

View File

@@ -423,92 +423,92 @@ public class ModBlocks {
public static void register() { public static void register() {
registerBlock(nbtCrucible); registerBlock(nbtCrucible);
registerBlock(forge_brick); registerBlockWithItem(forge_brick);
registerBlock(forge_adobe); registerBlockWithItem(forge_adobe);
registerBlock(bloomery_brick); registerBlockWithItem(bloomery_brick);
registerBlock(bloomery_adobe); registerBlockWithItem(bloomery_adobe);
registerBlock(blockbreaker); registerBlockWithItem(blockbreaker);
registerBlock(castingform); registerBlockWithItem(castingform);
registerBlock(castingblock); registerBlockWithItem(castingblock);
registerBlock(pistonbellowsoak); registerBlockWithItem(pistonbellowsoak);
registerBlock(pistonbellowsjungle); registerBlockWithItem(pistonbellowsjungle);
registerBlock(pistonbellowsbirch); registerBlockWithItem(pistonbellowsbirch);
registerBlock(pistonbellowsspruce); registerBlockWithItem(pistonbellowsspruce);
registerBlock(pistonbellowsdarkoak); registerBlockWithItem(pistonbellowsdarkoak);
registerBlock(pistonbellowsacacia); registerBlockWithItem(pistonbellowsacacia);
registerBlock(emptycrucible); registerBlockWithItem(emptycrucible);
registerBlock(emptycruciblehot); registerBlockWithItem(emptycruciblehot);
registerBlock(emptycruciblecracked); registerBlockWithItem(emptycruciblecracked);
registerBlock(emptycruciblecrackedhot); registerBlockWithItem(emptycruciblecrackedhot);
registerBlock(rawbronzecrucible); registerBlockWithItem(rawbronzecrucible);
registerBlock(hotbronzecrucible); registerBlockWithItem(hotbronzecrucible);
registerBlock(hotcookedbronzecrucible); registerBlockWithItem(hotcookedbronzecrucible);
registerBlock(rawbronzecrucible_diamond); registerBlockWithItem(rawbronzecrucible_diamond);
registerBlock(hotbronzecrucible_diamond); registerBlockWithItem(hotbronzecrucible_diamond);
registerBlock(hotcookedbronzecrucible_diamond); registerBlockWithItem(hotcookedbronzecrucible_diamond);
registerBlock(rawbronzecrucible_emerald); registerBlockWithItem(rawbronzecrucible_emerald);
registerBlock(hotbronzecrucible_emerald); registerBlockWithItem(hotbronzecrucible_emerald);
registerBlock(hotcookedbronzecrucible_emerald); registerBlockWithItem(hotcookedbronzecrucible_emerald);
registerBlock(rawbronzecrucible_redstone); registerBlockWithItem(rawbronzecrucible_redstone);
registerBlock(hotbronzecrucible_redstone); registerBlockWithItem(hotbronzecrucible_redstone);
registerBlock(hotcookedbronzecrucible_redstone); registerBlockWithItem(hotcookedbronzecrucible_redstone);
registerBlock(rawbronzecrucible_lapis); registerBlockWithItem(rawbronzecrucible_lapis);
registerBlock(hotbronzecrucible_lapis); registerBlockWithItem(hotbronzecrucible_lapis);
registerBlock(hotcookedbronzecrucible_lapis); registerBlockWithItem(hotcookedbronzecrucible_lapis);
registerBlock(rawironcrucible); registerBlockWithItem(rawironcrucible);
registerBlock(hotironcrucible); registerBlockWithItem(hotironcrucible);
registerBlock(hotcookedironcrucible); registerBlockWithItem(hotcookedironcrucible);
registerBlock(coolironcrucible); registerBlockWithItem(coolironcrucible);
registerBlock(failedironcrucible); registerBlockWithItem(failedironcrucible);
registerBlock(failedironcruciblehot); registerBlockWithItem(failedironcruciblehot);
registerBlock(rawcleanironcrucible); registerBlockWithItem(rawcleanironcrucible);
registerBlock(hotcleanironcrucible); registerBlockWithItem(hotcleanironcrucible);
registerBlock(hotcookedcleanironcrucible); registerBlockWithItem(hotcookedcleanironcrucible);
registerBlock(coolcleanironcrucible); registerBlockWithItem(coolcleanironcrucible);
registerBlock(failedcleanironcrucible); registerBlockWithItem(failedcleanironcrucible);
registerBlock(failedcleanironcruciblehot); registerBlockWithItem(failedcleanironcruciblehot);
registerBlock(rawsteelcrucible); registerBlockWithItem(rawsteelcrucible);
registerBlock(hotsteelcrucible); registerBlockWithItem(hotsteelcrucible);
registerBlock(hotcookedsteelcrucible); registerBlockWithItem(hotcookedsteelcrucible);
registerBlock(coolsteelcrucible); registerBlockWithItem(coolsteelcrucible);
registerBlock(failedsteelcrucible); registerBlockWithItem(failedsteelcrucible);
registerBlock(failedsteelcruciblehot); registerBlockWithItem(failedsteelcruciblehot);
registerBlock(rawwootzcrucible); registerBlockWithItem(rawwootzcrucible);
registerBlock(hotwootzcrucible); registerBlockWithItem(hotwootzcrucible);
registerBlock(hotcookedwootzcrucible); registerBlockWithItem(hotcookedwootzcrucible);
registerBlock(coolwootzcrucible); registerBlockWithItem(coolwootzcrucible);
registerBlock(failedwootzcrucible); registerBlockWithItem(failedwootzcrucible);
registerBlock(failedwootzcruciblehot); registerBlockWithItem(failedwootzcruciblehot);
registerBlock(ironball); registerBlockWithItem(ironball);
registerBlock(ironchunk); registerBlockWithItem(ironchunk);
registerBlock(ironcleanball); registerBlockWithItem(ironcleanball);
registerBlock(ironcleanchunk); registerBlockWithItem(ironcleanchunk);
registerBlock(steelball); registerBlockWithItem(steelball);
registerBlock(steelchunk); registerBlockWithItem(steelchunk);
registerBlock(wootzball); registerBlockWithItem(wootzball);
registerBlock(wootzchunk); registerBlockWithItem(wootzchunk);
//registerBlockSubType(ironball, ironballitemcool, "ironcool"); //registerBlockWithItemSubType(ironball, ironballitemcool, "ironcool");
//registerBlockSubType(ironball, ironballitemhot, "ironhot"); //registerBlockWithItemSubType(ironball, ironballitemhot, "ironhot");
registerBlock(stoneanvil); registerBlockWithItem(stoneanvil);
registerBlock(ironanvil); registerBlockWithItem(ironanvil);
registerBlock(yewstave); registerBlockWithItem(yewstave);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@@ -604,7 +604,7 @@ public class ModBlocks {
} }
private static void registerBlock(Block block) private static void registerBlockWithItem(Block block)
{ {
ForgeRegistries.BLOCKS.register(block); ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block); //GameRegistry.register(block);
@@ -616,6 +616,18 @@ public class ModBlocks {
//GameRegistry.register(item); //GameRegistry.register(item);
} }
private static void registerBlock(Block block)
{
ForgeRegistries.BLOCKS.register(block);
//GameRegistry.register(block);
//ItemBlock item = new ItemBlock(block);
//item.setRegistryName(block.getRegistryName());
//ForgeRegistries.ITEMS.register(item);
//GameRegistry.register(item);
}
private static void registerBlockSubType(Block block, ItemBlock item, String registryName) private static void registerBlockSubType(Block block, ItemBlock item, String registryName)
{ {
ForgeRegistries.BLOCKS.register(block); ForgeRegistries.BLOCKS.register(block);

View File

@@ -27,7 +27,7 @@ public class ItemNBTCrucible extends AbstractItemBlock {
this.setRegistryName(name); this.setRegistryName(name);
this.setCreativeTab(ModInfo.TAB_FORGECRAFT); this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() { /*this.addPropertyOverride(new ResourceLocation("type"), new IItemPropertyGetter() {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) public float apply(ItemStack item, @Nullable World worldIn, @Nullable EntityLivingBase entityIn)
@@ -39,8 +39,14 @@ public class ItemNBTCrucible extends AbstractItemBlock {
} }
} }
return 0.0F; return 0.0F;
} }
}); });
"overrides": [
{"predicate": {"type": 0.0},"model": "forgecraft:item/nbtcrucible/nbtcrucible_0"},
{"predicate": {"type": 0.1},"model": "forgecraft:item/nbtcrucible/nbtcrucible_1"}
]
*/
} }
public boolean getStatus(ItemStack stack) { public boolean getStatus(ItemStack stack) {

View File

@@ -1,7 +1,8 @@
{ {
"parent": "forgecraft:block/crucibleshut", "forge_marker":1,
"overrides": [ "textures": {
{"predicate": {"type": 0.0},"model": "forgecraft:item/nbtcrucible/nbtcrucible_0"}, "particle": "forgecraft:blocks/stone_slab",
{"predicate": {"type": 0.1},"model": "forgecraft:item/nbtcrucible/nbtcrucible_1"} "texture": "forgecraft:blocks/stone_slab"
] },
"parent": "forgecraft:block/crucibleshut"
} }