mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-09 01:47:38 +01:00
* (experimental) fix for #1569 turtle NPC navigation issues * (for turtle issue) remove the stray field and set the internal field instead
This commit is contained in:
parent
50619f3aad
commit
a21d16c581
@ -1,5 +1,6 @@
|
||||
package net.citizensnpcs.nms.v1_13_R2.entity;
|
||||
|
||||
import net.minecraft.server.v1_13_R2.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.craftbukkit.v1_13_R2.CraftServer;
|
||||
import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity;
|
||||
@ -14,14 +15,6 @@ import net.citizensnpcs.nms.v1_13_R2.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R2.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R2.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R2.DamageSource;
|
||||
import net.minecraft.server.v1_13_R2.EntityTurtle;
|
||||
import net.minecraft.server.v1_13_R2.IBlockData;
|
||||
import net.minecraft.server.v1_13_R2.NBTTagCompound;
|
||||
import net.minecraft.server.v1_13_R2.SoundEffect;
|
||||
import net.minecraft.server.v1_13_R2.World;
|
||||
|
||||
public class TurtleController extends MobEntityController {
|
||||
public TurtleController() {
|
||||
@ -46,6 +39,19 @@ public class TurtleController extends MobEntityController {
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
this.h = new EmptyControllerJump(this);
|
||||
}
|
||||
}
|
||||
|
||||
static class EmptyControllerJump extends ControllerJump {
|
||||
|
||||
public EmptyControllerJump(EntityInsentient var1) {
|
||||
super(var1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void b() {
|
||||
this.a = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,4 +205,4 @@ public class TurtleController extends MobEntityController {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user