Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ActionResult<ItemStack> onItemRightClick(ItemStack item, World world, EntityPlayer user, EnumHand hand)
- {
- if(!world.isRemote){
- RayTraceResult pos = user.rayTrace(100, 20);
- double x = pos.getBlockPos().getX();
- double y = pos.getBlockPos().getY();
- double z = pos.getBlockPos().getZ();
- world.addWeatherEffect(new EntityLightningBolt(world, x, y, z, bFull3D));
- user.setHealth(13);
- return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, item);
- }
- else{
- return new ActionResult(EnumActionResult.FAIL, new ItemStack(this));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement