From 51984323dc04bbb40eee898237cf08d7dad19e56 Mon Sep 17 00:00:00 2001 From: fullwall Date: Tue, 23 Jul 2019 22:04:36 +0800 Subject: [PATCH] Fix rename issue --- .../net/citizensnpcs/npc/CitizensNPC.java | 2 -- .../v1_14_R1/entity/DolphinController.java | 20 ++++++++++++++++++- .../nms/v1_14_R1/util/NMSImpl.java | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java index d0abadfc1..d59877710 100644 --- a/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java +++ b/main/src/main/java/net/citizensnpcs/npc/CitizensNPC.java @@ -406,7 +406,5 @@ public class CitizensNPC extends AbstractNPC { private static final String NPC_METADATA_MARKER = "NPC"; private static boolean SUPPORT_GLOWING = true; - private static boolean SUPPORT_GLOWING_COLOR = true; private static boolean SUPPORT_SILENT = true; - private static boolean SUPPORT_TEAM_SETOPTION = true; } diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java index 79101201e..fd3fd72fd 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/entity/DolphinController.java @@ -15,11 +15,14 @@ import net.citizensnpcs.npc.CitizensNPC; import net.citizensnpcs.npc.ai.NPCHolder; import net.citizensnpcs.util.Util; import net.minecraft.server.v1_14_R1.BlockPosition; +import net.minecraft.server.v1_14_R1.ControllerMove; import net.minecraft.server.v1_14_R1.DamageSource; import net.minecraft.server.v1_14_R1.EntityDolphin; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.IBlockData; import net.minecraft.server.v1_14_R1.NBTTagCompound; +import net.minecraft.server.v1_14_R1.Navigation; +import net.minecraft.server.v1_14_R1.NavigationAbstract; import net.minecraft.server.v1_14_R1.SoundEffect; import net.minecraft.server.v1_14_R1.Vec3D; import net.minecraft.server.v1_14_R1.World; @@ -60,7 +63,7 @@ public class DolphinController extends MobEntityController { this.npc = (CitizensNPC) npc; if (npc != null) { NMSImpl.clearGoals(goalSelector, targetSelector); - this.setNoAI(true); + this.moveController = new ControllerMove(this); } } @@ -71,6 +74,11 @@ public class DolphinController extends MobEntityController { } } + @Override + public boolean au() { + return npc == null ? super.au() : true; + } + @Override public void b(float f, float f1) { if (npc == null || !npc.isFlyable()) { @@ -78,6 +86,11 @@ public class DolphinController extends MobEntityController { } } + @Override + protected NavigationAbstract b(World world) { + return new Navigation(this, world); + } + @Override protected void checkDespawn() { if (npc == null) { @@ -180,6 +193,11 @@ public class DolphinController extends MobEntityController { } } + @Override + public boolean isInWater() { + return npc == null ? super.isInWater() : false; + } + @Override public boolean isLeashed() { if (npc == null) diff --git a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java index 879999882..ed8c3f42a 100644 --- a/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java +++ b/v1_14_R1/src/main/java/net/citizensnpcs/nms/v1_14_R1/util/NMSImpl.java @@ -1656,7 +1656,7 @@ public class NMSImpl implements NMSBridge { } public static void stopNavigation(NavigationAbstract navigation) { - navigation.q(); + navigation.o(); } public static void updateAI(EntityLiving entity) {