Skip to content
Permalink
Browse files

Changed oredict registration of AnyBronze to ItemMetal class.

  • Loading branch information
DisasterMoo committed Aug 9, 2019
1 parent 2ddb65f commit 2ec7d42f9cc9522e39f35ffb5c9f6d5a2ab3e938
@@ -39,7 +39,6 @@
import net.dries007.tfc.objects.items.wood.ItemDoorTFC;
import net.dries007.tfc.objects.items.wood.ItemLumberTFC;
import net.dries007.tfc.objects.items.wood.ItemWoodenBucket;
import net.dries007.tfc.util.OreDictionaryHelper;
import net.dries007.tfc.util.agriculture.Crop;
import net.dries007.tfc.util.agriculture.Food;

@@ -325,15 +324,6 @@ public static void registerItems(RegistryEvent.Register<Item> event)
// todo: foods & plants & seeds & fruits & fruit tree saplings & berries & berry bushes

allSimpleItems = simpleItems.build();
// Register oredict bronze items as any bronze
for (Metal.ItemType type : Metal.ItemType.values())
{
if (ItemMetal.get(Metal.BRONZE, type) == null)
continue; //this is for skipping armors, as they don't extend ItemMetal anymore
OreDictionaryHelper.register(ItemMetal.get(Metal.BRONZE, type), type, "Any", "Bronze");
OreDictionaryHelper.register(ItemMetal.get(Metal.BISMUTH_BRONZE, type), type, "Any", "Bronze");
OreDictionaryHelper.register(ItemMetal.get(Metal.BLACK_BRONZE, type), type, "Any", "Bronze");
}
}

public static void init()
@@ -53,7 +53,10 @@ public ItemMetal(Metal metal, Metal.ItemType type)
OreDictionaryHelper.register(this, type);
//noinspection ConstantConditions
OreDictionaryHelper.register(this, type, metal.getRegistryName().getPath());

if (metal == Metal.BRONZE || metal == Metal.BISMUTH_BRONZE || metal == Metal.BLACK_BRONZE)
{
OreDictionaryHelper.register(this, type, "Any", "Bronze");
}
if (type == Metal.ItemType.TUYERE)
{
setMaxDamage(metal.getToolMetal() != null ? (int) (metal.getToolMetal().getMaxUses() * 0.2) : 100);

0 comments on commit 2ec7d42

Please sign in to comment.
You can’t perform that action at this time.