Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.theishiopian.usefulpotionarrows;
- import net.minecraft.entity.projectile.EntityArrow;
- import net.minecraft.entity.projectile.EntityTippedArrow;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.world.World;
- import net.minecraftforge.event.entity.ProjectileImpactEvent;
- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
- public class DamageNullifier
- {
- @SubscribeEvent
- public void Nullifier(ProjectileImpactEvent.Arrow event)
- {
- EntityArrow arrow = event.getArrow();
- World world = arrow.getEntityWorld();
- if(!world.isRemote && arrow instanceof EntityTippedArrow)
- {
- NBTTagCompound arrowTag = new NBTTagCompound();
- arrow.readEntityFromNBT(arrowTag);
- System.out.println(arrowTag);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment