SHARE
TWEET

Untitled

a guest Dec 14th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  @Override
  2.     public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) {
  3.         ItemStack itemStack = playerIn.getHeldItem(handIn);
  4.         CompoundNBT nbt = itemStack.getOrCreateTag();
  5.         if(!worldIn.isRemote) {
  6.            // EntityPukeBall ball = new EntityPukeBall(EntityType.SNOWBALL, );
  7.             //EntityPukeBall ball = new EntityPukeBall(ModThings.ENTITY_PUKEBALL, playerIn, worldIn);
  8.             //ball.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0F, 1.5F, 1.0F);
  9.             //worldIn.addEntity(ball);
  10.             SnowballEntity entity = new SnowballEntity(EntityType.SNOWBALL, worldIn);
  11.             entity.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0F, 1.5F, 1.0F);
  12.             worldIn.addEntity(entity);
  13.         }
  14.         return ActionResult.newResult(ActionResultType.SUCCESS, itemStack);
  15.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top