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
@@ -188,6 +188,8 @@ public class FightSystem extends JavaPlugin {
}else if(Config.mode == ArenaMode.PREPARE) {
Fight.getUnrotated().setSchem(SchematicNode.getSchematicNode(Config.PrepareSchemID));
}
CraftbukkitWrapper.impl.setupGamerule();
}
@Override
@@ -33,4 +33,6 @@ public interface CraftbukkitWrapper {
float headRotation(Entity e);
Stream<?> entityIterator();
void setupGamerule();
}
@@ -59,7 +59,7 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati
private final SecretKey key;
public TechHiderWrapper() {
super(ENABLED, FightState.All);
super(ENABLED, FightState.Schem);
techHider = new TechHider(this, Config.ObfuscateWith, Config.HiddenBlocks, Config.HiddenBlockEntities);
try {
@@ -68,7 +68,7 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati
throw new SecurityException(e);
}
new StateDependentListener(ENABLED, FightState.All, this);
new StateDependentListener(ENABLED, FightState.Schem, this);
register();
}