mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
Add a cleargoals call for rabbits
This commit is contained in:
parent
809ef01b5d
commit
5f13340dea
@ -232,6 +232,7 @@ public class RabbitController extends MobEntityController {
|
||||
initPathfinder(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setRabbitType(type);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
datawatcher.set(NMSImpl.getRabbitTypeField(), type);
|
||||
}
|
||||
|
@ -232,6 +232,7 @@ public class RabbitController extends MobEntityController {
|
||||
initPathfinder(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setRabbitType(type);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
datawatcher.set(NMSImpl.getRabbitTypeField(), type);
|
||||
}
|
||||
|
@ -232,6 +232,7 @@ public class RabbitController extends MobEntityController {
|
||||
initPathfinder(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setRabbitType(type);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
datawatcher.set(NMSImpl.getRabbitTypeField(), type);
|
||||
}
|
||||
|
@ -216,6 +216,7 @@ public class RabbitController extends MobEntityController {
|
||||
registerGoals(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setRabbitType(type);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
entityData.set(NMSImpl.getRabbitTypeField(), type);
|
||||
}
|
||||
|
@ -217,6 +217,7 @@ public class RabbitController extends MobEntityController {
|
||||
registerGoals(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setRabbitType(type);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
entityData.set(NMSImpl.getRabbitTypeField(), type);
|
||||
}
|
||||
|
@ -218,6 +218,7 @@ public class RabbitController extends MobEntityController {
|
||||
registerGoals(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setVariant(variant);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.getRabbitTypeField() != null) {
|
||||
entityData.set(NMSImpl.getRabbitTypeField(), variant.id());
|
||||
}
|
||||
|
@ -208,6 +208,7 @@ public class RabbitController extends MobEntityController {
|
||||
registerGoals(); // make sure the evil goals include the default AI goals
|
||||
}
|
||||
super.setVariant(variant);
|
||||
NMSImpl.clearGoals(npc, goalSelector, targetSelector);
|
||||
} else if (NMSImpl.RABBIT_TYPE_DATAWATCHER != null) {
|
||||
entityData.set(NMSImpl.RABBIT_TYPE_DATAWATCHER, variant.id());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user