Class SignBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.SignBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.Sign
public class SignBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Sign
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
ConstructorsConstructorDescriptionSignBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionString[]getText()booleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidsaveClientData(com.nukkitx.nbt.NbtMapBuilder tag)NBT data that is specifically sent to the clientvoidvoidsetTextOwner(String textOwner)booleanupdateNbtMap(com.nukkitx.nbt.NbtMap tag, CloudPlayer player)Called when a player updates a block entity's NBT data for example when writing on a sign.Methods inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
close, getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServer, getServerTag, getTag, getType, hasCustomName, init, isClosed, isMovable, onBreak, onUpdate, saveAdditionalData, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClientMethods 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
close, getBlock, getBlockState, getCustomName, getLevel, getPosition, getType, hasCustomName, isClosed, isMovable, onBreak, onUpdate, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll
-
Constructor Details
-
SignBlockEntity
public SignBlockEntity(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
public 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
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
setText
- Specified by:
setTextin interfaceorg.cloudburstmc.api.blockentity.Sign
-
getText
- Specified by:
getTextin interfaceorg.cloudburstmc.api.blockentity.Sign
-
getTextOwner
- Specified by:
getTextOwnerin interfaceorg.cloudburstmc.api.blockentity.Sign
-
setTextOwner
- Specified by:
setTextOwnerin interfaceorg.cloudburstmc.api.blockentity.Sign
-
updateNbtMap
Description copied from class:BaseBlockEntityCalled when a player updates a block entity's NBT data for example when writing on a sign.- Overrides:
updateNbtMapin classBaseBlockEntity- Parameters:
tag- tagplayer- player- Returns:
- bool indication of success, will respawn the tile to the player if false.
-
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-