mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 20:52:20 +00:00
I got mana in a bottle, in a bottle, in a bottle. Dunno where I'm going there.
This commit is contained in:
1 parent
b69c51771c
commit
6e055fffed
11 files changed
+81
No files matched your search
@@ -174,6 +174,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
|
||||
addItem(ModItems.manaTablet);
|
||||
addItem(ModItems.manaMirror);
|
||||
addItem(ModItems.manaBottle);
|
||||
addBlock(ModBlocks.pool);
|
||||
addBlock(ModBlocks.alchemyCatalyst);
|
||||
addBlock(ModBlocks.conjurationCatalyst);
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jun 27, 2014, 2:41:19 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemBottledMana extends ItemMod {
|
||||
|
||||
IIcon[] icons;
|
||||
|
||||
public ItemBottledMana() {
|
||||
setUnlocalizedName(LibItemNames.MANA_BOTTLE);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(6);
|
||||
}
|
||||
|
||||
public void randomEffect(EntityPlayer player) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
icons = new IIcon[6];
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forItem(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return icons[Math.min(icons.length - 1, par1)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
randomEffect(par3EntityPlayer);
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() + 1);
|
||||
|
||||
if(par1ItemStack.getItemDamage() == 6)
|
||||
return new ItemStack(Items.glass_bottle);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||
return EnumAction.drink;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -130,6 +130,7 @@ public final class ModItems {
|
||||
public static Item fireRod;
|
||||
public static Item vineBall;
|
||||
public static Item slingshot;
|
||||
public static Item manaBottle;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -202,6 +203,7 @@ public final class ModItems {
|
||||
fireRod = new ItemFireRod();
|
||||
vineBall = new ItemVineBall();
|
||||
slingshot = new ItemSlingshot();
|
||||
manaBottle = new ItemBottledMana();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -83,6 +83,7 @@ public final class LibItemNames {
|
||||
public static final String FIRE_ROD = "fireRod";
|
||||
public static final String VINE_BALL = "vineBall";
|
||||
public static final String SLINGSHOT = "slingshot";
|
||||
public static final String MANA_BOTTLE = "manaBottle";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -535,6 +535,7 @@ item.botania:tornadoRod.name=Rod of the Skies
|
||||
item.botania:fireRod.name=Rod of the Hells
|
||||
item.botania:vineBall.name=Vine Ball
|
||||
item.botania:slingshot.name=Livingwood Slingshot
|
||||
item.botania:manaBottle.name=Mana in a Bottle
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania, %s Edition's Index - Pick which category you would like to study:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Reference in new issue
Block a user