@Override public ItemStack addMeta(int meta, String name) { if(!values.containsKey(meta)) { throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an amount paired with it with this implementation"); } return super.addMeta(meta, name); } }
searedBrick = materials.addMeta(0, "seared_brick"); mudBrick = materials.addMeta(1, "mud_brick"); nuggetCobalt = nuggets.addMeta(0, "cobalt"); ingotCobalt = ingots.addMeta(0, "cobalt"); nuggetArdite = nuggets.addMeta(1, "ardite"); ingotArdite = ingots.addMeta(1, "ardite"); nuggetManyullyn = nuggets.addMeta(2, "manyullyn"); ingotManyullyn = ingots.addMeta(2, "manyullyn"); nuggetPigIron = nuggets.addMeta(4, "pigiron"); ingotPigIron = ingots.addMeta(4, "pigiron"); nuggetAlubrass = nuggets.addMeta(5, "alubrass"); ingotAlubrass = ingots.addMeta(5, "alubrass"); matSlimeCrystalGreen = materials.addMeta(9, "slimecrystal_green"); matSlimeCrystalBlue = materials.addMeta(10, "slimecrystal_blue"); matSlimeCrystalMagma = materials.addMeta(11, "slimecrystal_magma"); matExpanderW = materials.addMeta(12, "expander_w"); matExpanderH = materials.addMeta(13, "expander_h"); matReinforcement = materials.addMeta(14, "reinforcement"); matSilkyCloth = materials.addMeta(15, "silky_cloth"); matSilkyJewel = materials.addMeta(16, "silky_jewel"); matNecroticBone = materials.addMeta(17, "necrotic_bone");
@Override public ItemStack addMeta(int meta, String name) { if (!this.states.containsKey(meta)) { throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an amount paired with it with this implementation"); } return super.addMeta(meta, name); }
@Override public ItemStack addMeta(int meta, String name) { if (!this.states.containsKey(meta)) { throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an state paired with it with this implementation"); } return super.addMeta(meta, name); }
@Override public ItemStack addMeta(int meta, String name) { if (!this.states.containsKey(meta)) { throw new RuntimeException("Usage of wrong function. Use the addMeta function that has an state paired with it with this implementation"); } return super.addMeta(meta, name); }
/** * Add a new food type! * * @param meta Metadata to use, has to be free * @param food How much food it restores on eating * @param saturation Saturation multiplier on the food * @param name Unlocalized postfix * @param alwaysEdible Item is always edible even when hunger is full * @param effects PotionEffects that will be applied on eating. The PotionEffect passed will be directly applied * @return Itemstack containing the registered item */ public ItemStack addFood(int meta, int food, float saturation, String name, boolean alwaysEdible, PotionEffect... effects) { dynamic.addMeta(meta, name); foodLevels.put(meta, food); saturations.put(meta, saturation); potionEffects.put(meta, effects); this.alwaysEdible.set(meta, alwaysEdible); return new ItemStack(this, 1, meta); }
barley = materials.addMeta(0, "barley"); barleyFlour = materials.addMeta(1, "barley_flour"); wheatFlour = materials.addMeta(2, "wheat_flour"); cotton = materials.addMeta(3, "cotton"); sulfurPowder = materials.addMeta(4, "sulfur_powder"); ghostwoodFletching = materials.addMeta(5, "ghostwood_fletching"); blueDye = materials.addMeta(8, "blue_dye"); impLeather = materials.addMeta(6, "imp_leather"); flameString = materials.addMeta(7, "flame_string"); ghostwood_emptybowl = empty_bowls.addMeta(0, "ghostwood_bowl"); bloodwood_emptybowl = empty_bowls.addMeta(1, "bloodwood_bowl"); darkwood_emptybowl = empty_bowls.addMeta(2, "darkwood_bowl"); fusewood_emptybowl = empty_bowls.addMeta(3, "fusewood_bowl"); maple_stick = sticks.addMeta(0, "maple_stick"); silverbell_stick = sticks.addMeta(1, "silverbell_stick"); amaranth_stick = sticks.addMeta(2, "amaranth_stick"); tiger_stick = sticks.addMeta(3, "tiger_stick"); willow_stick = sticks.addMeta(4, "willow_stick"); eucalyptus_stick = sticks.addMeta(5, "eucalyptus_stick"); hopseed_stick = sticks.addMeta(6, "hopseed_stick"); sakura_stick = sticks.addMeta(7, "sakura_stick"); redwood_stick = sticks.addMeta(8, "redwood_stick"); ghostwood_stick = sticks.addMeta(9, "ghostwood_stick"); darkwood_stick = sticks.addMeta(10, "darkwood_stick"); fusewood_stick = sticks.addMeta(11, "fusewood_stick");