public class BrewingStandBlockEntity extends BaseBlockEntity implements BrewingStand
| Modifier and Type | Field and Description |
|---|---|
short |
cookTime |
short |
fuelAmount |
short |
fuelTotal |
static List<Identifier> |
ingredients |
protected BrewingInventory |
inventory |
static short |
MAX_COOK_TIME |
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing| Constructor and Description |
|---|
BrewingStandBlockEntity(BlockEntityType<?> type,
Chunk chunk,
com.nukkitx.math.vector.Vector3i position) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkIngredient(Item ingredient) |
void |
close() |
short |
getCookTime() |
short |
getFuelAmount() |
short |
getFuelTotal() |
int[] |
getHopperPullSlots()
Returns list of slot indexes where the item should be pulled from
|
int[] |
getHopperPushSlots(Direction direction,
Item item)
Returns an array of slot indexes where the item should be pushed to
|
BrewingInventory |
getInventory() |
boolean |
isSpawnable() |
boolean |
isValid() |
void |
loadAdditionalData(com.nukkitx.nbt.NbtMap tag) |
void |
onBreak() |
boolean |
onUpdate() |
void |
saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag) |
protected void |
saveClientData(com.nukkitx.nbt.NbtMapBuilder tag)
NBT data that is specifically sent to the client
|
protected void |
sendBrewTime() |
void |
sendFuel() |
void |
setCookTime(int cookTime) |
void |
setFuelAmount(int fuel) |
void |
setFuelTotal(short fuelTotal) |
void |
updateBlock() |
getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServerTag, getType, hasCustomName, init, isClosed, isMovable, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClient, updateNbtMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBlock, getBlockState, getChunkTag, getClientTag, getCustomName, getItemTag, getLevel, getPosition, getServerTag, getType, hasCustomName, isClosed, isMovable, scheduleUpdate, setCustomName, setDirty, setMovable, spawnTo, spawnToAll, updateFromClientpublic static final short MAX_COOK_TIME
public static final List<Identifier> ingredients
protected final BrewingInventory inventory
public short cookTime
public short fuelTotal
public short fuelAmount
public BrewingStandBlockEntity(BlockEntityType<?> type, Chunk chunk, com.nukkitx.math.vector.Vector3i position)
public void loadAdditionalData(com.nukkitx.nbt.NbtMap tag)
loadAdditionalData in interface BlockEntityloadAdditionalData in class BaseBlockEntitypublic void saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)
saveAdditionalData in interface BlockEntitysaveAdditionalData in class BaseBlockEntityprotected void saveClientData(com.nukkitx.nbt.NbtMapBuilder tag)
BaseBlockEntitysaveClientData in class BaseBlockEntitytag - tag to write data topublic void close()
close in interface BlockEntityclose in class BaseBlockEntitypublic void onBreak()
onBreak in interface BlockEntityonBreak in class BaseBlockEntitypublic boolean isValid()
isValid in interface BlockEntityisValid in class BaseBlockEntitypublic BrewingInventory getInventory()
getInventory in interface BrewingStandgetInventory in interface InventoryHolderprotected boolean checkIngredient(Item ingredient)
public short getCookTime()
getCookTime in interface BrewingStandpublic void setCookTime(int cookTime)
setCookTime in interface BrewingStandpublic short getFuelTotal()
public void setFuelTotal(short fuelTotal)
public boolean onUpdate()
onUpdate in interface BlockEntityonUpdate in class BaseBlockEntitypublic void sendFuel()
protected void sendBrewTime()
public void updateBlock()
public short getFuelAmount()
getFuelAmount in interface BrewingStandpublic void setFuelAmount(int fuel)
setFuelAmount in interface BrewingStandpublic int[] getHopperPushSlots(Direction direction, Item item)
ContainerBlockEntitygetHopperPushSlots in interface ContainerBlockEntitydirection - direction from hopper to this block entityitem - target itempublic int[] getHopperPullSlots()
ContainerBlockEntitygetHopperPullSlots in interface ContainerBlockEntitypublic boolean isSpawnable()
isSpawnable in interface BlockEntityisSpawnable in class BaseBlockEntityCopyright © 2020. All rights reserved.