Class ChestBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.ChestBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.Chest,org.cloudburstmc.api.blockentity.ContainerBlockEntity,org.cloudburstmc.api.inventory.InventoryHolder
- Direct Known Subclasses:
EnderChestBlockEntity
public class ChestBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Chest
author: MagicDroidX
Nukkit Project
-
Field Summary
Fields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionChestBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclose()getPair()booleanbooleanisPaired()booleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidonBreak()booleanonUpdate()booleanpairWith(org.cloudburstmc.api.blockentity.Chest chest)voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)protected voidsaveClientData(com.nukkitx.nbt.NbtMapBuilder tag)NBT data that is specifically sent to the clientvoidsetFindable(boolean findable)voidsetPairlead(boolean pairlead)booleanunpair()Methods inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServer, getServerTag, getTag, getType, hasCustomName, init, isClosed, isMovable, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClient, updateNbtMapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudburstmc.api.blockentity.BlockEntity
getBlock, getBlockState, getCustomName, getLevel, getPosition, getType, hasCustomName, isClosed, isMovable, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAllMethods inherited from interface org.cloudburstmc.api.blockentity.ContainerBlockEntity
getHopperPullSlots, getHopperPushSlots
-
Constructor Details
-
ChestBlockEntity
public ChestBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position)
-
-
Method Details
-
loadAdditionalData
public void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)- Overrides:
loadAdditionalDatain classBaseBlockEntity
-
saveClientData
protected void saveClientData(com.nukkitx.nbt.NbtMapBuilder tag)Description copied from class:BaseBlockEntityNBT data that is specifically sent to the client- Overrides:
saveClientDatain classBaseBlockEntity- Parameters:
tag- tag to write data to
-
saveAdditionalData
public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveAdditionalDatain classBaseBlockEntity
-
setPairlead
public void setPairlead(boolean pairlead) -
isFindable
public boolean isFindable()- Specified by:
isFindablein interfaceorg.cloudburstmc.api.blockentity.Chest
-
setFindable
public void setFindable(boolean findable)- Specified by:
setFindablein interfaceorg.cloudburstmc.api.blockentity.Chest
-
close
public void close()- Specified by:
closein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
closein classBaseBlockEntity
-
onBreak
public void onBreak()- Specified by:
onBreakin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onBreakin classBaseBlockEntity
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
getInventory
- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.blockentity.Chest- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.inventory.InventoryHolder
-
getRealInventory
-
checkPairing
protected void checkPairing() -
isPaired
public boolean isPaired()- Specified by:
isPairedin interfaceorg.cloudburstmc.api.blockentity.Chest
-
getPair
- Specified by:
getPairin interfaceorg.cloudburstmc.api.blockentity.Chest
-
pairWith
public boolean pairWith(org.cloudburstmc.api.blockentity.Chest chest)- Specified by:
pairWithin interfaceorg.cloudburstmc.api.blockentity.Chest
-
unpair
public boolean unpair()- Specified by:
unpairin interfaceorg.cloudburstmc.api.blockentity.Chest
-
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-
onUpdate
public boolean onUpdate()- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onUpdatein classBaseBlockEntity
-