Tick inactive goal selectors

This commit is contained in:
Shane Freeder 2020-12-09 20:31:08 +00:00
parent c19ec63941
commit cc04948176

View file

@ -85,7 +85,7 @@ index 68f1a101174f4a2f7ab5556a5b733f75f3a7802f..4757e5a92c9cf04fa52d62bac6dae782
protected EntityCreature(EntityTypes<? extends EntityCreature> entitytypes, World world) {
super(entitytypes, world);
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index d91503b3e46c6ded3d77da4feeb8350df5bf924c..7ddf276732a58c998c733aaaeee3e1bfc614ea0a 100644
index d91503b3e46c6ded3d77da4feeb8350df5bf924c..dcc5b098bfe36ef7ee8536b3da65c4ce1748c9d8 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -47,7 +47,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -97,7 +97,7 @@ index d91503b3e46c6ded3d77da4feeb8350df5bf924c..7ddf276732a58c998c733aaaeee3e1bf
private int bx;
@Nullable
private NBTTagCompound by;
@@ -128,6 +128,17 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -128,6 +128,19 @@ public abstract class EntityInsentient extends EntityLiving {
return this.lookController;
}
@ -105,7 +105,9 @@ index d91503b3e46c6ded3d77da4feeb8350df5bf924c..7ddf276732a58c998c733aaaeee3e1bf
+ @Override
+ public void inactiveTick() {
+ super.inactiveTick();
+ this.goalSelector.inactiveTick();
+ if (this.goalSelector.inactiveTick()) {
+ this.goalSelector.doTick();
+ }
+ if (this.targetSelector.inactiveTick()) {
+ this.targetSelector.doTick();
+ }