Package net.glowstone.block.entity
Class ChestEntity
java.lang.Object
net.glowstone.block.entity.BlockEntity
net.glowstone.block.entity.ContainerEntity
net.glowstone.block.entity.ChestEntity
Block entity for Chests.
-
Field Summary
Fields inherited from class net.glowstone.block.entity.BlockEntity
block
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Increments the count of viewing players, and plays the opening sound if this chest isn't already open.getState()
Create a new BlockState which will correspond to this block entity.void
Decrements the count of viewing players, and plays the chest closing sound if nobody else is holding the chest open.void
update
(GlowPlayer player) Update this BlockEntity's visible state to the given player.Methods inherited from class net.glowstone.block.entity.ContainerEntity
getInventory, loadNbt, saveNbt, setContents
Methods inherited from class net.glowstone.block.entity.BlockEntity
destroy, getBlock, pulse, setSaveId, updateInRange
-
Constructor Details
-
ChestEntity
-
-
Method Details
-
getState
Description copied from class:BlockEntity
Create a new BlockState which will correspond to this block entity.- Overrides:
getState
in classBlockEntity
- Returns:
- A GlowBlockState, or null to use a standard BlockState.
-
addViewer
public void addViewer()Increments the count of viewing players, and plays the opening sound if this chest isn't already open. -
removeViewer
public void removeViewer()Decrements the count of viewing players, and plays the chest closing sound if nobody else is holding the chest open. -
update
Description copied from class:BlockEntity
Update this BlockEntity's visible state to the given player.- Overrides:
update
in classBlockEntity
- Parameters:
player
- The player to update.
-