Abstract
Service only access without proxy wrapping Prefer unified CacheLayer.* methods in normal usage
CacheLayer.*
Service examples:
worldState.getAllPlayers()
worldState.getPlayerById(id)
players.getGameMode(player)
players.setGameMode(player, mode)
dimensions.get("minecraft:overworld")
entities.getComponent(entity, type)
ownership.getOwnedEntities(owner)
blocks.getBlock(dimension, location)
Static
Service only access without proxy wrapping Prefer unified
CacheLayer.*methods in normal usageService examples:
worldState.getAllPlayers()for repeated player iterationworldState.getPlayerById(id)instead of scanning player arraysplayers.getGameMode(player)/players.setGameMode(player, mode)for gamemode cachingdimensions.get("minecraft:overworld")for dimension handle reuseentities.getComponent(entity, type)for entity component cachingownership.getOwnedEntities(owner)for entity ownership lookupsblocks.getBlock(dimension, location)for block position caching