public class FurnaceBlockEntity extends BaseBlockEntity implements Furnace
| Modifier and Type | Field and Description |
|---|---|
protected short |
burnDuration |
protected short |
burnTime |
protected short |
cookTime |
protected FurnaceInventory |
inventory |
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing| Modifier | Constructor and Description |
|---|---|
|
FurnaceBlockEntity(BlockEntityType<?> type,
Chunk chunk,
com.nukkitx.math.vector.Vector3i position) |
protected |
FurnaceBlockEntity(BlockEntityType<?> type,
Chunk chunk,
com.nukkitx.math.vector.Vector3i position,
InventoryType inventoryType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkFuel(Item fuel) |
void |
close() |
protected void |
extinguishFurnace() |
int |
getBurnDuration() |
protected float |
getBurnRate() |
int |
getBurnTime() |
int |
getCookTime() |
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
|
FurnaceInventory |
getInventory() |
boolean |
isSpawnable() |
boolean |
isValid() |
protected void |
lightFurnace() |
void |
loadAdditionalData(com.nukkitx.nbt.NbtMap tag) |
void |
onBreak() |
boolean |
onUpdate() |
void |
saveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag) |
void |
setBurnDuration(int burnDuration) |
void |
setBurnTime(int burnTime) |
void |
setCookTime(int cookTime) |
getBlock, getBlockState, getChunk, getChunkTag, getClientTag, getCustomName, getId, getItemTag, getLevel, getPosition, getServerTag, getTag, getType, hasCustomName, init, isClosed, isMovable, saveClientData, 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, updateFromClientprotected final FurnaceInventory inventory
protected short burnTime
protected short cookTime
protected short burnDuration
protected FurnaceBlockEntity(BlockEntityType<?> type, Chunk chunk, com.nukkitx.math.vector.Vector3i position, InventoryType inventoryType)
public FurnaceBlockEntity(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 BaseBlockEntitypublic 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 FurnaceInventory getInventory()
getInventory in interface InventoryHolderprotected float getBurnRate()
protected void checkFuel(Item fuel)
public boolean onUpdate()
onUpdate in interface BlockEntityonUpdate in class BaseBlockEntityprotected void extinguishFurnace()
protected void lightFurnace()
public int getBurnTime()
public void setBurnTime(int burnTime)
public int getCookTime()
public void setCookTime(int cookTime)
public int getBurnDuration()
public void setBurnDuration(int burnDuration)
public boolean isSpawnable()
isSpawnable in interface BlockEntityisSpawnable in class BaseBlockEntitypublic int[] getHopperPullSlots()
ContainerBlockEntitygetHopperPullSlots in interface ContainerBlockEntitypublic int[] getHopperPushSlots(Direction direction, Item item)
ContainerBlockEntitygetHopperPushSlots in interface ContainerBlockEntitydirection - direction from hopper to this block entityitem - target itemCopyright © 2020. All rights reserved.