Class EntityCache
java.lang.Object
org.geysermc.geyser.session.cache.EntityCache
Each session has its own EntityCache in the occasion that an entity packet is sent specifically
for that player (e.g. seeing vanished players from /vanish)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBossBar(UUID uuid, BossBar bossBar) voidaddPlayerEntity(PlayerEntity entity) booleancacheEntity(Entity entity) voidforEachPlayerEntity(Consumer<PlayerEntity> player) Run a specific bit of code for each cached player entity.getBossBar(UUID uuid) it.unimi.dsi.fastutil.longs.Long2ObjectMap<Entity>getEntityByGeyserId(long geyserId) getEntityByJavaId(int javaId) getEntityByUuid(UUID uuid) getPlayerEntity(UUID uuid) getPlayersByName(String name) voidvoidvoidvoidvoidremoveBossBar(UUID uuid) voidremoveEntity(Entity entity) removePlayerEntity(UUID uuid) voidspawnEntity(Entity entity) void
-
Constructor Details
-
EntityCache
-
-
Method Details
-
spawnEntity
-
cacheEntity
-
removeEntity
-
markDirty
-
removeAllEntities
public void removeAllEntities() -
getEntityByGeyserId
-
getEntityByJavaId
-
getEntityByUuid
-
addPlayerEntity
-
getPlayerEntity
-
getPlayersByName
-
removePlayerEntity
-
forEachPlayerEntity
Run a specific bit of code for each cached player entity. As usual with synchronized, try to minimize the amount of work you because you block the PlayerList collection. -
removeAllPlayerEntities
public void removeAllPlayerEntities() -
addBossBar
-
getBossBar
-
removeBossBar
-
updateBossBars
public void updateBossBars() -
getTickableEntities
-
removeAllBossBars
public void removeAllBossBars() -
getEntities
-
getDirtyEntities
-
getNextEntityId
-