Advertisement
Guest User

ItemVacpack.java

a guest
Dec 4th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.43 KB | None | 0 0
  1. package com.basset.slimerancher.items;
  2.  
  3. import net.minecraft.client.renderer.block.model.ModelResourceLocation;
  4. import net.minecraft.creativetab.CreativeTabs;
  5. import net.minecraft.entity.EntityLivingBase;
  6. import net.minecraft.entity.player.EntityPlayer;
  7. import net.minecraft.item.ItemStack;
  8. import net.minecraft.util.ActionResult;
  9. import net.minecraft.util.EnumActionResult;
  10. import net.minecraft.util.EnumHand;
  11. import net.minecraft.world.World;
  12. import net.minecraftforge.client.model.ModelLoader;
  13.  
  14. public class ItemVacpack extends SlimeRancherItem {
  15.     public ItemVacpack() {
  16.         super("vacpack", CreativeTabs.TOOLS, 1);
  17.     }
  18.    
  19.     @Override
  20.     public void registerRender() {
  21.         ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(this.getRegistryName(), "inventory"));
  22.     }
  23.    
  24.  
  25.     /**
  26.      * Called when the equipped item is right clicked.
  27.      */
  28.     @Override
  29.     public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
  30.         return new ActionResult<ItemStack>(EnumActionResult.PASS, playerIn.getHeldItem(handIn));
  31.     }
  32.     /**
  33.      * Called each tick while using an item.
  34.      * @param stack The Item being used
  35.      * @param player The Player using the item
  36.      * @param count The amount of time in tick the item has been used for continuously
  37.      */
  38.     @Override
  39.     public void onUsingTick(ItemStack stack, EntityLivingBase player, int count)
  40.     {
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement