Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn) {
- ItemStack itemStack = playerIn.getHeldItem(handIn);
- CompoundNBT nbt = itemStack.getOrCreateTag();
- if(!worldIn.isRemote) {
- // EntityPukeBall ball = new EntityPukeBall(EntityType.SNOWBALL, );
- //EntityPukeBall ball = new EntityPukeBall(ModThings.ENTITY_PUKEBALL, playerIn, worldIn);
- //ball.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0F, 1.5F, 1.0F);
- //worldIn.addEntity(ball);
- SnowballEntity entity = new SnowballEntity(EntityType.SNOWBALL, worldIn);
- entity.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0F, 1.5F, 1.0F);
- worldIn.addEntity(entity);
- }
- return ActionResult.newResult(ActionResultType.SUCCESS, itemStack);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement