Rename revision 2
Dieser Commit ist enthalten in:
Ursprung
3c5632de31
Commit
2b5a61f03d
2
pom.xml
2
pom.xml
@ -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>
|
||||||
|
@ -90,12 +90,12 @@ public class BlockCactus extends Block {
|
|||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
entity.damageEntity(DamageSource.g, event.getDamage());
|
entity.damageEntity(DamageSource.CACTUS, event.getDamage());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
entity.damageEntity(DamageSource.g, 1);
|
entity.damageEntity(DamageSource.CACTUS, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -268,10 +268,10 @@ public abstract class Entity {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
this.damageEntity(DamageSource.b, event.getDamage());
|
this.damageEntity(DamageSource.BURN, event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.damageEntity(DamageSource.b, 1);
|
this.damageEntity(DamageSource.BURN, 1);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@ -310,7 +310,7 @@ public abstract class Entity {
|
|||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
this.damageEntity(DamageSource.c, event.getDamage());
|
this.damageEntity(DamageSource.LAVA, event.getDamage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.fireTicks <= 0) {
|
if (this.fireTicks <= 0) {
|
||||||
@ -329,7 +329,7 @@ public abstract class Entity {
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.damageEntity(DamageSource.c, 4);
|
this.damageEntity(DamageSource.LAVA, 4);
|
||||||
this.fireTicks = 600;
|
this.fireTicks = 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -668,7 +668,7 @@ public abstract class Entity {
|
|||||||
i = event.getDamage();
|
i = event.getDamage();
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.damageEntity(DamageSource.a, i);
|
this.damageEntity(DamageSource.FIRE, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,10 +196,10 @@ public class EntityArrow extends Entity {
|
|||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
} else {
|
} else {
|
||||||
// this function returns if the arrow should stick in or not, i.e. !bounce
|
// this function returns if the arrow should stick in or not, i.e. !bounce
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this), event.getDamage());
|
stick = movingobjectposition.entity.damageEntity(DamageSource.arrow(this, this.shooter), event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this.shooter), 4);
|
stick = movingobjectposition.entity.damageEntity(DamageSource.arrow(this, this.shooter), 4);
|
||||||
}
|
}
|
||||||
if (stick) {
|
if (stick) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -93,7 +93,7 @@ public class EntityBoat extends Entity {
|
|||||||
if (!this.world.isStatic && !this.dead) {
|
if (!this.world.isStatic && !this.dead) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||||
org.bukkit.entity.Entity attacker = (damagesource.a() == null) ? null : damagesource.a().getBukkitEntity();
|
org.bukkit.entity.Entity attacker = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
|
||||||
|
|
||||||
VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, i);
|
VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, i);
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
@ -85,7 +85,7 @@ public class EntityCreeper extends EntityMonster {
|
|||||||
|
|
||||||
public void die(DamageSource damagesource) {
|
public void die(DamageSource damagesource) {
|
||||||
super.die(damagesource);
|
super.die(damagesource);
|
||||||
if (damagesource.a() instanceof EntitySkeleton) {
|
if (damagesource.getEntity() instanceof EntitySkeleton) {
|
||||||
this.b(Item.GOLD_RECORD.id + this.random.nextInt(2), 1);
|
this.b(Item.GOLD_RECORD.id + this.random.nextInt(2), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,10 +168,10 @@ public class EntityEgg extends Entity {
|
|||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
} else {
|
} else {
|
||||||
// this function returns if the egg should stick in or not, i.e. !bounce
|
// this function returns if the egg should stick in or not, i.e. !bounce
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this), event.getDamage());
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.thrower), event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this.thrower), 0);
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.thrower), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stick) {
|
if (stick) {
|
||||||
|
@ -100,7 +100,7 @@ public class EntityExperienceOrb extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void burn(int i) {
|
protected void burn(int i) {
|
||||||
this.damageEntity(DamageSource.a, i);
|
this.damageEntity(DamageSource.FIRE, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
|
@ -150,10 +150,10 @@ public class EntityFireball extends Entity {
|
|||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
} else {
|
} else {
|
||||||
// this function returns if the fireball should stick in or not, i.e. !bounce
|
// this function returns if the fireball should stick in or not, i.e. !bounce
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this), event.getDamage());
|
stick = movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this.shooter), 0);
|
stick = movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 0);
|
||||||
}
|
}
|
||||||
if (stick) {
|
if (stick) {
|
||||||
;
|
;
|
||||||
@ -244,8 +244,8 @@ public class EntityFireball extends Entity {
|
|||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
this.aq();
|
this.aq();
|
||||||
if (damagesource.a() != null) {
|
if (damagesource.getEntity() != null) {
|
||||||
Vec3D vec3d = damagesource.a().ai();
|
Vec3D vec3d = damagesource.getEntity().ai();
|
||||||
|
|
||||||
if (vec3d != null) {
|
if (vec3d != null) {
|
||||||
this.motX = vec3d.a;
|
this.motX = vec3d.a;
|
||||||
|
@ -204,10 +204,10 @@ public class EntityFish extends Entity {
|
|||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
} else {
|
} else {
|
||||||
// this function returns if the fish should stick in or not, i.e. !bounce
|
// this function returns if the fish should stick in or not, i.e. !bounce
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a((Entity) this, this), event.getDamage());
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile((Entity) this, this.owner), event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a((Entity) this, this.owner), 0);
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile((Entity) this, this.owner), 0);
|
||||||
}
|
}
|
||||||
if (!stick) {
|
if (!stick) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
@ -22,7 +22,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
public InventoryPlayer inventory = new InventoryPlayer(this);
|
public InventoryPlayer inventory = new InventoryPlayer(this);
|
||||||
public Container defaultContainer;
|
public Container defaultContainer;
|
||||||
public Container activeContainer;
|
public Container activeContainer;
|
||||||
protected FoodMetaData m = new FoodMetaData();
|
protected FoodMetaData foodData = new FoodMetaData();
|
||||||
protected int n = 0;
|
protected int n = 0;
|
||||||
public byte o = 0;
|
public byte o = 0;
|
||||||
public int p = 0;
|
public int p = 0;
|
||||||
@ -53,7 +53,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
public int H = 20;
|
public int H = 20;
|
||||||
protected boolean I = false;
|
protected boolean I = false;
|
||||||
public float J;
|
public float J;
|
||||||
public PlayerAbilities K = new PlayerAbilities();
|
public PlayerAbilities abilities = new PlayerAbilities();
|
||||||
public int exp;
|
public int exp;
|
||||||
public int expLevel;
|
public int expLevel;
|
||||||
public int expTotal;
|
public int expTotal;
|
||||||
@ -156,13 +156,13 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
this.activeContainer = this.defaultContainer;
|
this.activeContainer = this.defaultContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.K.b) {
|
if (this.abilities.isFlying) {
|
||||||
for (int i = 0; i < 8; ++i) {
|
for (int i = 0; i < 8; ++i) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.fireTicks > 0 && this.K.a) {
|
if (this.fireTicks > 0 && this.abilities.isInvulnerable) {
|
||||||
this.fireTicks = 0;
|
this.fireTicks = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
this.m.a(this);
|
this.foodData.a(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -484,7 +484,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
this.b = new ChunkCoordinates(nbttagcompound.e("SpawnX"), nbttagcompound.e("SpawnY"), nbttagcompound.e("SpawnZ"));
|
this.b = new ChunkCoordinates(nbttagcompound.e("SpawnX"), nbttagcompound.e("SpawnY"), nbttagcompound.e("SpawnZ"));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.m.a(nbttagcompound);
|
this.foodData.a(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(NBTTagCompound nbttagcompound) {
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
@ -502,7 +502,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
nbttagcompound.a("SpawnZ", this.b.z);
|
nbttagcompound.a("SpawnZ", this.b.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.m.b(nbttagcompound);
|
this.foodData.b(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(IInventory iinventory) {}
|
public void a(IInventory iinventory) {}
|
||||||
@ -520,7 +520,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
if (this.K.a && !damagesource.d()) {
|
if (this.abilities.isInvulnerable && !damagesource.ignoresInvulnerability()) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.aO = 0;
|
this.aO = 0;
|
||||||
@ -531,7 +531,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
this.a(true, true, false);
|
this.a(true, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (entity instanceof EntityMonster || entity instanceof EntityArrow) {
|
if (entity instanceof EntityMonster || entity instanceof EntityArrow) {
|
||||||
if (this.world.spawnMonsters == 0) {
|
if (this.world.spawnMonsters == 0) {
|
||||||
@ -634,11 +634,11 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void b(DamageSource damagesource, int i) {
|
protected void b(DamageSource damagesource, int i) {
|
||||||
if (!damagesource.b() && this.G()) {
|
if (!damagesource.ignoresArmor() && this.G()) {
|
||||||
i = 1 + i >> 1;
|
i = 1 + i >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!damagesource.b()) {
|
if (!damagesource.ignoresArmor()) {
|
||||||
int j = 25 - this.inventory.i();
|
int j = 25 - this.inventory.i();
|
||||||
int k = i * j + this.f;
|
int k = i * j + this.f;
|
||||||
|
|
||||||
@ -717,7 +717,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
boolean flag1 = entity.damageEntity(DamageSource.b(this), i);
|
boolean flag1 = entity.damageEntity(DamageSource.playerAttack(this), i);
|
||||||
|
|
||||||
// CraftBukkit start - Return when the damage fails so that the item will not lose durability
|
// CraftBukkit start - Return when the damage fails so that the item will not lose durability
|
||||||
if (!flag1) {
|
if (!flag1) {
|
||||||
@ -985,7 +985,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
double d1 = this.locY;
|
double d1 = this.locY;
|
||||||
double d2 = this.locZ;
|
double d2 = this.locZ;
|
||||||
|
|
||||||
if (this.K.b) {
|
if (this.abilities.isFlying) {
|
||||||
double d3 = this.motY;
|
double d3 = this.motY;
|
||||||
float f2 = this.ak;
|
float f2 = this.ak;
|
||||||
|
|
||||||
@ -1061,7 +1061,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void a(float f) {
|
protected void a(float f) {
|
||||||
if (!this.K.c) {
|
if (!this.abilities.canFly) {
|
||||||
if (f >= 2.0F) {
|
if (f >= 2.0F) {
|
||||||
this.a(StatisticList.n, (int) Math.round((double) f * 100.0D));
|
this.a(StatisticList.n, (int) Math.round((double) f * 100.0D));
|
||||||
}
|
}
|
||||||
@ -1103,19 +1103,19 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void b(float f) {
|
public void b(float f) {
|
||||||
if (!this.K.a) {
|
if (!this.abilities.isInvulnerable) {
|
||||||
if (!this.world.isStatic) {
|
if (!this.world.isStatic) {
|
||||||
this.m.a(f);
|
this.foodData.a(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public FoodMetaData V() {
|
public FoodMetaData getFoodData() {
|
||||||
return this.m;
|
return this.foodData;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean c(boolean flag) {
|
public boolean c(boolean flag) {
|
||||||
return (flag || this.m.b()) && !this.K.a;
|
return (flag || this.foodData.b()) && !this.abilities.isInvulnerable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean W() {
|
public boolean W() {
|
||||||
|
@ -92,7 +92,7 @@ public class EntityItem extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void burn(int i) {
|
protected void burn(int i) {
|
||||||
this.damageEntity(DamageSource.a, i);
|
this.damageEntity(DamageSource.FIRE, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
|
@ -133,7 +133,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
this.damageEntity(DamageSource.d, event.getDamage());
|
this.damageEntity(DamageSource.STUCK, event.getDamage());
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled() && event.getDamage() != 0) {
|
if (!event.isCancelled() && event.getDamage() != 0) {
|
||||||
this.damageEntity(DamageSource.e, event.getDamage());
|
this.damageEntity(DamageSource.DROWN, event.getDamage());
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
@ -412,7 +412,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.ar = 0.0F;
|
this.ar = 0.0F;
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
@ -499,7 +499,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void die(DamageSource damagesource) {
|
public void die(DamageSource damagesource) {
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (this.ag >= 0 && entity != null) {
|
if (this.ag >= 0 && entity != null) {
|
||||||
entity.b(this, this.ag);
|
entity.b(this, this.ag);
|
||||||
@ -553,7 +553,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled() && event.getDamage() != 0) {
|
if (!event.isCancelled() && event.getDamage() != 0) {
|
||||||
this.damageEntity(DamageSource.h, event.getDamage());
|
this.damageEntity(DamageSource.FALL, event.getDamage());
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -973,7 +973,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.damageEntity(DamageSource.i, event.getDamage());
|
this.damageEntity(DamageSource.OUT_OF_WORLD, event.getDamage());
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
|||||||
if (!this.world.isStatic && !this.dead) {
|
if (!this.world.isStatic && !this.dead) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||||
org.bukkit.entity.Entity passenger = (damagesource.a() == null) ? null : damagesource.a().getBukkitEntity();
|
org.bukkit.entity.Entity passenger = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
|
||||||
|
|
||||||
VehicleDamageEvent event = new VehicleDamageEvent(vehicle, passenger, i);
|
VehicleDamageEvent event = new VehicleDamageEvent(vehicle, passenger, i);
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
@ -42,7 +42,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
|||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
if (super.damageEntity(damagesource, i)) {
|
if (super.damageEntity(damagesource, i)) {
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (this.passenger != entity && this.vehicle != entity) {
|
if (this.passenger != entity && this.vehicle != entity) {
|
||||||
if (entity != this) {
|
if (entity != this) {
|
||||||
@ -82,14 +82,14 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
return entity.damageEntity(DamageSource.a(this), event.getDamage());
|
return entity.damageEntity(DamageSource.mobAttack(this), event.getDamage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
return entity.damageEntity(DamageSource.a((EntityLiving) this), this.damage);
|
return entity.damageEntity(DamageSource.mobAttack((EntityLiving) this), this.damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void a(Entity entity, float f) {
|
protected void a(Entity entity, float f) {
|
||||||
|
@ -201,7 +201,7 @@ public class EntityPainting extends Entity {
|
|||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
if (!this.dead && !this.world.isStatic) {
|
if (!this.dead && !this.world.isStatic) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
PaintingBreakByEntityEvent event = new PaintingBreakByEntityEvent((org.bukkit.entity.Painting) this.getBukkitEntity(), damagesource.a() == null ? null : damagesource.a().getBukkitEntity());
|
PaintingBreakByEntityEvent event = new PaintingBreakByEntityEvent((org.bukkit.entity.Painting) this.getBukkitEntity(), damagesource.getEntity() == null ? null : damagesource.getEntity().getBukkitEntity());
|
||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
@ -53,7 +53,7 @@ public class EntityPigZombie extends EntityZombie {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
List list = this.world.b((Entity) this, this.boundingBox.b(32.0D, 32.0D, 32.0D));
|
List list = this.world.b((Entity) this, this.boundingBox.b(32.0D, 32.0D, 32.0D));
|
||||||
|
@ -99,7 +99,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
this.itemInWorldManager = new ItemInWorldManager((WorldServer) world);
|
this.itemInWorldManager = new ItemInWorldManager((WorldServer) world);
|
||||||
this.itemInWorldManager.player = this;
|
this.itemInWorldManager.player = this;
|
||||||
this.itemInWorldManager.a(oldMode);
|
this.itemInWorldManager.a(oldMode);
|
||||||
this.m = new FoodMetaData();
|
this.foodData = new FoodMetaData();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void die(DamageSource damagesource) {
|
public void die(DamageSource damagesource) {
|
||||||
this.b.serverConfigurationManager.sendAll(new Packet3Chat(damagesource.a((EntityHuman) this)));
|
this.b.serverConfigurationManager.sendAll(new Packet3Chat(damagesource.a(this)));
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
|
java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
} else {
|
} else {
|
||||||
// CraftBukkit - this.b.pvpMode -> this.world.pvpMode
|
// CraftBukkit - this.b.pvpMode -> this.world.pvpMode
|
||||||
if (!this.world.pvpMode && damagesource instanceof EntityDamageSource) {
|
if (!this.world.pvpMode && damagesource instanceof EntityDamageSource) {
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
return false;
|
return false;
|
||||||
@ -300,11 +300,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
--this.H;
|
--this.H;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.health != this.cb || this.cc != this.m.a() || this.m.c() == 0.0F != this.cd) {
|
if (this.health != this.cb || this.cc != this.foodData.a() || this.foodData.c() == 0.0F != this.cd) {
|
||||||
this.netServerHandler.sendPacket(new Packet8UpdateHealth(this.health, this.m.a(), this.m.c()));
|
this.netServerHandler.sendPacket(new Packet8UpdateHealth(this.health, this.foodData.a(), this.foodData.c()));
|
||||||
this.cb = this.health;
|
this.cb = this.health;
|
||||||
this.cc = this.m.a();
|
this.cc = this.foodData.a();
|
||||||
this.cd = this.m.c() == 0.0F;
|
this.cd = this.foodData.c() == 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.expTotal != this.ce) {
|
if (this.expTotal != this.ce) {
|
||||||
|
@ -32,8 +32,8 @@ public class EntitySkeleton extends EntityMonster {
|
|||||||
|
|
||||||
public void die(DamageSource damagesource) {
|
public void die(DamageSource damagesource) {
|
||||||
super.die(damagesource);
|
super.die(damagesource);
|
||||||
if (damagesource.e() instanceof EntityArrow && damagesource.a() instanceof EntityHuman) {
|
if (damagesource.e() instanceof EntityArrow && damagesource.getEntity() instanceof EntityHuman) {
|
||||||
EntityHuman entityhuman = (EntityHuman) damagesource.a();
|
EntityHuman entityhuman = (EntityHuman) damagesource.getEntity();
|
||||||
double d0 = entityhuman.locX - this.locX;
|
double d0 = entityhuman.locX - this.locX;
|
||||||
double d1 = entityhuman.locZ - this.locZ;
|
double d1 = entityhuman.locZ - this.locZ;
|
||||||
|
|
||||||
|
@ -167,10 +167,10 @@ public class EntitySnowball extends Entity {
|
|||||||
stick = !projectile.doesBounce();
|
stick = !projectile.doesBounce();
|
||||||
} else {
|
} else {
|
||||||
// this function returns if the snowball should stick in or not, i.e. !bounce
|
// this function returns if the snowball should stick in or not, i.e. !bounce
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this), event.getDamage());
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.shooter), event.getDamage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
stick = movingobjectposition.entity.damageEntity(DamageSource.a(this, this.shooter), 0);
|
stick = movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.shooter), 0);
|
||||||
}
|
}
|
||||||
if (stick) {
|
if (stick) {
|
||||||
;
|
;
|
||||||
|
@ -237,7 +237,7 @@ public class EntityWolf extends EntityAnimal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||||
Entity entity = damagesource.a();
|
Entity entity = damagesource.getEntity();
|
||||||
|
|
||||||
this.setSitting(false);
|
this.setSitting(false);
|
||||||
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
|
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
|
||||||
@ -345,7 +345,7 @@ public class EntityWolf extends EntityAnimal {
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
entity.damageEntity(DamageSource.a((EntityLiving) this), b0);
|
entity.damageEntity(DamageSource.mobAttack(this), b0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ public class Explosion {
|
|||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
entity.damageEntity(DamageSource.k, event.getDamage());
|
entity.damageEntity(DamageSource.EXPLOSION, event.getDamage());
|
||||||
entity.motX += d0 * d10;
|
entity.motX += d0 * d10;
|
||||||
entity.motY += d1 * d10;
|
entity.motY += d1 * d10;
|
||||||
entity.motZ += d2 * d10;
|
entity.motZ += d2 * d10;
|
||||||
@ -140,7 +140,7 @@ public class Explosion {
|
|||||||
server.getPluginManager().callEvent(event);
|
server.getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
entity.damageEntity(DamageSource.k, event.getDamage());
|
entity.damageEntity(DamageSource.EXPLOSION, event.getDamage());
|
||||||
|
|
||||||
entity.motX += d0 * d10;
|
entity.motX += d0 * d10;
|
||||||
entity.motY += d1 * d10;
|
entity.motY += d1 * d10;
|
||||||
|
@ -3,18 +3,18 @@ package net.minecraft.server;
|
|||||||
public class FoodMetaData {
|
public class FoodMetaData {
|
||||||
|
|
||||||
// CraftBukkit start - all made public
|
// CraftBukkit start - all made public
|
||||||
public int a = 20;
|
public int foodLevel = 20;
|
||||||
public float b = 5.0F;
|
public float saturationLevel = 5.0F;
|
||||||
public float c;
|
public float exhaustionLevel;
|
||||||
public int d = 0;
|
public int foodTickTimer = 0;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
private int e = 20;
|
private int e = 20;
|
||||||
|
|
||||||
public FoodMetaData() {}
|
public FoodMetaData() {}
|
||||||
|
|
||||||
public void a(int i, float f) {
|
public void a(int i, float f) {
|
||||||
this.a = Math.min(i + this.a, 20);
|
this.foodLevel = Math.min(i + this.foodLevel, 20);
|
||||||
this.b = Math.min(this.b + (float) i * f * 2.0F, (float) this.a);
|
this.saturationLevel = Math.min(this.saturationLevel + (float) i * f * 2.0F, (float) this.foodLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(ItemFood itemfood) {
|
public void a(ItemFood itemfood) {
|
||||||
@ -24,65 +24,65 @@ public class FoodMetaData {
|
|||||||
public void a(EntityHuman entityhuman) {
|
public void a(EntityHuman entityhuman) {
|
||||||
int i = entityhuman.world.spawnMonsters;
|
int i = entityhuman.world.spawnMonsters;
|
||||||
|
|
||||||
this.e = this.a;
|
this.e = this.foodLevel;
|
||||||
if (this.c > 4.0F) {
|
if (this.exhaustionLevel > 4.0F) {
|
||||||
this.c -= 4.0F;
|
this.exhaustionLevel -= 4.0F;
|
||||||
if (this.b > 0.0F) {
|
if (this.saturationLevel > 0.0F) {
|
||||||
this.b = Math.max(this.b - 1.0F, 0.0F);
|
this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
|
||||||
} else if (i > 0) {
|
} else if (i > 0) {
|
||||||
this.a = Math.max(this.a - 1, 0);
|
this.foodLevel = Math.max(this.foodLevel - 1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.a >= 18 && entityhuman.W()) {
|
if (this.foodLevel >= 18 && entityhuman.W()) {
|
||||||
++this.d;
|
++this.foodTickTimer;
|
||||||
if (this.d >= 80) {
|
if (this.foodTickTimer >= 80) {
|
||||||
entityhuman.c(1);
|
entityhuman.c(1);
|
||||||
this.d = 0;
|
this.foodTickTimer = 0;
|
||||||
}
|
}
|
||||||
} else if (this.a <= 0) {
|
} else if (this.foodLevel <= 0) {
|
||||||
++this.d;
|
++this.foodTickTimer;
|
||||||
if (this.d >= 80) {
|
if (this.foodTickTimer >= 80) {
|
||||||
if (entityhuman.health > 10 || i >= 3 || entityhuman.health > 1 && i >= 2) {
|
if (entityhuman.health > 10 || i >= 3 || entityhuman.health > 1 && i >= 2) {
|
||||||
entityhuman.damageEntity(DamageSource.f, 1);
|
entityhuman.damageEntity(DamageSource.STARVE, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.d = 0;
|
this.foodTickTimer = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.d = 0;
|
this.foodTickTimer = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(NBTTagCompound nbttagcompound) {
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
if (nbttagcompound.hasKey("foodLevel")) {
|
if (nbttagcompound.hasKey("foodLevel")) {
|
||||||
this.a = nbttagcompound.e("foodLevel");
|
this.foodLevel = nbttagcompound.e("foodLevel");
|
||||||
this.d = nbttagcompound.e("foodTickTimer");
|
this.foodTickTimer = nbttagcompound.e("foodTickTimer");
|
||||||
this.b = nbttagcompound.g("foodSaturationLevel");
|
this.saturationLevel = nbttagcompound.g("foodSaturationLevel");
|
||||||
this.c = nbttagcompound.g("foodExhaustionLevel");
|
this.exhaustionLevel = nbttagcompound.g("foodExhaustionLevel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(NBTTagCompound nbttagcompound) {
|
public void b(NBTTagCompound nbttagcompound) {
|
||||||
nbttagcompound.a("foodLevel", this.a);
|
nbttagcompound.a("foodLevel", this.foodLevel);
|
||||||
nbttagcompound.a("foodTickTimer", this.d);
|
nbttagcompound.a("foodTickTimer", this.foodTickTimer);
|
||||||
nbttagcompound.a("foodSaturationLevel", this.b);
|
nbttagcompound.a("foodSaturationLevel", this.saturationLevel);
|
||||||
nbttagcompound.a("foodExhaustionLevel", this.c);
|
nbttagcompound.a("foodExhaustionLevel", this.exhaustionLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a() {
|
public int a() {
|
||||||
return this.a;
|
return this.foodLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean b() {
|
public boolean b() {
|
||||||
return this.a < 20;
|
return this.foodLevel < 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(float f) {
|
public void a(float f) {
|
||||||
this.c = Math.min(this.c + f, 40.0F);
|
this.exhaustionLevel = Math.min(this.exhaustionLevel + f, 40.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float c() {
|
public float c() {
|
||||||
return this.b;
|
return this.saturationLevel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ public class ItemBucket extends Item {
|
|||||||
world.setTypeIdAndData(i, j, k, this.a, 0);
|
world.setTypeIdAndData(i, j, k, this.a, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityhuman.K.d) {
|
if (entityhuman.abilities.canInstantlyBuild) {
|
||||||
return itemstack;
|
return itemstack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,14 +33,14 @@ public class ItemInWorldManager {
|
|||||||
public void a(int i) {
|
public void a(int i) {
|
||||||
this.c = i;
|
this.c = i;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
this.player.K.c = false;
|
this.player.abilities.canFly = false;
|
||||||
this.player.K.b = false;
|
this.player.abilities.isFlying = false;
|
||||||
this.player.K.d = false;
|
this.player.abilities.canInstantlyBuild = false;
|
||||||
this.player.K.a = false;
|
this.player.abilities.isInvulnerable = false;
|
||||||
} else {
|
} else {
|
||||||
this.player.K.c = true;
|
this.player.abilities.canFly = true;
|
||||||
this.player.K.d = true;
|
this.player.abilities.canInstantlyBuild = true;
|
||||||
this.player.K.a = true;
|
this.player.abilities.isInvulnerable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ public class ItemInWorldManager {
|
|||||||
int j = itemstack.getData();
|
int j = itemstack.getData();
|
||||||
ItemStack itemstack1 = itemstack.a(world, entityhuman);
|
ItemStack itemstack1 = itemstack.a(world, entityhuman);
|
||||||
|
|
||||||
if (itemstack1 == itemstack && (itemstack1 == null || itemstack1.count == i)) {
|
if (itemstack1 == itemstack && (itemstack1 == null || itemstack1.count == i) && (itemstack1 == null || itemstack1.l() <= 0)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = itemstack1;
|
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = itemstack1;
|
||||||
|
@ -52,7 +52,7 @@ class PlayerInstance {
|
|||||||
if (this.b.size() == 0) {
|
if (this.b.size() == 0) {
|
||||||
long i = (long) this.chunkX + 2147483647L | (long) this.chunkZ + 2147483647L << 32;
|
long i = (long) this.chunkX + 2147483647L | (long) this.chunkZ + 2147483647L << 32;
|
||||||
|
|
||||||
PlayerManager.a(this.playerManager).d(i);
|
PlayerManager.a(this.playerManager).remove(i);
|
||||||
if (this.dirtyCount > 0) {
|
if (this.dirtyCount > 0) {
|
||||||
PlayerManager.b(this.playerManager).remove(this);
|
PlayerManager.b(this.playerManager).remove(this);
|
||||||
}
|
}
|
||||||
|
@ -39,11 +39,11 @@ public class PlayerManager {
|
|||||||
|
|
||||||
private PlayerInstance a(int i, int j, boolean flag) {
|
private PlayerInstance a(int i, int j, boolean flag) {
|
||||||
long k = (long) i + 2147483647L | (long) j + 2147483647L << 32;
|
long k = (long) i + 2147483647L | (long) j + 2147483647L << 32;
|
||||||
PlayerInstance playerinstance = (PlayerInstance) this.b.a(k);
|
PlayerInstance playerinstance = (PlayerInstance) this.b.getEntry(k);
|
||||||
|
|
||||||
if (playerinstance == null && flag) {
|
if (playerinstance == null && flag) {
|
||||||
playerinstance = new PlayerInstance(this, i, j);
|
playerinstance = new PlayerInstance(this, i, j);
|
||||||
this.b.a(k, playerinstance);
|
this.b.put(k, playerinstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
return playerinstance;
|
return playerinstance;
|
||||||
|
@ -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);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren