From 46a09d53f1c48b709f0dca4ca8b2ce6b72057414 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 21 Jun 2021 08:40:43 +1000 Subject: [PATCH] #870: Add isTrusting/setTrusting to CraftOcelot. By: Ibrahim Ansari --- .../world/entity/animal/EntityOcelot.patch | 14 ++++++++++++++ .../org/bukkit/craftbukkit/entity/CraftOcelot.java | 10 ++++++++++ 2 files changed, 24 insertions(+) diff --git a/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch b/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch index 15d481d291..9e40c65db0 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/animal/EntityOcelot.patch @@ -1,5 +1,19 @@ --- a/net/minecraft/world/entity/animal/EntityOcelot.java +++ b/net/minecraft/world/entity/animal/EntityOcelot.java +@@ -68,11 +68,11 @@ + this.t(); + } + +- boolean isTrusting() { ++ public boolean isTrusting() { + return (Boolean) this.entityData.get(EntityOcelot.DATA_TRUSTING); + } + +- private void setTrusting(boolean flag) { ++ public void setTrusting(boolean flag) { + this.entityData.set(EntityOcelot.DATA_TRUSTING, flag); + this.t(); + } @@ -133,7 +133,7 @@ @Override diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java index 8be5d60e18..ec804e04d5 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java @@ -16,6 +16,16 @@ public class CraftOcelot extends CraftAnimals implements Ocelot { return (EntityOcelot) entity; } + @Override + public boolean isTrusting() { + return getHandle().isTrusting(); + } + + @Override + public void setTrusting(boolean trust) { + getHandle().setTrusting(trust); + } + @Override public Type getCatType() { return Type.WILD_OCELOT;