Class BrewingStandBlockEntity

java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.BrewingStandBlockEntity
All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity, org.cloudburstmc.api.blockentity.BrewingStand, org.cloudburstmc.api.blockentity.ContainerBlockEntity, org.cloudburstmc.api.inventory.InventoryHolder

public class BrewingStandBlockEntity extends BaseBlockEntity implements org.cloudburstmc.api.blockentity.BrewingStand
  • Field Details

    • MAX_COOK_TIME

      public static final short MAX_COOK_TIME
      See Also:
      Constant Field Values
    • ingredients

      public static final List<org.cloudburstmc.api.item.ItemType> ingredients
    • inventory

      protected final CloudBrewingInventory inventory
    • cookTime

      public short cookTime
    • fuelTotal

      public short fuelTotal
    • fuelAmount

      public short fuelAmount
  • Constructor Details

    • BrewingStandBlockEntity

      public BrewingStandBlockEntity(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
    • saveAdditionalData

      public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)
      Overrides:
      saveAdditionalData 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
    • close

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

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

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

      public CloudBrewingInventory getInventory()
      Specified by:
      getInventory in interface org.cloudburstmc.api.blockentity.BrewingStand
      Specified by:
      getInventory in interface org.cloudburstmc.api.inventory.InventoryHolder
    • checkIngredient

      protected boolean checkIngredient(org.cloudburstmc.api.item.ItemStack ingredient)
    • getCookTime

      public short getCookTime()
      Specified by:
      getCookTime in interface org.cloudburstmc.api.blockentity.BrewingStand
    • setCookTime

      public void setCookTime(int cookTime)
      Specified by:
      setCookTime in interface org.cloudburstmc.api.blockentity.BrewingStand
    • getFuelTotal

      public short getFuelTotal()
    • setFuelTotal

      public void setFuelTotal(short fuelTotal)
    • onUpdate

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

      public void sendFuel()
    • sendBrewTime

      protected void sendBrewTime()
    • updateBlock

      public void updateBlock()
    • getFuelAmount

      public short getFuelAmount()
      Specified by:
      getFuelAmount in interface org.cloudburstmc.api.blockentity.BrewingStand
    • setFuelAmount

      public void setFuelAmount(int fuel)
      Specified by:
      setFuelAmount in interface org.cloudburstmc.api.blockentity.BrewingStand
    • getHopperPushSlots

      public int[] getHopperPushSlots(org.cloudburstmc.api.util.Direction direction, org.cloudburstmc.api.item.ItemStack item)
      Specified by:
      getHopperPushSlots in interface org.cloudburstmc.api.blockentity.ContainerBlockEntity
    • getHopperPullSlots

      public int[] getHopperPullSlots()
      Specified by:
      getHopperPullSlots in interface org.cloudburstmc.api.blockentity.ContainerBlockEntity
    • isSpawnable

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