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 Summary
FieldsModifier and TypeFieldDescriptionshortshortshortstatic List<org.cloudburstmc.api.item.ItemType>protected CloudBrewingInventorystatic shortFields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionBrewingStandBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckIngredient(org.cloudburstmc.api.item.ItemStack ingredient)voidclose()shortshortshortint[]int[]getHopperPushSlots(org.cloudburstmc.api.util.Direction direction, org.cloudburstmc.api.item.ItemStack item)booleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidonBreak()booleanonUpdate()voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)protected voidsaveClientData(com.nukkitx.nbt.NbtMapBuilder tag)NBT data that is specifically sent to the clientprotected voidvoidsendFuel()voidsetCookTime(int cookTime)voidsetFuelAmount(int fuel)voidsetFuelTotal(short fuelTotal)voidMethods inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServer, getServerTag, getTag, getType, hasCustomName, init, isClosed, isMovable, 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
getBlock, getBlockState, getCustomName, getLevel, getPosition, getType, hasCustomName, isClosed, isMovable, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll
-
Field Details
-
MAX_COOK_TIME
public static final short MAX_COOK_TIME- See Also:
- Constant Field Values
-
ingredients
-
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:
loadAdditionalDatain classBaseBlockEntity
-
saveAdditionalData
public void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)- Overrides:
saveAdditionalDatain 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
-
close
public void close()- Specified by:
closein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
closein classBaseBlockEntity
-
onBreak
public void onBreak()- Specified by:
onBreakin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onBreakin classBaseBlockEntity
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
getInventory
- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.blockentity.BrewingStand- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.inventory.InventoryHolder
-
checkIngredient
protected boolean checkIngredient(org.cloudburstmc.api.item.ItemStack ingredient) -
getCookTime
public short getCookTime()- Specified by:
getCookTimein interfaceorg.cloudburstmc.api.blockentity.BrewingStand
-
setCookTime
public void setCookTime(int cookTime)- Specified by:
setCookTimein interfaceorg.cloudburstmc.api.blockentity.BrewingStand
-
getFuelTotal
public short getFuelTotal() -
setFuelTotal
public void setFuelTotal(short fuelTotal) -
onUpdate
public boolean onUpdate()- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onUpdatein classBaseBlockEntity
-
sendFuel
public void sendFuel() -
sendBrewTime
protected void sendBrewTime() -
updateBlock
public void updateBlock() -
getFuelAmount
public short getFuelAmount()- Specified by:
getFuelAmountin interfaceorg.cloudburstmc.api.blockentity.BrewingStand
-
setFuelAmount
public void setFuelAmount(int fuel)- Specified by:
setFuelAmountin interfaceorg.cloudburstmc.api.blockentity.BrewingStand
-
getHopperPushSlots
public int[] getHopperPushSlots(org.cloudburstmc.api.util.Direction direction, org.cloudburstmc.api.item.ItemStack item)- Specified by:
getHopperPushSlotsin interfaceorg.cloudburstmc.api.blockentity.ContainerBlockEntity
-
getHopperPullSlots
public int[] getHopperPullSlots()- Specified by:
getHopperPullSlotsin interfaceorg.cloudburstmc.api.blockentity.ContainerBlockEntity
-
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-