summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntitySkeleton.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntitySkeleton.java')
-rw-r--r--src/main/java/net/minecraft/server/EntitySkeleton.java36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java
index 8ff71b6c..0f159efd 100644
--- a/src/main/java/net/minecraft/server/EntitySkeleton.java
+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java
@@ -14,15 +14,19 @@ public class EntitySkeleton extends EntityMonster {
this.texture = "/mob/skeleton.png";
}
- protected String h() {
+ public int getMaxHealth() {
+ return 20;
+ }
+
+ protected String c_() {
return "mob.skeleton";
}
- protected String i() {
+ protected String m() {
return "mob.skeletonhurt";
}
- protected String j() {
+ protected String n() {
return "mob.skeletonhurt";
}
@@ -32,7 +36,7 @@ public class EntitySkeleton extends EntityMonster {
public void die(DamageSource damagesource) {
super.die(damagesource);
- if (damagesource.e() instanceof EntityArrow && damagesource.getEntity() instanceof EntityHuman) {
+ if (damagesource.g() instanceof EntityArrow && damagesource.getEntity() instanceof EntityHuman) {
EntityHuman entityhuman = (EntityHuman) damagesource.getEntity();
double d0 = entityhuman.locX - this.locX;
double d1 = entityhuman.locZ - this.locZ;
@@ -43,9 +47,9 @@ public class EntitySkeleton extends EntityMonster {
}
}
- public void s() {
- if (this.world.d() && !this.world.isStatic) {
- float f = this.a_(1.0F);
+ public void d() {
+ if (this.world.e() && !this.world.isStatic) {
+ float f = this.a(1.0F);
if (f > 0.5F && this.world.isChunkLoaded(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
// CraftBukkit start
@@ -53,13 +57,13 @@ public class EntitySkeleton extends EntityMonster {
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
- this.fireTicks = 300;
+ this.j(8);
}
// CraftBukkit end
}
}
- super.s();
+ super.d();
}
protected void a(Entity entity, float f) {
@@ -69,7 +73,7 @@ public class EntitySkeleton extends EntityMonster {
if (this.attackTicks == 0) {
EntityArrow entityarrow = new EntityArrow(this.world, this, 1.0F);
- double d2 = entity.locY + (double) entity.t() - 0.699999988079071D - entityarrow.locY;
+ double d2 = entity.locY + (double) entity.x() - 0.699999988079071D - entityarrow.locY;
float f1 = MathHelper.a(d0 * d0 + d1 * d1) * 0.2F;
this.world.makeSound(this, "random.bow", 1.0F, 1.0F / (this.random.nextFloat() * 0.4F + 0.8F));
@@ -91,20 +95,20 @@ public class EntitySkeleton extends EntityMonster {
super.a(nbttagcompound);
}
- protected int k() {
+ protected int e() {
return Item.ARROW.id;
}
- protected void a(boolean flag) {
+ protected void a(boolean flag, int i) {
// CraftBukkit start - whole method
java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>();
- int count = this.random.nextInt(3);
+ int count = this.random.nextInt(3 + i);
if (count > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.Material.ARROW, count));
}
- count = this.random.nextInt(3);
+ count = this.random.nextInt(3 + i);
if (count > 0) {
loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.Material.BONE, count));
}
@@ -112,4 +116,8 @@ public class EntitySkeleton extends EntityMonster {
org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot);
// CraftBukkit end
}
+
+ public EnchantmentDamage t() {
+ return EnchantmentDamage.b;
+ }
}