mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-4956: EntityTameEvent not triggered when taming a Cat
This commit is contained in:
parent
9bda413457
commit
91ada5c2bc
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,15 @@
|
||||||
hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png"));
|
hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png"));
|
||||||
hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png"));
|
hashmap.put(1, new MinecraftKey("textures/entity/cat/black.png"));
|
||||||
hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png"));
|
hashmap.put(2, new MinecraftKey("textures/entity/cat/red.png"));
|
||||||
|
@@ -329,7 +329,7 @@
|
||||||
|
} else if (this.i(itemstack)) {
|
||||||
|
this.a(entityhuman, itemstack);
|
||||||
|
if (!this.world.isClientSide) {
|
||||||
|
- if (this.random.nextInt(3) == 0) {
|
||||||
|
+ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
|
||||||
|
this.tame(entityhuman);
|
||||||
|
this.r(true);
|
||||||
|
this.goalSit.setSitting(true);
|
||||||
@@ -518,7 +518,7 @@
|
@@ -518,7 +518,7 @@
|
||||||
static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
|
static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue