Update CraftBukkit to Minecraft 1.7.2
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit
|
||||
// CraftBukkit start
|
||||
import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
// CraftBukkti end
|
||||
|
||||
public class EntitySpider extends EntityMonster {
|
||||
|
||||
@@ -9,20 +12,20 @@ public class EntitySpider extends EntityMonster {
|
||||
this.a(1.4F, 0.9F);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
super.a();
|
||||
protected void c() {
|
||||
super.c();
|
||||
this.datawatcher.a(16, new Byte((byte) 0));
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
super.l_();
|
||||
public void h() {
|
||||
super.h();
|
||||
if (!this.world.isStatic) {
|
||||
this.a(this.positionChanged);
|
||||
}
|
||||
}
|
||||
|
||||
protected void az() {
|
||||
super.az();
|
||||
protected void aD() {
|
||||
super.aD();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(16.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D);
|
||||
}
|
||||
@@ -39,19 +42,19 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected String r() {
|
||||
protected String t() {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aO() {
|
||||
protected String aT() {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aP() {
|
||||
protected String aU() {
|
||||
return "mob.spider.death";
|
||||
}
|
||||
|
||||
protected void a(int i, int j, int k, int l) {
|
||||
protected void a(int i, int j, int k, Block block) {
|
||||
this.makeSound("mob.spider.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -89,8 +92,8 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected int getLootId() {
|
||||
return Item.STRING.id;
|
||||
protected Item getLoot() {
|
||||
return Items.STRING;
|
||||
}
|
||||
|
||||
protected void dropDeathLoot(boolean flag, int i) {
|
||||
@@ -104,22 +107,22 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
|
||||
if (k > 0) {
|
||||
loot.add(new org.bukkit.inventory.ItemStack(Item.STRING.id, k));
|
||||
loot.add(new org.bukkit.inventory.ItemStack(CraftMagicNumbers.getMaterial(Items.STRING), k));
|
||||
}
|
||||
|
||||
if (flag && (this.random.nextInt(3) == 0 || this.random.nextInt(1 + i) > 0)) {
|
||||
loot.add(new org.bukkit.inventory.ItemStack(Item.SPIDER_EYE.id, 1));
|
||||
loot.add(new org.bukkit.inventory.ItemStack(CraftMagicNumbers.getMaterial(Items.SPIDER_EYE), 1));
|
||||
}
|
||||
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, loot); // raise event even for those times when the entity does not drop loot
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
public boolean e() {
|
||||
return this.bT();
|
||||
public boolean h_() {
|
||||
return this.bX();
|
||||
}
|
||||
|
||||
public void am() {}
|
||||
public void as() {}
|
||||
|
||||
public EnumMonsterType getMonsterType() {
|
||||
return EnumMonsterType.ARTHROPOD;
|
||||
@@ -129,7 +132,7 @@ public class EntitySpider extends EntityMonster {
|
||||
return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.d(mobeffect);
|
||||
}
|
||||
|
||||
public boolean bT() {
|
||||
public boolean bX() {
|
||||
return (this.datawatcher.getByte(16) & 1) != 0;
|
||||
}
|
||||
|
||||
@@ -159,7 +162,7 @@ public class EntitySpider extends EntityMonster {
|
||||
|
||||
if (object == null) {
|
||||
object = new GroupDataSpider();
|
||||
if (this.world.difficulty > 2 && this.world.random.nextFloat() < 0.1F * this.world.b(this.locX, this.locY, this.locZ)) {
|
||||
if (this.world.difficulty == EnumDifficulty.HARD && this.world.random.nextFloat() < 0.1F * this.world.b(this.locX, this.locY, this.locZ)) {
|
||||
((GroupDataSpider) object).a(this.world.random);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user