Class FurnaceBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.FurnaceBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.ContainerBlockEntity,org.cloudburstmc.api.blockentity.Furnace,org.cloudburstmc.api.inventory.InventoryHolder
- Direct Known Subclasses:
BlastFurnaceBlockEntity,SmokerBlockEntity
public class FurnaceBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Furnace
- Author:
- MagicDroidX
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected shortprotected shortprotected shortprotected org.cloudburstmc.api.inventory.FurnaceInventoryFields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsModifierConstructorDescriptionFurnaceBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position)protectedFurnaceBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position, org.cloudburstmc.api.inventory.InventoryType inventoryType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckFuel(org.cloudburstmc.api.item.ItemStack fuel)voidclose()protected voidintprotected floatintintint[]int[]getHopperPushSlots(org.cloudburstmc.api.util.Direction direction, org.cloudburstmc.api.item.ItemStack item)booleanbooleanisValid()protected voidvoidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidonBreak()booleanonUpdate()voidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsetBurnDuration(int burnDuration)voidsetBurnTime(int burnTime)voidsetCookTime(int cookTime)Methods 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, saveClientData, 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
-
inventory
protected final org.cloudburstmc.api.inventory.FurnaceInventory inventory -
burnTime
protected short burnTime -
cookTime
protected short cookTime -
burnDuration
protected short burnDuration
-
-
Constructor Details
-
FurnaceBlockEntity
protected FurnaceBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position, org.cloudburstmc.api.inventory.InventoryType inventoryType) -
FurnaceBlockEntity
public FurnaceBlockEntity(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
-
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.Furnace- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.inventory.InventoryHolder
-
getBurnRate
protected float getBurnRate() -
checkFuel
protected void checkFuel(org.cloudburstmc.api.item.ItemStack fuel) -
onUpdate
public boolean onUpdate()- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onUpdatein classBaseBlockEntity
-
extinguishFurnace
protected void extinguishFurnace() -
lightFurnace
protected void lightFurnace() -
getBurnTime
public int getBurnTime() -
setBurnTime
public void setBurnTime(int burnTime) -
getCookTime
public int getCookTime() -
setCookTime
public void setCookTime(int cookTime) -
getBurnDuration
public int getBurnDuration() -
setBurnDuration
public void setBurnDuration(int burnDuration) -
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-
getHopperPullSlots
public int[] getHopperPullSlots()- Specified by:
getHopperPullSlotsin interfaceorg.cloudburstmc.api.blockentity.ContainerBlockEntity
-
getHopperPushSlots
public int[] getHopperPushSlots(org.cloudburstmc.api.util.Direction direction, org.cloudburstmc.api.item.ItemStack item)- Specified by:
getHopperPushSlotsin interfaceorg.cloudburstmc.api.blockentity.ContainerBlockEntity
-