diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-15 17:36:27 +0100 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-09-15 17:39:17 +0100 |
commit | 2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb (patch) | |
tree | 412002b4ee8104908e0d71a996500ae188860ad4 /src/main/java/org/bukkit | |
parent | 3c5632de31b923c8eaefae130f042a4d24566881 (diff) | |
download | craftbukkit-2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb.tar craftbukkit-2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb.tar.gz craftbukkit-2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb.tar.lz craftbukkit-2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb.tar.xz craftbukkit-2b5a61f03d135a3f4e82bc6f4b2b8ea47abd5dcb.zip |
Rename revision 2
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 10 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 9c1cc854..63e1d1b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -41,7 +41,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } if (entity instanceof EntityPlayer && health == 0) { - ((EntityPlayer) entity).die(DamageSource.j); + ((EntityPlayer) entity).die(DamageSource.GENERIC); } getHandle().health = health; @@ -176,16 +176,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } public void damage(int amount) { - entity.damageEntity(DamageSource.j, amount); + entity.damageEntity(DamageSource.GENERIC, amount); } public void damage(int amount, org.bukkit.entity.Entity source) { - DamageSource reason = DamageSource.a.j; + DamageSource reason = DamageSource.GENERIC; if (source instanceof HumanEntity) { - reason = DamageSource.b(((CraftHumanEntity)source).getHandle()); + reason = DamageSource.playerAttack(((CraftHumanEntity)source).getHandle()); } else if (source instanceof LivingEntity) { - reason = DamageSource.a(((CraftLivingEntity)source).getHandle()); + reason = DamageSource.mobAttack(((CraftLivingEntity)source).getHandle()); } entity.damageEntity(reason, amount); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 0be60026..5fe614fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -426,26 +426,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public float getExhaustion() { - return getHandle().V().c; + return getHandle().getFoodData().exhaustionLevel; } public void setExhaustion(float value) { - getHandle().V().c = value; + getHandle().getFoodData().exhaustionLevel = value; } public float getSaturation() { - return getHandle().V().b; + return getHandle().getFoodData().saturationLevel; } public void setSaturation(float value) { - getHandle().V().b = value; + getHandle().getFoodData().saturationLevel = value; } public int getFoodLevel() { - return getHandle().V().a; + return getHandle().getFoodData().foodLevel; } public void setFoodLevel(int value) { - getHandle().V().a = value; + getHandle().getFoodData().foodLevel = value; } } |