summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityGhast.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityGhast.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityGhast.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
index 9cead916..119b9c87 100644
--- a/src/main/java/net/minecraft/server/EntityGhast.java
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
@@ -101,7 +101,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
if (this.target == null || this.h-- <= 0) {
// CraftBukkit start
- Entity target = this.world.b(this, 100.0D);
+ Entity target = this.world.findNearbyVulnerablePlayer(this, 100.0D);
if (target != null) {
EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), target.getBukkitEntity(), EntityTargetEvent.TargetReason.CLOSEST_PLAYER);
this.world.getServer().getPluginManager().callEvent(event);
@@ -124,7 +124,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
if (this.target != null && this.target.i(this) < d4 * d4) {
double d5 = this.target.locX - this.locX;
- double d6 = this.target.boundingBox.b + (double) (this.target.width / 2.0F) - (this.locY + (double) (this.width / 2.0F));
+ 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.V = this.yaw = -((float) Math.atan2(d5, d7)) * 180.0F / 3.1415927F;
@@ -141,7 +141,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
Vec3D vec3d = this.d(1.0F);
entityfireball.locX = this.locX + vec3d.a * d8;
- entityfireball.locY = this.locY + (double) (this.width / 2.0F) + 0.5D;
+ entityfireball.locY = this.locY + (double) (this.length / 2.0F) + 0.5D;
entityfireball.locZ = this.locZ + vec3d.c * d8;
this.world.addEntity(entityfireball);
this.f = -40;
@@ -198,7 +198,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
return Item.SULPHUR.id;
}
- protected void a(boolean flag, int i) {
+ protected void dropDeathLoot(boolean flag, int i) {
// CraftBukkit start
List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
int j = this.random.nextInt(2) + this.random.nextInt(1 + i);