Fix players waiting for 60 ticks client timeout delay before becoming interactable in 1.21.4

This commit is contained in:
fullwall 2024-12-10 19:01:36 +08:00
parent d8cc7b6f94
commit b2cedaf36c
13 changed files with 1 additions and 15 deletions

View File

@ -240,7 +240,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
}
@Override

View File

@ -269,7 +269,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
}
@Override

View File

@ -277,7 +277,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -267,7 +267,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -269,7 +269,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -269,7 +269,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -241,7 +241,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
conn.setPacketListener(playerConnection);
} catch (IOException e) {
}
invulnerableTicks = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -261,7 +261,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
} catch (IOException e) {
// swallow
}
this.invulnerableTime = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -261,7 +261,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
conn.setListener(connection);
} catch (IOException e) {
}
this.invulnerableTime = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -266,7 +266,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
conn.setListener(connection);
} catch (IOException e) {
}
this.invulnerableTime = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -60,13 +60,11 @@ import net.minecraft.world.phys.Vec3;
public class EntityHumanNPC extends ServerPlayer implements NPCHolder, SkinnableEntity, ForwardingMobAI {
private PlayerAdvancements advancements;
private MobAI ai;
private int jumpTicks = 0;
private final CitizensNPC npc;
private boolean setBukkitEntity;
private final SkinPacketTracker skinTracker;
private EmptyServerStatsCounter statsCache;
public EntityHumanNPC(MinecraftServer minecraftServer, ServerLevel world, GameProfile gameProfile,
@ -269,7 +267,6 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
} catch (IOException e) {
e.printStackTrace();
}
this.invulnerableTime = 0;
setSkinFlags((byte) 0xFF);
}

View File

@ -268,7 +268,7 @@ public class EntityHumanNPC extends ServerPlayer implements NPCHolder, Skinnable
} catch (IOException e) {
e.printStackTrace();
}
this.invulnerableTime = 0;
setClientLoaded(true);
setSkinFlags((byte) 0xFF);
}

View File

@ -241,7 +241,6 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
controllerJump = new PlayerControllerJump(this);
controllerMove = new PlayerControllerMove(this);
navigation = new PlayerNavigation(this, world);
invulnerableTicks = 0;
}
public boolean isNavigating() {