mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-15 07:05:43 +01:00
Stop default AI for players mounted on pigs
This commit is contained in:
parent
30ef5de8e0
commit
407430daa5
@ -13,7 +13,6 @@ import net.citizensnpcs.api.npc.NPC;
|
||||
import net.citizensnpcs.nms.v1_10_R1.util.NMSImpl;
|
||||
import net.citizensnpcs.npc.CitizensNPC;
|
||||
import net.citizensnpcs.npc.ai.NPCHolder;
|
||||
import net.citizensnpcs.trait.Controllable;
|
||||
import net.citizensnpcs.util.Util;
|
||||
import net.minecraft.server.v1_10_R1.BlockPosition;
|
||||
import net.minecraft.server.v1_10_R1.EntityLightning;
|
||||
@ -91,7 +90,7 @@ public class PigController extends MobEntityController {
|
||||
if (npc == null) {
|
||||
return super.cP();
|
||||
}
|
||||
return npc.hasTrait(Controllable.class) && npc.getTrait(Controllable.class).isEnabled();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -85,6 +85,12 @@ public class PigController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cR() {
|
||||
// block carrot-on-a-stick behaviour
|
||||
return npc == null ? super.cR() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean d(NBTTagCompound save) {
|
||||
return npc == null ? super.d(save) : false;
|
||||
|
@ -90,6 +90,12 @@ public class PigController extends MobEntityController {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean cV() {
|
||||
// block carrot-on-a-stick behaviour
|
||||
return npc == null ? super.cV() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SoundEffect d(DamageSource damagesource) {
|
||||
return NMSImpl.getSoundEffect(npc, super.d(damagesource), NPC.HURT_SOUND_METADATA);
|
||||
|
Loading…
Reference in New Issue
Block a user