summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityMonster.java
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-07-29 02:33:13 -0500
committerTravis Watkins <amaranth@ubuntu.com>2012-08-02 04:58:50 -0500
commita43d621c0138110d2ec362b2eaa8f938f241bb49 (patch)
treed2ebc0d7a4a969d3257b1b958236428a24117eb1 /src/main/java/net/minecraft/server/EntityMonster.java
parent08e2923bd4282579ca0cf7af0e6207cba0591e5c (diff)
downloadcraftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar
craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.gz
craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.lz
craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.tar.xz
craftbukkit-a43d621c0138110d2ec362b2eaa8f938f241bb49.zip
Update CraftBukkit to Minecraft 1.3.1
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMonster.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityMonster.java46
1 files changed, 19 insertions, 27 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index a72b2707..0a2eae32 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -8,21 +8,21 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
public EntityMonster(World world) {
super(world);
- this.aA = 5;
+ this.aV = 5;
}
- public void e() {
- float f = this.b(1.0F);
+ public void d() {
+ float f = this.c(1.0F);
if (f > 0.5F) {
- this.aV += 2;
+ this.bq += 2;
}
- super.e();
+ super.d();
}
- public void F_() {
- super.F_();
+ public void h_() {
+ super.h_();
if (!this.world.isStatic && this.world.difficulty == 0) {
this.die();
}
@@ -31,7 +31,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
protected Entity findTarget() {
EntityHuman entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D);
- return entityhuman != null && this.h(entityhuman) ? entityhuman : null;
+ return entityhuman != null && this.l(entityhuman) ? entityhuman : null;
}
public boolean damageEntity(DamageSource damagesource, int i) {
@@ -40,7 +40,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
if (this.passenger != entity && this.vehicle != entity) {
if (entity != this) {
- // CraftBukkit start - We still need to call events for entities without goals
+ // CraftBukkit start - we still need to call events for entities without goals
if (entity != this.target && (this instanceof EntityBlaze || this instanceof EntityEnderman || this instanceof EntitySpider || this instanceof EntityGiantZombie || this instanceof EntitySilverfish)) {
EntityTargetEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent(this, entity, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY);
@@ -66,7 +66,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
}
- public boolean a(Entity entity) {
+ public boolean k(Entity entity) {
int i = this.damage;
if (this.hasEffect(MobEffectList.INCREASE_DAMAGE)) {
@@ -83,38 +83,30 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
protected void a(Entity entity, float f) {
if (this.attackTicks <= 0 && f < 2.0F && entity.boundingBox.e > this.boundingBox.b && entity.boundingBox.b < this.boundingBox.e) {
this.attackTicks = 20;
- this.a(entity);
+ this.k(entity);
}
}
public float a(int i, int j, int k) {
- return 0.5F - this.world.p(i, j, k);
+ return 0.5F - this.world.o(i, j, k);
}
- public void b(NBTTagCompound nbttagcompound) {
- super.b(nbttagcompound);
- }
-
- public void a(NBTTagCompound nbttagcompound) {
- super.a(nbttagcompound);
- }
-
- protected boolean C() {
+ protected boolean o() {
int i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.boundingBox.b);
int k = MathHelper.floor(this.locZ);
- if (this.world.a(EnumSkyBlock.SKY, i, j, k) > this.random.nextInt(32)) {
+ if (this.world.b(EnumSkyBlock.SKY, i, j, k) > this.random.nextInt(32)) {
return false;
} else {
int l = this.world.getLightLevel(i, j, k);
- if (this.world.w()) {
- int i1 = this.world.f;
+ if (this.world.I()) {
+ int i1 = this.world.k;
- this.world.f = 10;
+ this.world.k = 10;
l = this.world.getLightLevel(i, j, k);
- this.world.f = i1;
+ this.world.k = i1;
}
return l <= this.random.nextInt(8);
@@ -122,6 +114,6 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
public boolean canSpawn() {
- return this.C() && super.canSpawn();
+ return this.o() && super.canSpawn();
}
}