Skip to content

Commit

Permalink
fix: use the correct distance map for shouldTick checks
Browse files Browse the repository at this point in the history
Fixes an issue where chunk ticking follows client view distance when it shouldn't
  • Loading branch information
ishland committed Oct 30, 2023
1 parent ee7e78f commit 0544aa1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public List<ServerPlayerEntity> getPlayersWatchingChunk(ChunkPos pos) {
} else {
ImmutableList.Builder<ServerPlayerEntity> builder = ImmutableList.builder();

for (Object __player : this.areaPlayerChunkWatchingManager.getPlayersWatchingChunkArray(l)) {
for (Object __player : this.areaPlayerChunkWatchingManager.getPlayersInGeneralAreaMap(l)) {
if (__player instanceof ServerPlayerEntity serverPlayerEntity) {
if (this.canTickChunk(serverPlayerEntity, pos)) {
builder.add(serverPlayerEntity);
Expand All @@ -145,7 +145,7 @@ public boolean shouldTick(ChunkPos pos) {
if (!this.ticketManager.shouldTick(l)) {
return false;
} else {
for (Object __player : this.areaPlayerChunkWatchingManager.getPlayersWatchingChunkArray(l)) {
for (Object __player : this.areaPlayerChunkWatchingManager.getPlayersInGeneralAreaMap(l)) {
if (__player instanceof ServerPlayerEntity serverPlayerEntity) {
if (this.canTickChunk(serverPlayerEntity, pos)) {
return true;
Expand Down

0 comments on commit 0544aa1

Please sign in to comment.