Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onUpdate(ItemStack stack, World world,
- Entity ent, int par4, boolean par5) {
- if (!stack.hasTagCompound()) {
- stack.setTagCompound(new NBTTagCompound());
- }
- if (!stack.getTagCompound().hasKey("SubItemName")) {
- switch (stack.getItemDamage()) {
- case 0:
- stack.getTagCompound().setString("SubItemName", "kilo");
- case 1:
- stack.getTagCompound().setString("SubItemName", "mega");
- case 2:
- stack.getTagCompound().setString("SubItemName", "giga");
- case 3:
- stack.getTagCompound().setString("SubItemName", "tera");
- default:
- stack.getTagCompound().setString("SubItemName", "kilo");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement