T
- Entity this block can storeBlockState
, Metadatable
, PersistentDataHolder
, TileState
Beehive
public interface EntityBlockStorage<T extends Entity> extends TileState
Modifier and Type | Method | Description |
---|---|---|
void |
addEntity(T entity) |
Add an entity to the block.
|
int |
getEntityCount() |
Get the amount of entities currently in this block.
|
int |
getMaxEntities() |
Get the maximum amount of entities this block can hold.
|
boolean |
isFull() |
Check if the block is completely full of entities.
|
@NotNull List<T> |
releaseEntities() |
Release all the entities currently stored in the block.
|
void |
setMaxEntities(int max) |
Set the maximum amount of entities this block can hold.
|
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
getPersistentDataContainer
boolean isFull()
int getEntityCount()
int getMaxEntities()
void setMaxEntities(int max)
max
- Maximum amount of entities this block can hold@NotNull @NotNull List<T> releaseEntities()
void addEntity(@NotNull T entity)
entity
- Entity to add to the blockCopyright © 2020. All rights reserved.