Class BeaconBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.BeaconBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.Beacon,org.cloudburstmc.api.blockentity.BlockEntity
public class BeaconBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Beacon
author: Rover656
-
Field Summary
Fields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionBeaconBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.api.potion.EffectTypeorg.cloudburstmc.api.potion.EffectTypebooleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)booleanonUpdate()voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsetPrimaryEffect(int legacyId)voidsetPrimaryEffect(org.cloudburstmc.api.potion.EffectType primaryEfect)voidsetSecondaryEffect(int legacyId)voidsetSecondaryEffect(org.cloudburstmc.api.potion.EffectType secondaryEffect)booleanupdateNbtMap(com.nukkitx.nbt.NbtMap nbt, 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, saveClientData, 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, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll
-
Constructor Details
-
BeaconBlockEntity
public BeaconBlockEntity(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
-
onUpdate
public boolean onUpdate()- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onUpdatein classBaseBlockEntity
-
getPrimaryEffect
public org.cloudburstmc.api.potion.EffectType getPrimaryEffect() -
setPrimaryEffect
public void setPrimaryEffect(org.cloudburstmc.api.potion.EffectType primaryEfect) -
getSecondaryEffect
public org.cloudburstmc.api.potion.EffectType getSecondaryEffect() -
setSecondaryEffect
public void setSecondaryEffect(org.cloudburstmc.api.potion.EffectType secondaryEffect) -
setPrimaryEffect
public void setPrimaryEffect(int legacyId) -
setSecondaryEffect
public void setSecondaryEffect(int legacyId) -
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:
nbt- 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
-