Class HopperBlockEntity
java.lang.Object
org.cloudburstmc.server.blockentity.BaseBlockEntity
org.cloudburstmc.server.blockentity.HopperBlockEntity
- All Implemented Interfaces:
org.cloudburstmc.api.blockentity.BlockEntity,org.cloudburstmc.api.blockentity.ContainerBlockEntity,org.cloudburstmc.api.blockentity.Hopper,org.cloudburstmc.api.inventory.InventoryHolder
public class HopperBlockEntity
extends BaseBlockEntity
implements org.cloudburstmc.api.blockentity.Hopper
Created by CreeperFace on 8.5.2017.
-
Field Summary
FieldsFields inherited from class org.cloudburstmc.server.blockentity.BaseBlockEntity
closed, id, ID_ALLOCATOR, lastUpdate, movable, server, timing -
Constructor Summary
ConstructorsConstructorDescriptionHopperBlockEntity(org.cloudburstmc.api.blockentity.BlockEntityType<?> type, org.cloudburstmc.api.level.chunk.Chunk chunk, com.nukkitx.math.vector.Vector3i position) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanbooleanbooleanisValid()voidloadAdditionalData(com.nukkitx.nbt.NbtMap tag)voidonBreak()booleanonUpdate()booleanbooleanbooleanvoidsaveAdditionalData(com.nukkitx.nbt.NbtMapBuilder tag)voidsetTransferCooldown(int transferCooldown)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, spawnToAllMethods inherited from interface org.cloudburstmc.api.blockentity.ContainerBlockEntity
getHopperPullSlots, getHopperPushSlots
-
Field Details
-
inventory
-
-
Constructor Details
-
HopperBlockEntity
public HopperBlockEntity(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
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Specified by:
isValidin classBaseBlockEntity
-
isOnTransferCooldown
public boolean isOnTransferCooldown() -
setTransferCooldown
public void setTransferCooldown(int transferCooldown) -
getInventory
- Specified by:
getInventoryin interfaceorg.cloudburstmc.api.inventory.InventoryHolder
-
onUpdate
public boolean onUpdate()- Specified by:
onUpdatein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
onUpdatein classBaseBlockEntity
-
pullItems
public boolean pullItems() -
pickupItems
public boolean pickupItems() -
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
-
pushItems
public boolean pushItems() -
isSpawnable
public boolean isSpawnable()- Specified by:
isSpawnablein interfaceorg.cloudburstmc.api.blockentity.BlockEntity- Overrides:
isSpawnablein classBaseBlockEntity
-