aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch
new file mode 100644
index 0000000000..5e8c505644
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Ocelot.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/animal/Ocelot.java
++++ b/net/minecraft/world/entity/animal/Ocelot.java
+@@ -173,7 +179,7 @@
+ if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemInHand) && player.distanceToSqr(this) < 9.0) {
+ this.usePlayerItem(player, hand, itemInHand);
+ if (!this.level().isClientSide) {
+- if (this.random.nextInt(3) == 0) {
++ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check
+ this.setTrusting(true);
+ this.spawnTrustingParticles(true);
+ this.level().broadcastEntityEvent(this, (byte)41);