Enhance compatibility and feature support for Minecraft 1.21: Add ProtocolWrapper21, update gamerule management, streamline entity tracking, and refine chunk hider logic.

This commit is contained in:
2025-07-31 11:34:56 +02:00
parent cf52b50333
commit e7803dcf82
18 changed files with 135 additions and 35 deletions
@@ -87,8 +87,8 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE
Set<String> hiddenBlockEntities = Collections.unmodifiableSet(new HashSet<>(config.getStringList("Techhider.HiddenBlockEntities")));
TechHider current = new TechHider((TechHider.LocationEvaluator) (p, cX, cY) -> {
Chunk playerChunk = p.getLocation().getChunk();
return playerChunk.getX() == cX && playerChunk.getZ() == cY;
if (rg.buildChunkOutside(cX, cY)) return true;
return !hidden.get(rg).contains(p);
}, Material.valueOf(obfuscateWith.toUpperCase()), hiddenBlocks.stream().map(String::toUpperCase).map(Material::valueOf).collect(Collectors.toSet()), hiddenBlockEntities);
current.enable();