Skip to content

Instantly share code, notes, and snippets.

@0xilly
Created September 1, 2014 22:16
Show Gist options
  • Save 0xilly/780fd0c714357935fdec to your computer and use it in GitHub Desktop.
Save 0xilly/780fd0c714357935fdec to your computer and use it in GitHub Desktop.
package com.newlinegaming.Runix.item.rods;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import com.newlinegaming.Runix.RunixMain;
public class ItemTransmutationRod extends Item {
public ItemTransmutationRod() {
super();
setCreativeTab(RunixMain.TabRunix);
setUnlocalizedName("runix:transmutationrod");
}
@Override
public void onCreated(ItemStack is, World world, EntityPlayer player) {
is.stackTagCompound = new NBTTagCompound();
is.stackTagCompound.setInteger("Energy", 0);
}
@Override
public ItemStack onItemRightClick(ItemStack is, World world, EntityPlayer player) {
if (is.stackTagCompound != null) {
//HitBlock
//if mode == eat consume block
//if mode == Transmute transmute block
//if mode == Rinic activator activate rune
}
return is;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment