Class PlayerCache

java.lang.Object
com.zenith.cache.data.PlayerCache
All Implemented Interfaces:
CachedData

public class PlayerCache extends Object implements CachedData
  • Field Details

    • hardcore

      protected boolean hardcore
    • reducedDebugInfo

      protected boolean reducedDebugInfo
    • maxPlayers

      protected int maxPlayers
    • enableRespawnScreen

      protected boolean enableRespawnScreen
    • doLimitedCrafting

      protected boolean doLimitedCrafting
    • lastDeathPos

      protected GlobalPos lastDeathPos
    • portalCooldown

      protected int portalCooldown
    • gameMode

      protected GameMode gameMode
    • heldItemSlot

      protected int heldItemSlot
    • thePlayer

      protected EntityPlayer thePlayer
    • inventoryCache

      protected final InventoryCache inventoryCache
    • entityCache

      protected final EntityCache entityCache
    • difficulty

      protected Difficulty difficulty
    • isDifficultyLocked

      protected boolean isDifficultyLocked
    • invincible

      protected boolean invincible
    • canFly

      protected boolean canFly
    • flying

      protected boolean flying
    • creative

      protected boolean creative
    • flySpeed

      protected float flySpeed
    • walkSpeed

      protected float walkSpeed
    • isSneaking

      protected boolean isSneaking
    • isSprinting

      protected boolean isSprinting
    • opLevel

      protected EntityEvent opLevel
    • actionId

      protected AtomicInteger actionId
    • seqId

      protected AtomicInteger seqId
    • spawnPosition

      protected MutableVec3i spawnPosition
    • teleportQueue

      protected it.unimi.dsi.fastutil.ints.IntArrayFIFOQueue teleportQueue
    • respawning

      protected boolean respawning
  • Constructor Details

    • PlayerCache

      public PlayerCache(EntityCache entityCache)
  • Method Details

    • getPackets

      public void getPackets(@NonNull Consumer<Packet> consumer, @NonNull TcpSession session)
      Specified by:
      getPackets in interface CachedData
    • reset

      public void reset(CacheResetType type)
      Specified by:
      reset in interface CachedData
    • getSendingMessage

      public String getSendingMessage()
      Specified by:
      getSendingMessage in interface CachedData
    • inventorySync

      public static void inventorySync()
    • isAlive

      public boolean isAlive()
    • setInventory

      public void setInventory(int containerId, ItemStack[] inventory)
    • getEquipment

      public ItemStack getEquipment(EquipmentSlot slot)
    • getEquipment

      public ItemStack getEquipment(Hand hand)
    • getEquipment

      public Map<EquipmentSlot, ItemStack> getEquipment()
    • setInventorySlot

      public void setInventorySlot(int containerId, ItemStack newItemStack, int slot)
    • getX

      public double getX()
    • setX

      public PlayerCache setX(double x)
    • getY

      public double getY()
    • getEyeY

      public double getEyeY()
    • setY

      public PlayerCache setY(double y)
    • getZ

      public double getZ()
    • setZ

      public PlayerCache setZ(double z)
    • getYaw

      public float getYaw()
    • setYaw

      public PlayerCache setYaw(float yaw)
    • getPitch

      public float getPitch()
    • setPitch

      public PlayerCache setPitch(float pitch)
    • getVelX

      public double getVelX()
    • setVelX

      public PlayerCache setVelX(double velX)
    • getVelY

      public double getVelY()
    • setVelY

      public PlayerCache setVelY(double velY)
    • getVelZ

      public double getVelZ()
    • setVelZ

      public PlayerCache setVelZ(double velZ)
    • getEntityId

      public int getEntityId()
    • setEntityId

      public PlayerCache setEntityId(int id)
    • setUuid

      public PlayerCache setUuid(UUID uuid)
    • distanceSqToSelf

      public double distanceSqToSelf(Entity entity)
    • closeContainer

      public void closeContainer(int containerId)
    • openContainer

      public void openContainer(int containerId, ContainerType type, net.kyori.adventure.text.Component title)
    • getPlayerInventory

      public List<ItemStack> getPlayerInventory()