mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-02 14:38:19 +01:00
Reset move controllers for water mobs
This commit is contained in:
parent
9e38701367
commit
7760164880
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.EntityCod;
|
||||
import net.minecraft.server.v1_13_R1.IBlockData;
|
||||
@ -58,6 +59,7 @@ public class CodController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,6 +184,9 @@ public class CodController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void mobTick() {
|
||||
if (npc != null) {
|
||||
t(false);
|
||||
}
|
||||
super.mobTick();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
|
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.EntityPufferFish;
|
||||
import net.minecraft.server.v1_13_R1.IBlockData;
|
||||
@ -44,6 +45,7 @@ public class PufferFishController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,8 +168,16 @@ public class PufferFishController extends MobEntityController {
|
||||
return false; // shouldLeash
|
||||
}
|
||||
|
||||
@Override
|
||||
public void k() {
|
||||
super.k();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mobTick() {
|
||||
if (npc != null) {
|
||||
t(false);
|
||||
}
|
||||
super.mobTick();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
|
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.EntitySalmon;
|
||||
import net.minecraft.server.v1_13_R1.IBlockData;
|
||||
@ -44,6 +45,7 @@ public class SalmonController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +170,9 @@ public class SalmonController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void mobTick() {
|
||||
if (npc != null) {
|
||||
t(false);
|
||||
}
|
||||
super.mobTick();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
|
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.EntityTropicalFish;
|
||||
import net.minecraft.server.v1_13_R1.IBlockData;
|
||||
@ -44,6 +45,7 @@ public class TropicalFishController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +170,9 @@ public class TropicalFishController extends MobEntityController {
|
||||
|
||||
@Override
|
||||
public void mobTick() {
|
||||
if (npc != null) {
|
||||
t(false);
|
||||
}
|
||||
super.mobTick();
|
||||
if (npc != null) {
|
||||
npc.update();
|
||||
|
@ -15,6 +15,7 @@ import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_13_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_13_R1.ControllerMove;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.EntityTurtle;
|
||||
import net.minecraft.server.v1_13_R1.IBlockData;
|
||||
@ -44,6 +45,7 @@ public class TurtleController extends MobEntityController {
|
||||
this.npc = (CitizensNPC) npc;
|
||||
if (npc != null) {
|
||||
NMSImpl.clearGoals(goalSelector, targetSelector);
|
||||
this.moveController = new ControllerMove(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user