summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-12-29 20:14:13 +0100
committerErik Broes <erikbroes@grum.nl>2011-12-29 20:15:06 +0100
commitbcdad9f837846de5fd81468acf8b9b8c7526ef83 (patch)
treeac3d0083d6913036a92e9ca64fe19dd24fe3d7a6
parent60a2d1225058f6fe8123f182463e317a328b89a5 (diff)
downloadcraftbukkit-bcdad9f837846de5fd81468acf8b9b8c7526ef83.tar
craftbukkit-bcdad9f837846de5fd81468acf8b9b8c7526ef83.tar.gz
craftbukkit-bcdad9f837846de5fd81468acf8b9b8c7526ef83.tar.lz
craftbukkit-bcdad9f837846de5fd81468acf8b9b8c7526ef83.tar.xz
craftbukkit-bcdad9f837846de5fd81468acf8b9b8c7526ef83.zip
Fix snowball not recognizing int damage values properly from Craftbukkit -- Thanks Sleaker
-rw-r--r--src/main/java/net/minecraft/server/EntitySnowball.java4
1 files 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 4afb3f79..6c216782 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();