From 91ada5c2bcc59aeebbdbca45d64d3b48b736f483 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 19 May 2019 12:02:25 +1000 Subject: [PATCH] SPIGOT-4956: EntityTameEvent not triggered when taming a Cat --- nms-patches/EntityCat.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/EntityCat.patch b/nms-patches/EntityCat.patch index 813b85d870..db433c6bed 100644 --- a/nms-patches/EntityCat.patch +++ b/nms-patches/EntityCat.patch @@ -9,6 +9,15 @@ hashmap.put(0, new MinecraftKey("textures/entity/cat/tabby.png")); hashmap.put(1, new MinecraftKey("textures/entity/cat/black.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 @@ static class PathfinderGoalTemptChance extends PathfinderGoalTempt {