--- a/net/minecraft/server/EntityParrot.java +++ b/net/minecraft/server/EntityParrot.java @@ -15,7 +15,7 @@ private static final DataWatcherObject bG = DataWatcher.a(EntityParrot.class, DataWatcherRegistry.b); private static final Predicate bH = new Predicate() { public boolean a(@Nullable EntityInsentient entityinsentient) { - return entityinsentient != null && EntityParrot.bK.containsKey(EntityTypes.b.a((Object) entityinsentient.getClass())); + return entityinsentient != null && EntityParrot.bK.containsKey(EntityTypes.b.a(entityinsentient.getClass())); // CraftBukkit - decompile error } public boolean apply(@Nullable Object object) { @@ -114,7 +114,7 @@ EntityInsentient entityinsentient = (EntityInsentient) list.get(world.random.nextInt(list.size())); if (!entityinsentient.isSilent()) { - SoundEffect soundeffect = g(EntityTypes.b.a((Object) entityinsentient.getClass())); + SoundEffect soundeffect = g(EntityTypes.b.a(entityinsentient.getClass())); // CraftBukkit - decompile error world.a((EntityHuman) null, entity.locX, entity.locY, entity.locZ, soundeffect, entity.bK(), 0.7F, b(world.random)); return true; @@ -140,7 +140,7 @@ } if (!this.world.isClientSide) { - if (this.random.nextInt(10) == 0) { + if (this.random.nextInt(10) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit this.c(entityhuman); this.p(true); this.world.broadcastEntityEffect(this, (byte) 7); @@ -276,7 +276,8 @@ return false; } else { if (this.goalSit != null) { - this.goalSit.setSitting(false); + // CraftBukkit - moved into EntityLiving.d(DamageSource, float) + // this.goalSit.setSitting(false); } return super.damageEntity(damagesource, f); @@ -316,33 +317,35 @@ } static { - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityBlaze.class), SoundEffects.eM); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityCaveSpider.class), SoundEffects.fc); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityCreeper.class), SoundEffects.eN); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityGuardianElder.class), SoundEffects.eO); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityEnderDragon.class), SoundEffects.eP); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityEnderman.class), SoundEffects.eQ); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityEndermite.class), SoundEffects.eR); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityEvoker.class), SoundEffects.eS); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityGhast.class), SoundEffects.eT); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityZombieHusk.class), SoundEffects.eU); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityIllagerIllusioner.class), SoundEffects.eV); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityMagmaCube.class), SoundEffects.eW); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityPigZombie.class), SoundEffects.fl); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityPolarBear.class), SoundEffects.eX); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityShulker.class), SoundEffects.eY); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySilverfish.class), SoundEffects.eZ); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySkeleton.class), SoundEffects.fa); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySlime.class), SoundEffects.fb); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySpider.class), SoundEffects.fc); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySkeletonStray.class), SoundEffects.fd); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityVex.class), SoundEffects.fe); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityVindicator.class), SoundEffects.ff); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityWitch.class), SoundEffects.fg); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityWither.class), SoundEffects.fh); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntitySkeletonWither.class), SoundEffects.fi); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityWolf.class), SoundEffects.fj); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityZombie.class), SoundEffects.fk); - EntityParrot.bK.put(EntityTypes.b.a((Object) EntityZombieVillager.class), SoundEffects.fm); + // CraftBukkit start + EntityParrot.bK.put(EntityTypes.b.a(EntityBlaze.class), SoundEffects.eM); + EntityParrot.bK.put(EntityTypes.b.a(EntityCaveSpider.class), SoundEffects.fc); + EntityParrot.bK.put(EntityTypes.b.a(EntityCreeper.class), SoundEffects.eN); + EntityParrot.bK.put(EntityTypes.b.a(EntityGuardianElder.class), SoundEffects.eO); + EntityParrot.bK.put(EntityTypes.b.a(EntityEnderDragon.class), SoundEffects.eP); + EntityParrot.bK.put(EntityTypes.b.a(EntityEnderman.class), SoundEffects.eQ); + EntityParrot.bK.put(EntityTypes.b.a(EntityEndermite.class), SoundEffects.eR); + EntityParrot.bK.put(EntityTypes.b.a(EntityEvoker.class), SoundEffects.eS); + EntityParrot.bK.put(EntityTypes.b.a(EntityGhast.class), SoundEffects.eT); + EntityParrot.bK.put(EntityTypes.b.a(EntityZombieHusk.class), SoundEffects.eU); + EntityParrot.bK.put(EntityTypes.b.a(EntityIllagerIllusioner.class), SoundEffects.eV); + EntityParrot.bK.put(EntityTypes.b.a(EntityMagmaCube.class), SoundEffects.eW); + EntityParrot.bK.put(EntityTypes.b.a(EntityPigZombie.class), SoundEffects.fl); + EntityParrot.bK.put(EntityTypes.b.a(EntityPolarBear.class), SoundEffects.eX); + EntityParrot.bK.put(EntityTypes.b.a(EntityShulker.class), SoundEffects.eY); + EntityParrot.bK.put(EntityTypes.b.a(EntitySilverfish.class), SoundEffects.eZ); + EntityParrot.bK.put(EntityTypes.b.a(EntitySkeleton.class), SoundEffects.fa); + EntityParrot.bK.put(EntityTypes.b.a(EntitySlime.class), SoundEffects.fb); + EntityParrot.bK.put(EntityTypes.b.a(EntitySpider.class), SoundEffects.fc); + EntityParrot.bK.put(EntityTypes.b.a(EntitySkeletonStray.class), SoundEffects.fd); + EntityParrot.bK.put(EntityTypes.b.a(EntityVex.class), SoundEffects.fe); + EntityParrot.bK.put(EntityTypes.b.a(EntityVindicator.class), SoundEffects.ff); + EntityParrot.bK.put(EntityTypes.b.a(EntityWitch.class), SoundEffects.fg); + EntityParrot.bK.put(EntityTypes.b.a(EntityWither.class), SoundEffects.fh); + EntityParrot.bK.put(EntityTypes.b.a(EntitySkeletonWither.class), SoundEffects.fi); + EntityParrot.bK.put(EntityTypes.b.a(EntityWolf.class), SoundEffects.fj); + EntityParrot.bK.put(EntityTypes.b.a(EntityZombie.class), SoundEffects.fk); + EntityParrot.bK.put(EntityTypes.b.a(EntityZombieVillager.class), SoundEffects.fm); + // CraftBukkit end } }