Class CampfireBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.CampfireBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.Campfire
public class CampfireBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Campfire
- Author:
- Sleepybear
-
Field Summary
Fields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionCampfireBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod is used to clear all of the items cooking in the fire, without dropping any into the world.org.cloudburstmc.api.item.ItemStackgetItemInFire(int index)booleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidonBreak()booleanonUpdate()booleanputItemInFire(org.cloudburstmc.api.item.ItemStack item)booleanputItemInFire(org.cloudburstmc.api.item.ItemStack item, int index, boolean overwrite)protected voidsaveClientData(com.nukkitx.nbt.NbtMapBuilder tag)NBT data that is specifically sent to the clientMethods 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, saveAdditionalData, 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, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAllMethods inherited from interface org.cloudburstmc.api.blockentity.Campfire
putItemInFire
-
Constructor Details
-
CampfireBlockEntity
public CampfireBlockEntity(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
-
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
-
onBreak
public void onBreak()- Specified by:
onBreakin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onBreakin classBaseBlockEntity
-
getItemInFire
public org.cloudburstmc.api.item.ItemStack getItemInFire(int index) -
putItemInFire
public boolean putItemInFire(org.cloudburstmc.api.item.ItemStack item)- Specified by:
putItemInFirein interfaceorg.cloudburstmc.api.blockentity.Campfire
-
putItemInFire
public boolean putItemInFire(org.cloudburstmc.api.item.ItemStack item, int index, boolean overwrite)- Specified by:
putItemInFirein interfaceorg.cloudburstmc.api.blockentity.Campfire
-
clearItems
public void clearItems()Method is used to clear all of the items cooking in the fire, without dropping any into the world. -
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-