From d14119bc3832ea2b4a8c58ba766eb635d543b1a6 Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 18 Feb 2018 18:56:19 +0800 Subject: [PATCH] Override an ocelot method --- .../nms/v1_10_R1/entity/OcelotController.java | 8 ++++++++ .../nms/v1_11_R1/entity/OcelotController.java | 8 ++++++++ .../citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java | 2 -- .../nms/v1_12_R1/entity/OcelotController.java | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java index a7015c072..c2fc564ca 100644 --- a/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java +++ b/v1_10_R1/src/main/java/net/citizensnpcs/nms/v1_10_R1/entity/OcelotController.java @@ -88,6 +88,13 @@ public class OcelotController extends MobEntityController { return npc == null ? super.d(save) : false; } + @Override + protected void df() { + if (npc == null) { + super.df(); + } + } + @Override public void e(float f, float f1) { if (npc == null || !npc.isFlyable()) { @@ -189,6 +196,7 @@ public class OcelotController extends MobEntityController { return false; } } + } public static class OcelotNPC extends CraftOcelot implements NPCHolder { diff --git a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java index e4a5c0f17..52bf431f4 100644 --- a/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java +++ b/v1_11_R1/src/main/java/net/citizensnpcs/nms/v1_11_R1/entity/OcelotController.java @@ -88,6 +88,13 @@ public class OcelotController extends MobEntityController { return npc == null ? super.d(save) : false; } + @Override + protected void di() { + if (npc == null) { + super.di(); + } + } + @Override public void e(float f, float f1) { if (npc == null || !npc.isFlyable()) { @@ -190,6 +197,7 @@ public class OcelotController extends MobEntityController { return false; } } + } public static class OcelotNPC extends CraftOcelot implements NPCHolder { diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java index 09369d0bb..f783563c8 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/EntityHumanNPC.java @@ -543,9 +543,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable } private static final String[][] EMPTY_PROGRESS = new String[0][0]; - private static final float EPSILON = 0.005F; - private static final Location LOADED_LOCATION = new Location(null, 0, 0, 0); private static final Field PROGRESS_TRACKER_FIELD = NMS.getField(AdvancementProgress.class, "b"); } diff --git a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java index 4cc8adfd3..25c26647a 100644 --- a/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java +++ b/v1_12_R1/src/main/java/net/citizensnpcs/nms/v1_12_R1/entity/OcelotController.java @@ -98,6 +98,13 @@ public class OcelotController extends MobEntityController { return npc == null ? super.d(save) : false; } + @Override + protected void dm() { + if (npc == null) { + super.dm(); + } + } + @Override public void e(float f, float f1) { if (npc == null || !npc.isFlyable()) {