Class MusicBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.MusicBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.Noteblock
public class MusicBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Noteblock
-
Field Summary
Fields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionMusicBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionvoidbytegetNote()booleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsetNote(int note)voidsetPowered(boolean powered)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, isSpawnable, onBreak, onUpdate, saveClientData, 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
close, getBlock, getBlockState, getCustomName, getLevel, getPosition, getType, hasCustomName, isClosed, isMovable, isSpawnable, onBreak, onUpdate, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll
-
Constructor Details
-
MusicBlockEntity
public MusicBlockEntity(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
-
saveAdditionalData
public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveAdditionalDatain classBaseBlockEntity
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
getNote
public byte getNote()- Specified by:
getNotein interfaceorg.cloudburstmc.api.blockentity.Noteblock
-
setNote
public void setNote(int note)- Specified by:
setNotein interfaceorg.cloudburstmc.api.blockentity.Noteblock
-
changeNote
public void changeNote()- Specified by:
changeNotein interfaceorg.cloudburstmc.api.blockentity.Noteblock
-
isPowered
public boolean isPowered()- Specified by:
isPoweredin interfaceorg.cloudburstmc.api.blockentity.Noteblock
-
setPowered
public void setPowered(boolean powered)- Specified by:
setPoweredin interfaceorg.cloudburstmc.api.blockentity.Noteblock
-