mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Added the Hand of Ender.
This commit is contained in:
1 parent
26f15b4ad1
commit
38dd74bc20
5 files changed
+59
-1
No files matched your search
@@ -78,6 +78,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.forestDrum);
|
||||
addBlock(ModBlocks.forestEye);
|
||||
addBlock(ModBlocks.enderEye);
|
||||
addItem(ModItems.enderHand);
|
||||
addItem(ModItems.spawnerMover);
|
||||
addBlock(ModBlocks.spawnerClaw);
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 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 @ [Jul 31, 2014, 7:19:26 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemEnderHand extends ItemMod {
|
||||
|
||||
private static final int COST_SELF = 250;
|
||||
private static final int COST_OTHER = 5000;
|
||||
|
||||
public ItemEnderHand() {
|
||||
setMaxDamage(1);
|
||||
setUnlocalizedName(LibItemNames.ENDER_HAND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(ManaItemHandler.requestManaExact(stack, player, COST_SELF, false)) {
|
||||
player.displayGUIChest(player.getInventoryEnderChest());
|
||||
ManaItemHandler.requestManaExact(stack, player, COST_SELF, true);
|
||||
world.playSoundAtEntity(player, "mob.endermen.portal", 1F, 1F);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer iplayer, EntityLivingBase entity) {
|
||||
if(entity instanceof EntityPlayer && ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, false)) {
|
||||
iplayer.displayGUIChest(((EntityPlayer) entity).getInventoryEnderChest());
|
||||
ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, true);
|
||||
iplayer.worldObj.playSoundAtEntity(iplayer, "mob.endermen.portal", 1F, 1F);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -146,6 +146,7 @@ public final class ModItems {
|
||||
public static Item skyDirtRod;
|
||||
public static Item itemFinder;
|
||||
public static Item superLavaPendant;
|
||||
public static Item enderHand;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -228,7 +229,8 @@ public final class ModItems {
|
||||
skyDirtRod = new ItemSkyDirtRod();
|
||||
itemFinder = new ItemItemFinder();
|
||||
superLavaPendant = new ItemSuperLavaPendant();
|
||||
|
||||
enderHand = new ItemEnderHand();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
@@ -93,6 +93,7 @@ public final class LibItemNames {
|
||||
public static final String ELEMENTIUM_HELM_R = "elementiumHelmReveal";
|
||||
public static final String ITEM_FINDER = "itemFinder";
|
||||
public static final String SUPER_LAVA_PENDANT = "superLavaPendant";
|
||||
public static final String ENDER_HAND = "enderHand";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -655,6 +655,7 @@ item.botania:terrasteelHelmReveal.name=Terrasteel Helmet of Revealing
|
||||
item.botania:elementiumHelmReveal.name=Elementium Helmet of Revealing
|
||||
item.botania:itemFinder.name=The Spectator
|
||||
item.botania:superLavaPendant.name=Crimson Pendant
|
||||
item.botania:enderHand.name=Hand of Ender
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania, %s Edition's Index - Pick which category you would like to study:
|
||||
|
||||
Reference in new issue
Block a user