Try and prevent invalid ore dict names being registered

This commit is contained in:
modmuss50 2017-07-01 19:27:07 +01:00
parent 94d9c2cf20
commit 2529f3fd9a
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
5 changed files with 116 additions and 110 deletions
src/main/java/techreborn/items

View file

@ -29,6 +29,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.util.OreUtil;
import techreborn.client.TechRebornCreativeTabMisc;
import techreborn.events.TRRecipeHandler;
import techreborn.init.ModItems;
@ -77,7 +78,7 @@ public class ItemPlates extends ItemTR {
types = newTypes;
newTypes[plateIndex] = plateType;
String oreName = "plate" + CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, plateType);
OreDictionary.registerOre(oreName, new ItemStack(ModItems.PLATES, 1, plateIndex));
OreUtil.registerOre(oreName, new ItemStack(ModItems.PLATES, 1, plateIndex));
}
@Override