Class PlayerCache
java.lang.Object
com.zenith.cache.data.PlayerCache
- All Implemented Interfaces:
CachedData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicIntegerprotected booleanprotected booleanprotected Difficultyprotected booleanprotected booleanprotected final EntityCacheprotected booleanprotected floatprotected GameModeprotected booleanprotected intprotected final InventoryCacheprotected booleanprotected booleanprotected booleanprotected booleanprotected GlobalPosprotected intprotected EntityEventprotected intprotected booleanprotected booleanprotected AtomicIntegerprotected MutableVec3iprotected Queue<ClientboundPlayerPositionPacket> protected EntityPlayerprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloseContainer(int containerId) doubledistanceSqToSelf(Entity entity) intgetEquipment(EquipmentSlot slot) getEquipment(Hand hand) doublegetEyeY()voidgetPackets(@NonNull Consumer<Packet> consumer, @NonNull TcpSession session) floatgetPitch()doublegetVelX()doublegetVelY()doublegetVelZ()doublegetX()doublegetY()floatgetYaw()doublegetZ()static voidbooleanisAlive()voidopenContainer(int containerId, ContainerType type, net.kyori.adventure.text.Component title) voidreset(CacheResetType type) setEntityId(int id) voidsetInventory(int containerId, ItemStack[] inventory) voidsetInventorySlot(int containerId, ItemStack newItemStack, int slot) setPitch(float pitch) setVelX(double velX) setVelY(double velY) setVelZ(double velZ) setX(double x) setY(double y) setYaw(float yaw) setZ(double z)
-
Field Details
-
hardcore
protected boolean hardcore -
reducedDebugInfo
protected boolean reducedDebugInfo -
maxPlayers
protected int maxPlayers -
enableRespawnScreen
protected boolean enableRespawnScreen -
doLimitedCrafting
protected boolean doLimitedCrafting -
lastDeathPos
-
portalCooldown
protected int portalCooldown -
gameMode
-
heldItemSlot
protected int heldItemSlot -
thePlayer
-
inventoryCache
-
entityCache
-
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
-
actionId
-
seqId
-
spawnPosition
-
teleportQueue
-
respawning
protected boolean respawning
-
-
Constructor Details
-
PlayerCache
-
-
Method Details
-
getPackets
- Specified by:
getPacketsin interfaceCachedData
-
reset
- Specified by:
resetin interfaceCachedData
-
getSendingMessage
- Specified by:
getSendingMessagein interfaceCachedData
-
inventorySync
public static void inventorySync() -
isAlive
public boolean isAlive() -
setInventory
-
getEquipment
-
getEquipment
-
getEquipment
-
setInventorySlot
-
getX
public double getX() -
setX
-
getY
public double getY() -
getEyeY
public double getEyeY() -
setY
-
getZ
public double getZ() -
setZ
-
getYaw
public float getYaw() -
setYaw
-
getPitch
public float getPitch() -
setPitch
-
getVelX
public double getVelX() -
setVelX
-
getVelY
public double getVelY() -
setVelY
-
getVelZ
public double getVelZ() -
setVelZ
-
getEntityId
public int getEntityId() -
setEntityId
-
setUuid
-
distanceSqToSelf
-
closeContainer
public void closeContainer(int containerId) -
openContainer
public void openContainer(int containerId, ContainerType type, net.kyori.adventure.text.Component title) -
getPlayerInventory
-