mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 04:32:23 +00:00
Added the dirt rod, or Rod of the Lands.
This commit is contained in:
1 parent
9d7ce9f08b
commit
0c6f6e6c66
4 files changed
+28
-1
No files matched your search
@@ -123,7 +123,6 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
for(EntityItem entity : items) {
|
||||
ItemStack item = entity.getEntityItem();
|
||||
if(item.getItem() == Items.enchanted_book) {
|
||||
// XXX - This needs to be rewritten for the new book enchanting in 1.7
|
||||
NBTTagList enchants = Items.enchanted_book.func_92110_g(item);
|
||||
if(enchants != null && enchants.tagCount() > 0) {
|
||||
NBTTagCompound enchant = (NBTTagCompound) enchants.getCompoundTagAt(0);
|
||||
|
||||
@@ -11,15 +11,41 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.magic;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemDirtRod extends ItemMod {
|
||||
|
||||
private static final int COST = 75;
|
||||
|
||||
public ItemDirtRod() {
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.DIRT_ROD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
|
||||
if(ManaItemHandler.requestManaExact(par1ItemStack, par2EntityPlayer, COST, false)) {
|
||||
ItemStack stackToPlace = new ItemStack(Blocks.dirt);
|
||||
stackToPlace.tryPlaceItemIntoWorld(par2EntityPlayer, par3World, par4, par5, par6, par7, par8, par9, par10);
|
||||
|
||||
if(stackToPlace.stackSize == 0) {
|
||||
ManaItemHandler.requestManaExact(par1ItemStack, par2EntityPlayer, COST, true);
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(par7);
|
||||
for(int i = 0; i < 6; i++)
|
||||
Botania.proxy.sparkleFX(par3World, par4 + dir.offsetX + Math.random(), par5 + dir.offsetY + Math.random(), par6 + dir.offsetZ + Math.random(), 0.35F, 0.2F, 0.05F, 1F, 5);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.world.World;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
// TODO
|
||||
public class ItemTimeRod extends ItemMod {
|
||||
|
||||
public ItemTimeRod() {
|
||||
|
||||
@@ -257,6 +257,7 @@ item.botania:grassSeeds1.name=Boreal Seeds
|
||||
item.botania:grassSeeds2.name=Infection Seeds
|
||||
item.botania:livingwoodTwig.name=Livingwood Twig
|
||||
item.botania:timeRod.name=Rod of Flowing Time
|
||||
item.botania:dirtRod.name=Rod of the Lands
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania Index - Pick which category you would like to study:
|
||||
|
||||
Reference in new issue
Block a user