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
  • 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:
      loadAdditionalData in class BaseBlockEntity
    • saveClientData

      protected void saveClientData(com.nukkitx.nbt.NbtMapBuilder tag)
      Description copied from class: BaseBlockEntity
      NBT data that is specifically sent to the client
      Overrides:
      saveClientData in class BaseBlockEntity
      Parameters:
      tag - tag to write data to
    • isValid

      public boolean isValid()
      Specified by:
      isValid in interface org.cloudburstmc.api.blockentity.BlockEntity
      Specified by:
      isValid in class BaseBlockEntity
    • onUpdate

      public boolean onUpdate()
      Specified by:
      onUpdate in interface org.cloudburstmc.api.blockentity.BlockEntity
      Overrides:
      onUpdate in class BaseBlockEntity
    • onBreak

      public void onBreak()
      Specified by:
      onBreak in interface org.cloudburstmc.api.blockentity.BlockEntity
      Overrides:
      onBreak in class BaseBlockEntity
    • getItemInFire

      public org.cloudburstmc.api.item.ItemStack getItemInFire(int index)
    • putItemInFire

      public boolean putItemInFire(org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      putItemInFire in interface org.cloudburstmc.api.blockentity.Campfire
    • putItemInFire

      public boolean putItemInFire(org.cloudburstmc.api.item.ItemStack item, int index, boolean overwrite)
      Specified by:
      putItemInFire in interface org.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:
      isSpawnable in interface org.cloudburstmc.api.blockentity.BlockEntity
      Overrides:
      isSpawnable in class BaseBlockEntity