Skip to content

Commit

Permalink
fix: skip chunk sent check for optimized entity tracking
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
ishland committed Dec 10, 2023
1 parent 0544aa1 commit 7af5834
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import java.util.List;
Expand Down Expand Up @@ -106,4 +107,9 @@ private void beforeStartTracking(ServerPlayerEntity player, CallbackInfo ci) {
}
}

@Redirect(method = "updateTrackedStatus(Lnet/minecraft/server/network/ServerPlayerEntity;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/world/ThreadedAnvilChunkStorage;isTracked(Lnet/minecraft/server/network/ServerPlayerEntity;II)Z"))
private boolean assumeAlwaysTracked(ThreadedAnvilChunkStorage instance, ServerPlayerEntity player, int chunkX, int chunkZ) {
return true;
}

}

0 comments on commit 7af5834

Please sign in to comment.