Fix rename issue

This commit is contained in:
fullwall 2019-07-23 22:04:36 +08:00
parent ee9b1d3464
commit 51984323dc
3 changed files with 20 additions and 4 deletions

View File

@ -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;
}

View File

@ -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)

View File

@ -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) {