Move items, sounds, potions to new registration system

This commit is contained in:
Vincent Lee committed 2017-06-24 22:48:35 -05:00
1 parent 101c72e633
commit a6b37966a1
15 files changed
+355 -353

No files matched your search

@@ -11,6 +11,9 @@
package vazkii.botania.common.brew;
import net.minecraft.potion.Potion;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import vazkii.botania.common.brew.potion.PotionAllure;
import vazkii.botania.common.brew.potion.PotionBloodthirst;
import vazkii.botania.common.brew.potion.PotionClear;
@@ -18,22 +21,24 @@ import vazkii.botania.common.brew.potion.PotionEmptiness;
import vazkii.botania.common.brew.potion.PotionFeatherfeet;
import vazkii.botania.common.brew.potion.PotionSoulCross;
@Mod.EventBusSubscriber
public class ModPotions {
public static Potion soulCross;
public static Potion featherfeet;
public static Potion emptiness;
public static Potion bloodthrst;
public static Potion allure;
public static Potion clear;
public static final Potion soulCross = new PotionSoulCross();
public static final Potion featherfeet = new PotionFeatherfeet();
public static final Potion emptiness = new PotionEmptiness();
public static final Potion bloodthrst = new PotionBloodthirst();
public static final Potion allure = new PotionAllure();
public static final Potion clear = new PotionClear();
public static void init() {
soulCross = new PotionSoulCross();
featherfeet = new PotionFeatherfeet();
emptiness = new PotionEmptiness();
bloodthrst = new PotionBloodthirst();
allure = new PotionAllure();
clear = new PotionClear();
@SubscribeEvent
public static void registerPotions(RegistryEvent.Register<Potion> evt)
{
evt.getRegistry().register(soulCross);
evt.getRegistry().register(featherfeet);
evt.getRegistry().register(emptiness);
evt.getRegistry().register(bloodthrst);
evt.getRegistry().register(allure);
evt.getRegistry().register(clear);
}
}
@@ -32,7 +32,7 @@ public class PotionMod extends Potion {
public PotionMod(String name, boolean badEffect, int color, int iconIndex) {
super(badEffect, color);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setPotionName("botania.potion." + name);
this.iconIndex = iconIndex;
}
@@ -2,11 +2,15 @@ package vazkii.botania.common.core.handler;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Mod.EventBusSubscriber
public final class ModSounds {
public static void init() {
@SubscribeEvent
public static void registerSounds(RegistryEvent.Register<SoundEvent> evt) {
String[] sounds = {
"botania:airRod",
"botania:agricarnation",
@@ -55,10 +59,9 @@ public final class ModSounds {
for (String s : sounds) {
ResourceLocation loc = new ResourceLocation(s);
GameRegistry.register(new SoundEvent(loc), loc);
evt.getRegistry().register(new SoundEvent(loc).setRegistryName(loc));
}
}
private ModSounds() {}
}
@@ -38,7 +38,7 @@ public class ItemManaCookie extends ItemFood implements IModelRegister {
super(0, 0.1F, false);
setPotionEffect(new PotionEffect(MobEffects.SATURATION, 20, 0), 1F);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, LibItemNames.MANA_COOKIE));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibItemNames.MANA_COOKIE));
setUnlocalizedName(LibItemNames.MANA_COOKIE);
addPropertyOverride(new ResourceLocation(LibMisc.MOD_ID, "totalbiscuit"),
(stack, worldIn, entityIn) -> stack.getDisplayName().toLowerCase(Locale.ROOT).contains("totalbiscuit") ? 1F : 0F);
@@ -29,15 +29,10 @@ public abstract class ItemMod extends Item implements IModelRegister {
public ItemMod(String name) {
setCreativeTab(BotaniaCreativeTab.INSTANCE);
if(shouldRegister())
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name))
setUnlocalizedName(name);
}
protected boolean shouldRegister() {
return true;
}
@Nonnull
@Override
public String getUnlocalizedNameInefficiently(@Nonnull ItemStack par1ItemStack) {
@@ -13,7 +13,11 @@ package vazkii.botania.common.item;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.registries.IForgeRegistry;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.common.item.brew.ItemBrewFlask;
import vazkii.botania.common.item.brew.ItemBrewVial;
@@ -124,315 +128,322 @@ import vazkii.botania.common.item.rod.ItemTornadoRod;
import vazkii.botania.common.item.rod.ItemWaterRod;
import vazkii.botania.common.lib.LibOreDict;
@Mod.EventBusSubscriber
public final class ModItems {
public static final Item lexicon = new ItemLexicon();
public static final Item petal = new ItemPetal();
public static final Item dye = new ItemDye();
public static final Item pestleAndMortar = new ItemPestleAndMortar();
public static final Item twigWand = new ItemTwigWand();
public static final Item manaResource = new ItemManaResource();
public static final Item lens = new ItemLens();
public static final Item rune = new ItemRune();
public static final Item manaTablet = new ItemManaTablet();
public static final Item manaGun = new ItemManaGun();
public static final Item manaCookie = new ItemManaCookie();
public static final Item fertilizer = new ItemFertilizer();
public static final Item grassSeeds = new ItemGrassSeeds();
public static final Item dirtRod = new ItemDirtRod();
public static final Item terraformRod = new ItemTerraformRod();
public static final Item grassHorn = new ItemGrassHorn();
public static final Item manaMirror = new ItemManaMirror();
public static final Item manasteelHelm = new ItemManasteelHelm();
public static final Item manasteelHelmRevealing = new ItemManasteelHelmRevealing();
public static final Item manasteelChest = new ItemManasteelChest();
public static final Item manasteelLegs = new ItemManasteelLegs();
public static final Item manasteelBoots = new ItemManasteelBoots();
public static final Item manasteelPick = new ItemManasteelPick();
public static final Item manasteelShovel = new ItemManasteelShovel();
public static final Item manasteelAxe = new ItemManasteelAxe();
public static final Item manasteelSword = new ItemManasteelSword();
public static final Item manasteelShears = new ItemManasteelShears();
public static final Item terrasteelHelm = new ItemTerrasteelHelm();
public static final Item terrasteelHelmRevealing = new ItemTerrasteelHelmRevealing();
public static final Item terrasteelChest = new ItemTerrasteelChest();
public static final Item terrasteelLegs = new ItemTerrasteelLegs();
public static final Item terrasteelBoots = new ItemTerrasteelBoots();
public static final Item terraSword = new ItemTerraSword();
public static final Item tinyPlanet = new ItemTinyPlanet();
public static final Item manaRing = new ItemManaRing();
public static final Item auraRing = new ItemAuraRing();
public static final Item manaRingGreater = new ItemGreaterManaRing();
public static final Item auraRingGreater = new ItemGreaterAuraRing();
public static final Item travelBelt = new ItemTravelBelt();
public static final Item knockbackBelt = new ItemKnockbackBelt();
public static final Item icePendant = new ItemIcePendant();
public static final Item lavaPendant = new ItemLavaPendant();
public static final Item magnetRing = new ItemMagnetRing();
public static final Item waterRing = new ItemWaterRing();
public static final Item miningRing = new ItemMiningRing();
public static final Item terraPick = new ItemTerraPick();
public static final Item divaCharm = new ItemDivaCharm();
public static final Item flightTiara = new ItemFlightTiara();
public static final Item enderDagger = new ItemEnderDagger();
public static final Item quartz = new ItemQuartz();
public static final Item waterRod = new ItemWaterRod();
public static final Item elementiumHelm = new ItemElementiumHelm();
public static final Item elementiumHelmRevealing = new ItemElementiumHelmRevealing();
public static final Item elementiumChest = new ItemElementiumChest();
public static final Item elementiumLegs = new ItemElementiumLegs();
public static final Item elementiumBoots = new ItemElementiumBoots();
public static final Item elementiumPick = new ItemElementiumPick();
public static final Item elementiumShovel = new ItemElementiumShovel();
public static final Item elementiumAxe = new ItemElementiumAxe();
public static final Item elementiumSword = new ItemElementiumSword();
public static final Item elementiumShears = new ItemElementiumShears();
public static final Item openBucket = new ItemOpenBucket();
public static final Item spawnerMover = new ItemSpawnerMover();
public static final Item pixieRing = new ItemPixieRing();
public static final Item superTravelBelt = new ItemSuperTravelBelt();
public static final Item rainbowRod = new ItemRainbowRod();
public static final Item tornadoRod = new ItemTornadoRod();
public static final Item fireRod = new ItemFireRod();
public static final Item vineBall = new ItemVineBall();
public static final Item slingshot = new ItemSlingshot();
public static final Item manaBottle = new ItemBottledMana();
public static final Item laputaShard = new ItemLaputaShard();
public static final Item virus = new ItemVirus();
public static final Item reachRing = new ItemReachRing();
public static final Item skyDirtRod = new ItemSkyDirtRod();
public static final Item itemFinder = new ItemItemFinder();
public static final Item superLavaPendant = new ItemSuperLavaPendant();
public static final Item enderHand = new ItemEnderHand();
public static final Item glassPick = new ItemGlassPick();
public static final Item spark = new ItemSpark();
public static final Item sparkUpgrade = new ItemSparkUpgrade();
public static final Item diviningRod = new ItemDiviningRod();
public static final Item gravityRod = new ItemGravityRod();
public static final Item manaInkwell = new ItemManaInkwell();
public static final Item vial = new ItemVial();
public static final Item brewVial = new ItemBrewVial();
public static final Item brewFlask = new ItemBrewFlask();
public static final Item bloodPendant = new ItemBloodPendant();
public static final Item missileRod = new ItemMissileRod();
public static final Item holyCloak = new ItemHolyCloak();
public static final Item unholyCloak = new ItemUnholyCloak();
public static final Item balanceCloak = new ItemBalanceCloak();
public static final Item craftingHalo = new ItemCraftingHalo();
public static final Item blackLotus = new ItemBlackLotus();
public static final Item monocle = new ItemMonocle();
public static final Item clip = new ItemClip();
public static final Item cobbleRod = new ItemCobbleRod();
public static final Item smeltRod = new ItemSmeltRod();
public static final Item worldSeed = new ItemWorldSeed();
public static final Item spellCloth = new ItemSpellCloth();
public static final Item thornChakram = new ItemThornChakram();
public static final Item overgrowthSeed = new ItemOvergrowthSeed();
public static final Item craftPattern = new ItemCraftPattern();
public static final Item ancientWill = new ItemAncientWill();
public static final Item corporeaSpark = new ItemCorporeaSpark();
public static final Item livingwoodBow = new ItemLivingwoodBow();
public static final Item crystalBow = new ItemCrystalBow();
public static final Item cosmetic = new ItemBaubleCosmetic();
public static final Item swapRing = new ItemSwapRing();
public static final Item flowerBag = new ItemFlowerBag();
public static final Item phantomInk = new ItemPhantomInk();
public static final Item poolMinecart = new ItemPoolMinecart();
public static final Item pinkinator = new ItemPinkinator();
public static final Item infiniteFruit = new ItemInfiniteFruit();
public static final Item kingKey = new ItemKingKey();
public static final Item flugelEye = new ItemFlugelEye();
public static final Item thorRing = new ItemThorRing();
public static final Item odinRing = new ItemOdinRing();
public static final Item lokiRing = new ItemLokiRing();
public static final Item aesirRing = new ItemAesirRing();
public static final Item dice = new ItemDice();
public static final Item keepIvy = new ItemKeepIvy();
public static final Item blackHoleTalisman = new ItemBlackHoleTalisman();
public static final Item recordGaia1 = new ItemRecordGaia1();
public static final Item recordGaia2 = new ItemRecordGaia2();
public static final Item temperanceStone = new ItemTemperanceStone();
public static final Item incenseStick = new ItemIncenseStick();
public static final Item terraAxe = new ItemTerraAxe();
public static final Item waterBowl = new ItemWaterBowl();
public static final Item obedienceStick = new ItemObedienceStick();
public static final Item cacophonium = new ItemCacophonium();
public static final Item slimeBottle = new ItemSlimeBottle();
public static final Item starSword = new ItemStarSword();
public static final Item exchangeRod = new ItemExchangeRod();
public static final Item magnetRingGreater = new ItemGreaterMagnetRing();
public static final Item thunderSword = new ItemThunderSword();
public static final Item manaweaveHelm = new ItemManaweaveHelm();
public static final Item manaweaveChest = new ItemManaweaveChest();
public static final Item manaweaveLegs = new ItemManaweaveLegs();
public static final Item manaweaveBoots = new ItemManaweaveBoots();
public static final Item autocraftingHalo = new ItemAutocraftingHalo();
public static final Item gaiaHead = new ItemGaiaHead();
public static final Item sextant = new ItemSextant();
public static final Item speedUpBelt = new ItemSpeedUpBelt();
public static final Item baubleBox = new ItemBaubleBox();
public static final Item dodgeRing = new ItemDodgeRing();
public static final Item invisibilityCloak = new ItemInvisibilityCloak();
public static final Item cloudPendant = new ItemCloudPendant();
public static final Item superCloudPendant = new ItemSuperCloudPendant();
public static final Item thirdEye = new ItemThirdEye();
public static final Item astrolabe = new ItemAstrolabe();
public static final Item goddessCharm = new ItemGoddessCharm();
public static Item lexicon;
public static Item petal;
public static Item dye;
public static Item pestleAndMortar;
public static Item twigWand;
public static Item manaResource;
public static Item lens;
public static Item rune;
public static Item manaTablet;
public static Item manaGun;
public static Item manaCookie;
public static Item fertilizer;
public static Item grassSeeds;
public static Item dirtRod;
public static Item terraformRod;
public static Item grassHorn;
public static Item manaMirror;
public static Item manasteelHelm;
public static Item manasteelHelmRevealing;
public static Item manasteelChest;
public static Item manasteelLegs;
public static Item manasteelBoots;
public static Item manasteelPick;
public static Item manasteelShovel;
public static Item manasteelAxe;
public static Item manasteelSword;
public static Item manasteelShears;
public static Item terrasteelHelm;
public static Item terrasteelHelmRevealing;
public static Item terrasteelChest;
public static Item terrasteelLegs;
public static Item terrasteelBoots;
public static Item terraSword;
public static Item tinyPlanet;
public static Item manaRing;
public static Item auraRing;
public static Item manaRingGreater;
public static Item auraRingGreater;
public static Item travelBelt;
public static Item knockbackBelt;
public static Item icePendant;
public static Item lavaPendant;
public static Item magnetRing;
public static Item waterRing;
public static Item miningRing;
public static Item terraPick;
public static Item divaCharm;
public static Item flightTiara;
public static Item enderDagger;
public static Item quartz;
public static Item waterRod;
public static Item elementiumHelm;
public static Item elementiumHelmRevealing;
public static Item elementiumChest;
public static Item elementiumLegs;
public static Item elementiumBoots;
public static Item elementiumPick;
public static Item elementiumShovel;
public static Item elementiumAxe;
public static Item elementiumSword;
public static Item elementiumShears;
public static Item openBucket;
public static Item spawnerMover;
public static Item pixieRing;
public static Item superTravelBelt;
public static Item rainbowRod;
public static Item tornadoRod;
public static Item fireRod;
public static Item vineBall;
public static Item slingshot;
public static Item manaBottle;
public static Item laputaShard;
public static Item virus;
public static Item reachRing;
public static Item skyDirtRod;
public static Item itemFinder;
public static Item superLavaPendant;
public static Item enderHand;
public static Item glassPick;
public static Item spark;
public static Item sparkUpgrade;
public static Item diviningRod;
public static Item gravityRod;
public static Item manaInkwell;
public static Item vial;
public static Item brewVial;
public static Item brewFlask;
public static Item bloodPendant;
public static Item missileRod;
public static Item holyCloak;
public static Item unholyCloak;
public static Item balanceCloak;
public static Item craftingHalo;
public static Item blackLotus;
public static Item monocle;
public static Item clip;
public static Item cobbleRod;
public static Item smeltRod;
public static Item worldSeed;
public static Item spellCloth;
public static Item thornChakram;
public static Item overgrowthSeed;
public static Item craftPattern;
public static Item ancientWill;
public static Item corporeaSpark;
public static Item livingwoodBow;
public static Item crystalBow;
public static Item cosmetic;
public static Item swapRing;
public static Item flowerBag;
public static Item phantomInk;
public static Item poolMinecart;
public static Item pinkinator;
public static Item infiniteFruit;
public static Item kingKey;
public static Item flugelEye;
public static Item thorRing;
public static Item odinRing;
public static Item lokiRing;
public static Item aesirRing;
public static Item dice;
public static Item keepIvy;
public static Item blackHoleTalisman;
public static Item recordGaia1;
public static Item recordGaia2;
public static Item temperanceStone;
public static Item incenseStick;
public static Item terraAxe;
public static Item waterBowl;
public static Item obedienceStick;
public static Item cacophonium;
public static Item slimeBottle;
public static Item starSword;
public static Item exchangeRod;
public static Item magnetRingGreater;
public static Item thunderSword;
public static Item manaweaveHelm;
public static Item manaweaveChest;
public static Item manaweaveLegs;
public static Item manaweaveBoots;
public static Item autocraftingHalo;
public static Item gaiaHead;
public static Item sextant;
public static Item speedUpBelt;
public static Item baubleBox;
public static Item dodgeRing;
public static Item invisibilityCloak;
public static Item cloudPendant;
public static Item superCloudPendant;
public static Item thirdEye;
public static Item astrolabe;
public static Item goddessCharm;
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> evt) {
IForgeRegistry<Item> r = evt.getRegistry();
public static void init() {
lexicon = new ItemLexicon();
petal = new ItemPetal();
dye = new ItemDye();
pestleAndMortar = new ItemPestleAndMortar();
twigWand = new ItemTwigWand();
manaResource = new ItemManaResource();
lens = new ItemLens();
rune = new ItemRune();
manaTablet = new ItemManaTablet();
manaGun = new ItemManaGun();
manaCookie = new ItemManaCookie();
fertilizer = new ItemFertilizer();
grassSeeds = new ItemGrassSeeds();
dirtRod = new ItemDirtRod();
terraformRod = new ItemTerraformRod();
grassHorn = new ItemGrassHorn();
manaMirror = new ItemManaMirror();
manasteelHelm = new ItemManasteelHelm();
manasteelHelmRevealing = new ItemManasteelHelmRevealing();
manasteelChest = new ItemManasteelChest();
manasteelLegs = new ItemManasteelLegs();
manasteelBoots = new ItemManasteelBoots();
manasteelPick = new ItemManasteelPick();
manasteelShovel = new ItemManasteelShovel();
manasteelAxe = new ItemManasteelAxe();
manasteelSword = new ItemManasteelSword();
manasteelShears = new ItemManasteelShears();
terrasteelHelm = new ItemTerrasteelHelm();
terrasteelHelmRevealing = new ItemTerrasteelHelmRevealing();
terrasteelChest = new ItemTerrasteelChest();
terrasteelLegs = new ItemTerrasteelLegs();
terrasteelBoots = new ItemTerrasteelBoots();
terraSword = new ItemTerraSword();
tinyPlanet = new ItemTinyPlanet();
manaRing = new ItemManaRing();
auraRing = new ItemAuraRing();
manaRingGreater = new ItemGreaterManaRing();
auraRingGreater = new ItemGreaterAuraRing();
travelBelt = new ItemTravelBelt();
knockbackBelt = new ItemKnockbackBelt();
icePendant = new ItemIcePendant();
lavaPendant = new ItemLavaPendant();
magnetRing = new ItemMagnetRing();
waterRing = new ItemWaterRing();
miningRing = new ItemMiningRing();
terraPick = new ItemTerraPick();
divaCharm = new ItemDivaCharm();
flightTiara = new ItemFlightTiara();
enderDagger = new ItemEnderDagger();
quartz = new ItemQuartz();
waterRod = new ItemWaterRod();
elementiumHelm = new ItemElementiumHelm();
elementiumHelmRevealing = new ItemElementiumHelmRevealing();
elementiumChest = new ItemElementiumChest();
elementiumLegs = new ItemElementiumLegs();
elementiumBoots = new ItemElementiumBoots();
elementiumPick = new ItemElementiumPick();
elementiumShovel = new ItemElementiumShovel();
elementiumAxe = new ItemElementiumAxe();
elementiumSword = new ItemElementiumSword();
elementiumShears = new ItemElementiumShears();
openBucket = new ItemOpenBucket();
spawnerMover = new ItemSpawnerMover();
pixieRing = new ItemPixieRing();
superTravelBelt = new ItemSuperTravelBelt();
rainbowRod = new ItemRainbowRod();
tornadoRod = new ItemTornadoRod();
fireRod = new ItemFireRod();
vineBall = new ItemVineBall();
slingshot = new ItemSlingshot();
manaBottle = new ItemBottledMana();
laputaShard = new ItemLaputaShard();
virus = new ItemVirus();
reachRing = new ItemReachRing();
skyDirtRod = new ItemSkyDirtRod();
itemFinder = new ItemItemFinder();
superLavaPendant = new ItemSuperLavaPendant();
enderHand = new ItemEnderHand();
glassPick = new ItemGlassPick();
spark = new ItemSpark();
sparkUpgrade = new ItemSparkUpgrade();
diviningRod = new ItemDiviningRod();
gravityRod = new ItemGravityRod();
manaInkwell = new ItemManaInkwell();
vial = new ItemVial();
brewVial = new ItemBrewVial();
brewFlask = new ItemBrewFlask();
bloodPendant = new ItemBloodPendant();
missileRod = new ItemMissileRod();
holyCloak = new ItemHolyCloak();
unholyCloak = new ItemUnholyCloak();
balanceCloak = new ItemBalanceCloak();
craftingHalo = new ItemCraftingHalo();
blackLotus = new ItemBlackLotus();
monocle = new ItemMonocle();
clip = new ItemClip();
cobbleRod = new ItemCobbleRod();
smeltRod = new ItemSmeltRod();
worldSeed = new ItemWorldSeed();
spellCloth = new ItemSpellCloth();
thornChakram = new ItemThornChakram();
overgrowthSeed = new ItemOvergrowthSeed();
craftPattern = new ItemCraftPattern();
ancientWill = new ItemAncientWill();
corporeaSpark = new ItemCorporeaSpark();
livingwoodBow = new ItemLivingwoodBow();
crystalBow = new ItemCrystalBow();
cosmetic = new ItemBaubleCosmetic();
swapRing = new ItemSwapRing();
flowerBag = new ItemFlowerBag();
phantomInk = new ItemPhantomInk();
poolMinecart = new ItemPoolMinecart();
pinkinator = new ItemPinkinator();
infiniteFruit = new ItemInfiniteFruit();
kingKey = new ItemKingKey();
flugelEye = new ItemFlugelEye();
thorRing = new ItemThorRing();
odinRing = new ItemOdinRing();
lokiRing = new ItemLokiRing();
aesirRing = new ItemAesirRing();
dice = new ItemDice();
keepIvy = new ItemKeepIvy();
blackHoleTalisman = new ItemBlackHoleTalisman();
recordGaia1 = new ItemRecordGaia1();
recordGaia2 = new ItemRecordGaia2();
temperanceStone = new ItemTemperanceStone();
incenseStick = new ItemIncenseStick();
terraAxe = new ItemTerraAxe();
waterBowl = new ItemWaterBowl();
obedienceStick = new ItemObedienceStick();
cacophonium = new ItemCacophonium();
slimeBottle = new ItemSlimeBottle();
starSword = new ItemStarSword();
exchangeRod = new ItemExchangeRod();
magnetRingGreater = new ItemGreaterMagnetRing();
thunderSword = new ItemThunderSword();
manaweaveHelm = new ItemManaweaveHelm();
manaweaveLegs = new ItemManaweaveLegs();
manaweaveChest = new ItemManaweaveChest();
manaweaveBoots = new ItemManaweaveBoots();
autocraftingHalo = new ItemAutocraftingHalo();
gaiaHead = new ItemGaiaHead();
sextant = new ItemSextant();
speedUpBelt = new ItemSpeedUpBelt();
baubleBox = new ItemBaubleBox();
dodgeRing = new ItemDodgeRing();
invisibilityCloak = new ItemInvisibilityCloak();
cloudPendant = new ItemCloudPendant();
superCloudPendant = new ItemSuperCloudPendant();
thirdEye = new ItemThirdEye();
astrolabe = new ItemAstrolabe();
goddessCharm = new ItemGoddessCharm();
r.register(lexicon);
r.register(petal);
r.register(dye);
r.register(pestleAndMortar);
r.register(twigWand);
r.register(manaResource);
r.register(lens);
r.register(rune);
r.register(manaTablet);
r.register(manaGun);
r.register(manaCookie);
r.register(fertilizer);
r.register(grassSeeds);
r.register(dirtRod);
r.register(terraformRod);
r.register(grassHorn);
r.register(manaMirror);
r.register(manasteelHelm);
r.register(manasteelHelmRevealing);
r.register(manasteelChest);
r.register(manasteelLegs);
r.register(manasteelBoots);
r.register(manasteelPick);
r.register(manasteelShovel);
r.register(manasteelAxe);
r.register(manasteelSword);
r.register(manasteelShears);
r.register(terrasteelHelm);
r.register(terrasteelHelmRevealing);
r.register(terrasteelChest);
r.register(terrasteelLegs);
r.register(terrasteelBoots);
r.register(terraSword);
r.register(tinyPlanet);
r.register(manaRing);
r.register(auraRing);
r.register(manaRingGreater);
r.register(auraRingGreater);
r.register(travelBelt);
r.register(knockbackBelt);
r.register(icePendant);
r.register(lavaPendant);
r.register(magnetRing);
r.register(waterRing);
r.register(miningRing);
r.register(terraPick);
r.register(divaCharm);
r.register(flightTiara);
r.register(enderDagger);
r.register(quartz);
r.register(waterRod);
r.register(elementiumHelm);
r.register(elementiumHelmRevealing);
r.register(elementiumChest);
r.register(elementiumLegs);
r.register(elementiumBoots);
r.register(elementiumPick);
r.register(elementiumShovel);
r.register(elementiumAxe);
r.register(elementiumSword);
r.register(elementiumShears);
r.register(openBucket);
r.register(spawnerMover);
r.register(pixieRing);
r.register(superTravelBelt);
r.register(rainbowRod);
r.register(tornadoRod);
r.register(fireRod);
r.register(vineBall);
r.register(slingshot);
r.register(manaBottle);
r.register(laputaShard);
r.register(virus);
r.register(reachRing);
r.register(skyDirtRod);
r.register(itemFinder);
r.register(superLavaPendant);
r.register(enderHand);
r.register(glassPick);
r.register(spark);
r.register(sparkUpgrade);
r.register(diviningRod);
r.register(gravityRod);
r.register(manaInkwell);
r.register(vial);
r.register(brewVial);
r.register(brewFlask);
r.register(bloodPendant);
r.register(missileRod);
r.register(holyCloak);
r.register(unholyCloak);
r.register(balanceCloak);
r.register(craftingHalo);
r.register(blackLotus);
r.register(monocle);
r.register(clip);
r.register(cobbleRod);
r.register(smeltRod);
r.register(worldSeed);
r.register(spellCloth);
r.register(thornChakram);
r.register(overgrowthSeed);
r.register(craftPattern);
r.register(ancientWill);
r.register(corporeaSpark);
r.register(livingwoodBow);
r.register(crystalBow);
r.register(cosmetic);
r.register(swapRing);
r.register(flowerBag);
r.register(phantomInk);
r.register(poolMinecart);
r.register(pinkinator);
r.register(infiniteFruit);
r.register(kingKey);
r.register(flugelEye);
r.register(thorRing);
r.register(odinRing);
r.register(lokiRing);
r.register(aesirRing);
r.register(dice);
r.register(keepIvy);
r.register(blackHoleTalisman);
r.register(recordGaia1);
r.register(recordGaia2);
r.register(temperanceStone);
r.register(incenseStick);
r.register(terraAxe);
r.register(waterBowl);
r.register(obedienceStick);
r.register(cacophonium);
r.register(slimeBottle);
r.register(starSword);
r.register(exchangeRod);
r.register(magnetRingGreater);
r.register(thunderSword);
r.register(manaweaveHelm);
r.register(manaweaveChest);
r.register(manaweaveLegs);
r.register(manaweaveBoots);
r.register(autocraftingHalo);
r.register(gaiaHead);
r.register(sextant);
r.register(speedUpBelt);
r.register(baubleBox);
r.register(dodgeRing);
r.register(invisibilityCloak);
r.register(cloudPendant);
r.register(superCloudPendant);
r.register(thirdEye);
r.register(astrolabe);
r.register(goddessCharm);
registerOreDictionary();
}
private static void registerOreDictionary() {
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
for(int i = 0; i < 16; i++) {
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
@@ -71,7 +71,7 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
super(mat, 0, type);
this.type = type;
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
}
@@ -61,7 +61,7 @@ public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem, IModel
public ItemLivingwoodBow(String name) {
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
setMaxDamage(500);
addPropertyOverride(new ResourceLocation("minecraft:pull"), (stack, worldIn, entityIn) -> {
@@ -58,7 +58,7 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
public ItemManasteelAxe(ToolMaterial mat, String name) {
super(mat, 8F, -3.1F);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
}
@@ -58,7 +58,7 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
public ItemManasteelPick(ToolMaterial mat, String name) {
super(mat);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
}
@@ -55,7 +55,7 @@ public class ItemManasteelShears extends ItemShears implements IManaUsingItem, I
public ItemManasteelShears(String name) {
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
}
@@ -58,7 +58,7 @@ public class ItemManasteelShovel extends ItemSpade implements IManaUsingItem, IS
public ItemManasteelShovel(ToolMaterial mat, String name) {
super(mat);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
}
@@ -48,7 +48,7 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem, IMo
public ItemManasteelSword(ToolMaterial mat, String name) {
super(mat);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
addPropertyOverride(new ResourceLocation("botania", "elucidator"),
(stack, worldIn, entityIn) -> "the elucidator".equals(stack.getDisplayName().toLowerCase().trim()) ? 1 : 0);
@@ -18,7 +18,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.client.lib.LibResources;
@@ -33,7 +32,7 @@ public class ItemModRecord extends ItemRecord implements IModelRegister {
public ItemModRecord(String record, SoundEvent sound, String name) {
super("botania:" + record, sound);
setCreativeTab(BotaniaCreativeTab.INSTANCE);
GameRegistry.register(this, new ResourceLocation(LibMisc.MOD_ID, name));
setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name));
setUnlocalizedName(name);
file = "botania:music." + record;
}
@@ -44,12 +43,6 @@ public class ItemModRecord extends ItemRecord implements IModelRegister {
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item\\.", "item." + LibResources.PREFIX_MOD);
}
@Nonnull
@Override
public ResourceLocation getRecordResource(String name) {
return new ResourceLocation(file);
}
@SideOnly(Side.CLIENT)
@Override
public void registerModels() {
@@ -30,12 +30,7 @@ import vazkii.botania.common.item.equipment.bauble.ItemBauble;
public abstract class ItemRelicBauble extends ItemBauble implements IRelic {
private final ItemRelic dummy = new ItemRelic("dummy") { // Delegate for relic stuff
@Override
protected boolean shouldRegister() {
return false;
}
};
private final ItemRelic dummy = new ItemRelic("dummy"); // Delegate for relic stuff
public ItemRelicBauble(String name) {
super(name);