mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
814c742554
Discussion ongoing in PR #449
40 lines
2.1 KiB
Diff
40 lines
2.1 KiB
Diff
--- a/net/minecraft/server/EntityParrot.java
|
|
+++ b/net/minecraft/server/EntityParrot.java
|
|
@@ -27,7 +27,7 @@
|
|
};
|
|
private static final Item bN = Items.COOKIE;
|
|
private static final Set<Item> bO = Sets.newHashSet(new Item[] { Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS});
|
|
- private static final Map<EntityTypes<?>, SoundEffect> bP = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
|
|
+ private static final Map<EntityTypes<?>, SoundEffect> bP = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
|
|
hashmap.put(EntityTypes.BLAZE, SoundEffects.ENTITY_PARROT_IMITATE_BLAZE);
|
|
hashmap.put(EntityTypes.CAVE_SPIDER, SoundEffects.ENTITY_PARROT_IMITATE_SPIDER);
|
|
hashmap.put(EntityTypes.CREEPER, SoundEffects.ENTITY_PARROT_IMITATE_CREEPER);
|
|
@@ -174,7 +174,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.s(true);
|
|
this.world.broadcastEntityEffect(this, (byte) 7);
|
|
@@ -190,7 +190,7 @@
|
|
itemstack.subtract(1);
|
|
}
|
|
|
|
- this.addEffect(new MobEffect(MobEffects.POISON, 900));
|
|
+ this.addEffect(new MobEffect(MobEffects.POISON, 900), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // CraftBukkit
|
|
if (entityhuman.u() || !this.bl()) {
|
|
this.damageEntity(DamageSource.playerAttack(entityhuman), Float.MAX_VALUE);
|
|
}
|
|
@@ -310,7 +310,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);
|