Class EntityCache

java.lang.Object
org.geysermc.geyser.session.cache.EntityCache

public class EntityCache extends Object
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 Details

  • Method Details

    • spawnEntity

      public void spawnEntity(Entity entity)
    • cacheEntity

      public boolean cacheEntity(Entity entity)
    • removeEntity

      public boolean removeEntity(Entity entity, boolean force)
    • removeAllEntities

      public void removeAllEntities()
    • getEntityByGeyserId

      public Entity getEntityByGeyserId(long geyserId)
    • getEntityByJavaId

      public Entity getEntityByJavaId(int javaId)
    • addPlayerEntity

      public void addPlayerEntity(PlayerEntity entity)
    • getPlayerEntity

      public PlayerEntity getPlayerEntity(UUID uuid)
    • removePlayerEntity

      public PlayerEntity removePlayerEntity(UUID uuid)
    • getAllPlayerEntities

      public Collection<PlayerEntity> getAllPlayerEntities()
    • addBossBar

      public void addBossBar(UUID uuid, BossBar bossBar)
    • getBossBar

      public BossBar getBossBar(UUID uuid)
    • removeBossBar

      public void removeBossBar(UUID uuid)
    • addBossBars

      public void addBossBars()
      Re-adds all boss bars to the client by re-creating the entities attached to them. This seems to fix boss bars showing up on dimension switch, as of Bedrock 1.19.81.
    • updateBossBars

      public void updateBossBars()
    • getTickableEntities

      public List<Tickable> getTickableEntities()
    • getEntities

      public it.unimi.dsi.fastutil.longs.Long2ObjectMap<Entity> getEntities()
    • getNextEntityId

      public AtomicLong getNextEntityId()