Very basic time rod stuff, some polish will be done later.

This commit is contained in:
Vasco Lavos committed 2014-04-10 19:10:29 +01:00
1 parent 4d526bb91c
commit aaca713653
6 files changed
+43

No files matched your search

@@ -0,0 +1,36 @@
/**
* 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 @ [Apr 10, 2014, 6:46:03 PM (GMT)]
*/
package vazkii.botania.common.item;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import vazkii.botania.common.lib.LibItemNames;
public class ItemTimeRod extends ItemMod {
public ItemTimeRod() {
super();
setMaxStackSize(1);
setUnlocalizedName(LibItemNames.TIME_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) {
Block block = par3World.getBlock(par4, par5, par6);
for(int i = 0; i < 60; i++)
par3World.scheduleBlockUpdate(par4, par5, par6, block, i);
return true;
}
}
@@ -34,6 +34,7 @@ public final class ModItems {
public static Item manaCookie;
public static Item fertilizer;
public static Item grassSeeds;
public static Item timeRod;
public static void init() {
lexicon = new ItemLexicon();
@@ -51,6 +52,7 @@ public final class ModItems {
manaCookie = new ItemManaCookie();
fertilizer = new ItemFertilizer();
grassSeeds = new ItemGrassSeeds();
timeRod = new ItemTimeRod();
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
for(int i = 0; i < 16; i++) {
@@ -30,6 +30,7 @@ public final class LibItemNames {
public static final String MANA_COOKIE = LibResources.PREFIX_MOD + "manaCookie";
public static final String FERTILIZER = LibResources.PREFIX_MOD + "fertilizer";
public static final String GRASS_SEEDS = LibResources.PREFIX_MOD + "grassSeeds";
public static final String TIME_ROD = LibResources.PREFIX_MOD + "timeRod";
public static final String[] LENS_NAMES = new String[] {
LibResources.PREFIX_MOD + "lensNormal",
+1
View File
@@ -254,6 +254,7 @@ item.botania:manaCookie.name=Mana Cookie
item.botania:fertilizer.name=Floral Fertilizer
item.botania:grassSeeds.name=Pasture Seeds
item.botania:livingwoodTwig.name=Livingwood Twig
item.botania:timeRod.name=Rod of Flowing Time
# GUI TEXT
botania.gui.lexicon.header=Lexica Botania Index - Pick which category you would like to study:
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@@ -0,0 +1,3 @@
{
"animation": { }
}