Update CraftBukkit to Minecraft 1.3.1

This commit is contained in:
feildmaster
2012-07-29 02:33:13 -05:00
committed by Travis Watkins
parent 08e2923bd4
commit a43d621c01
240 changed files with 10763 additions and 9150 deletions

View File

@@ -5,9 +5,10 @@ public class ItemMonsterEgg extends Item {
public ItemMonsterEgg(int i) {
super(i);
this.a(true);
this.a(CreativeModeTab.f);
}
public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l) {
public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, int i, int j, int k, int l, float f, float f1, float f2) {
if (world.isStatic || itemstack.getData() == 48 || itemstack.getData() == 49 || itemstack.getData() == 63) { // CraftBukkit
return true;
} else {
@@ -38,8 +39,16 @@ public class ItemMonsterEgg extends Item {
if (entity != null && entity instanceof EntityLiving) { // CraftBukkit
entity.setPositionRotation(d0, d1, d2, world.random.nextFloat() * 360.0F, 0.0F);
if (entity instanceof EntityVillager) {
EntityVillager entityvillager = (EntityVillager) entity;
entityvillager.setProfession(entityvillager.au().nextInt(5));
world.addEntity(entityvillager);
return true;
}
world.addEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
((EntityLiving) entity).az();
((EntityLiving) entity).aH();
}
return entity != null;