Change how blocks/items are registered (desc)

tterrag is a meany face and yelled at me for using class.getSimpleName(). So here's an API-friendly re-work of the registration system. This allows all our Items/Blocks to be obtained via the API. Just add a new enum.
This commit is contained in:
Nick 2016-01-18 22:34:12 -08:00
parent 2a028414b1
commit fdfcb5c5b7
69 changed files with 260 additions and 15 deletions

View file

@ -24,6 +24,7 @@ public class ItemMonsterSoul extends Item implements IDemonWill
super();
setUnlocalizedName(Constants.Mod.MODID + ".monsterSoul.");
setRegistryName(Constants.BloodMagicItem.MONSTER_SOUL.getRegName());
setCreativeTab(BloodMagic.tabBloodMagic);
setHasSubtypes(true);
setMaxStackSize(1);

View file

@ -22,9 +22,10 @@ public class ItemSentientArmourGem extends Item
{
super();
this.setCreativeTab(BloodMagic.tabBloodMagic);
setCreativeTab(BloodMagic.tabBloodMagic);
setUnlocalizedName(Constants.Mod.MODID + ".sentientArmourGem");
this.setMaxStackSize(1);
setRegistryName(Constants.BloodMagicItem.SENTIENT_ARMOR_GEM.getRegName());
setMaxStackSize(1);
}
@Override

View file

@ -23,7 +23,8 @@ public class ItemSentientBow extends ItemBow
{
super();
setUnlocalizedName(Constants.Mod.MODID + ".sentientBow");
this.setCreativeTab(BloodMagic.tabBloodMagic);
setRegistryName(Constants.BloodMagicItem.SENTIENT_BOW.getRegName());
setCreativeTab(BloodMagic.tabBloodMagic);
}
@Override

View file

@ -40,7 +40,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon
super(ModItems.soulToolMaterial);
setUnlocalizedName(Constants.Mod.MODID + ".sentientSword");
setRegistryName(Constants.BloodMagicItem.SENTIENT_SWORD.getRegName());
setCreativeTab(BloodMagic.tabBloodMagic);
}

View file

@ -25,6 +25,7 @@ public class ItemSoulGem extends Item implements IDemonWillGem
super();
setUnlocalizedName(Constants.Mod.MODID + ".soulGem.");
setRegistryName(Constants.BloodMagicItem.SOUL_GEM.getRegName());
setHasSubtypes(true);
setMaxStackSize(1);
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -24,6 +24,7 @@ public class ItemSoulSnare extends Item
super();
setUnlocalizedName(Constants.Mod.MODID + ".soulSnare.");
setRegistryName(Constants.BloodMagicItem.SOUL_SNARE.getRegName());
setCreativeTab(BloodMagic.tabBloodMagic);
setHasSubtypes(true);
setMaxStackSize(16);