From bcdad9f837846de5fd81468acf8b9b8c7526ef83 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Thu, 29 Dec 2011 20:14:13 +0100 Subject: [PATCH] Fix snowball not recognizing int damage values properly from Craftbukkit -- Thanks Sleaker --- src/main/java/net/minecraft/server/EntitySnowball.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java index 4afb3f79e3..6c216782e1 100644 --- a/src/main/java/net/minecraft/server/EntitySnowball.java +++ b/src/main/java/net/minecraft/server/EntitySnowball.java @@ -24,7 +24,7 @@ public class EntitySnowball extends EntityProjectile { protected void a(MovingObjectPosition movingobjectposition) { if (movingobjectposition.entity != null) { - byte b0 = 0; + int b0 = 0; //Craftbukkit - byte -> int if (movingobjectposition.entity instanceof EntityBlaze) { b0 = 3; @@ -41,7 +41,7 @@ public class EntitySnowball extends EntityProjectile { EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, b0); Bukkit.getPluginManager().callEvent(event); this.shooter = (projectile.getShooter() == null) ? null : ((CraftLivingEntity) projectile.getShooter()).getHandle(); - b0 = (byte) event.getDamage(); + b0 = event.getDamage(); if (event.isCancelled()) { stick = !projectile.doesBounce();