Rename revision 2

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot
2011-09-15 17:36:27 +01:00
parent e75180213c
commit 61d656bf30
3 changed files with 12 additions and 12 deletions

View File

@@ -39,7 +39,7 @@
<dependency> <dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId> <artifactId>minecraft-server</artifactId>
<version>1.8_01</version> <version>1.8_02</version>
<type>jar</type> <type>jar</type>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

View File

@@ -41,7 +41,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
if (entity instanceof EntityPlayer && health == 0) { if (entity instanceof EntityPlayer && health == 0) {
((EntityPlayer) entity).die(DamageSource.j); ((EntityPlayer) entity).die(DamageSource.GENERIC);
} }
getHandle().health = health; getHandle().health = health;
@@ -176,16 +176,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
public void damage(int amount) { 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) { public void damage(int amount, org.bukkit.entity.Entity source) {
DamageSource reason = DamageSource.a.j; DamageSource reason = DamageSource.GENERIC;
if (source instanceof HumanEntity) { if (source instanceof HumanEntity) {
reason = DamageSource.b(((CraftHumanEntity)source).getHandle()); reason = DamageSource.playerAttack(((CraftHumanEntity)source).getHandle());
} else if (source instanceof LivingEntity) { } else if (source instanceof LivingEntity) {
reason = DamageSource.a(((CraftLivingEntity)source).getHandle()); reason = DamageSource.mobAttack(((CraftLivingEntity)source).getHandle());
} }
entity.damageEntity(reason, amount); entity.damageEntity(reason, amount);

View File

@@ -426,26 +426,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public float getExhaustion() { public float getExhaustion() {
return getHandle().V().c; return getHandle().getFoodData().exhaustionLevel;
} }
public void setExhaustion(float value) { public void setExhaustion(float value) {
getHandle().V().c = value; getHandle().getFoodData().exhaustionLevel = value;
} }
public float getSaturation() { public float getSaturation() {
return getHandle().V().b; return getHandle().getFoodData().saturationLevel;
} }
public void setSaturation(float value) { public void setSaturation(float value) {
getHandle().V().b = value; getHandle().getFoodData().saturationLevel = value;
} }
public int getFoodLevel() { public int getFoodLevel() {
return getHandle().V().a; return getHandle().getFoodData().foodLevel;
} }
public void setFoodLevel(int value) { public void setFoodLevel(int value) {
getHandle().V().a = value; getHandle().getFoodData().foodLevel = value;
} }
} }