diff options
author | feildmaster <admin@feildmaster.com> | 2012-12-19 22:03:52 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-20 10:43:00 -0600 |
commit | 23b67643741d5754af4de020a29d557078f9f81d (patch) | |
tree | 90e1a32f7eb94af49a381cb6bc34bf6247f0efe6 /src/main/java/net/minecraft/server/EntityGhast.java | |
parent | 9f1bf124eec7c20f16b2034fd9fba55f70c805fd (diff) | |
download | craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.gz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.lz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.tar.xz craftbukkit-23b67643741d5754af4de020a29d557078f9f81d.zip |
Update CraftBukkit to Minecraft 1.4.6
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityGhast.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityGhast.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java index 3dc67c08..ac315640 100644 --- a/src/main/java/net/minecraft/server/EntityGhast.java +++ b/src/main/java/net/minecraft/server/EntityGhast.java @@ -16,13 +16,14 @@ public class EntityGhast extends EntityFlying implements IMonster { private int i = 0; public int f = 0; public int g = 0; + private int explosionPower = 1; public EntityGhast(World world) { super(world); this.texture = "/mob/ghast.png"; this.a(4.0F, 4.0F); this.fireProof = true; - this.bc = 5; + this.bd = 5; } public boolean damageEntity(DamageSource damagesource, int i) { @@ -129,7 +130,7 @@ public class EntityGhast extends EntityFlying implements IMonster { double d6 = this.target.boundingBox.b + (double) (this.target.length / 2.0F) - (this.locY + (double) (this.length / 2.0F)); double d7 = this.target.locZ - this.locZ; - this.aw = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F; + this.ax = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F; if (this.n(this.target)) { if (this.g == 10) { this.world.a((EntityHuman) null, 1007, (int) this.locX, (int) this.locY, (int) this.locZ, 0); @@ -139,6 +140,8 @@ public class EntityGhast extends EntityFlying implements IMonster { if (this.g == 20) { this.world.a((EntityHuman) null, 1008, (int) this.locX, (int) this.locY, (int) this.locZ, 0); EntityLargeFireball entitylargefireball = new EntityLargeFireball(this.world, this, d5, d6, d7); + + entitylargefireball.e = this.explosionPower; double d8 = 4.0D; Vec3D vec3d = this.i(1.0F); @@ -152,7 +155,7 @@ public class EntityGhast extends EntityFlying implements IMonster { --this.g; } } else { - this.aw = this.yaw = -((float) Math.atan2(this.motX, this.motZ)) * 180.0F / 3.1415927F; + this.ax = this.yaw = -((float) Math.atan2(this.motX, this.motZ)) * 180.0F / 3.1415927F; if (this.g > 0) { --this.g; } @@ -232,4 +235,16 @@ public class EntityGhast extends EntityFlying implements IMonster { public int bv() { return 1; } + + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + nbttagcompound.setInt("ExplosionPower", this.explosionPower); + } + + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + if (nbttagcompound.hasKey("ExplosionPower")) { + this.explosionPower = nbttagcompound.getInt("ExplosionPower"); + } + } } |