mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Update CraftBukkit to Minecraft 1.4.4.
This commit is contained in:
1 parent
a0c3b4f9d1
commit
7f7192f8fd
169 files changed
+3295
-2774
No files matched your search
@@ -7,6 +7,28 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public abstract EntityAgeable createChild(EntityAgeable entityageable);
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||
|
||||
if (itemstack != null && itemstack.id == Item.MONSTER_EGG.id && !this.world.isStatic) {
|
||||
Class oclass = EntityTypes.a(itemstack.getData());
|
||||
|
||||
if (oclass != null && oclass.isAssignableFrom(this.getClass())) {
|
||||
EntityAgeable entityageable = this.createChild(this);
|
||||
|
||||
if (entityageable != null) {
|
||||
entityageable.setAge(-24000);
|
||||
entityageable.setPositionRotation(this.locX, this.locY, this.locZ, 0.0F, 0.0F);
|
||||
this.world.addEntity(entityageable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.a(entityhuman);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
super.a();
|
||||
this.datawatcher.a(12, new Integer(0));
|
||||
|
||||
Reference in new issue
Block a user