1 - 6 of 6
player.posX; // that's a double for the player's position
player.worldObj; // that's the World object
player.worldObj.rand; // there's your Random object
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
// parameters of PotionEffect are: id, amplifier, duration in ticks (20 = 1 second)
target.addPotionEffect(new PotionEffect(Potion.poison.id, 1, 60));
}
1 - 6 of 6
© 2010 - 2024
www.planetminecraft.com
By signing in, you agree to Planet Minecraft's Terms of Use and Privacy Policy.