public class BeehiveBlockEntity extends BlockEntity implements Tickable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BeehiveBlockEntity.Bee |
static class |
BeehiveBlockEntity.BeeState |
Modifier and Type | Field and Description |
---|---|
private List<BeehiveBlockEntity.Bee> |
bees |
private BlockPos |
flowerPos |
pos, removed, world
Constructor and Description |
---|
BeehiveBlockEntity() |
Modifier and Type | Method and Description |
---|---|
private void |
ageBee(int ticks,
BeeEntity bee) |
void |
angerBees(PlayerEntity player,
BlockState state,
BeehiveBlockEntity.BeeState beeState) |
void |
fromTag(BlockState state,
CompoundTag tag) |
int |
getBeeCount() |
ListTag |
getBees() |
static int |
getHoneyLevel(BlockState state) |
private boolean |
hasFlowerPos() |
boolean |
hasNoBees() |
boolean |
isFullOfBees() |
boolean |
isNearFire() |
boolean |
isSmoked() |
void |
markDirty() |
private boolean |
releaseBee(BlockState state,
BeehiveBlockEntity.Bee bee,
List<Entity> list,
BeehiveBlockEntity.BeeState beeState) |
protected void |
sendDebugData() |
void |
tick() |
private void |
tickBees() |
CompoundTag |
toTag(CompoundTag tag) |
void |
tryEnterHive(Entity entity,
boolean hasNectar) |
void |
tryEnterHive(Entity entity,
boolean hasNectar,
int ticksInHive) |
private List<Entity> |
tryReleaseBee(BlockState state,
BeehiveBlockEntity.BeeState beeState) |
applyMirror, applyRotation, cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markInvalid, markRemoved, onSyncedBlockEvent, populateCrashReport, resetBlock, setLocation, setPos, toInitialChunkDataTag, toUpdatePacket
private final List<BeehiveBlockEntity.Bee> bees
public void markDirty()
markDirty
in class BlockEntity
public boolean isNearFire()
public boolean hasNoBees()
public boolean isFullOfBees()
public void angerBees(@Nullable PlayerEntity player, BlockState state, BeehiveBlockEntity.BeeState beeState)
private List<Entity> tryReleaseBee(BlockState state, BeehiveBlockEntity.BeeState beeState)
public void tryEnterHive(Entity entity, boolean hasNectar)
public int getBeeCount()
public static int getHoneyLevel(BlockState state)
public boolean isSmoked()
protected void sendDebugData()
public void tryEnterHive(Entity entity, boolean hasNectar, int ticksInHive)
private boolean releaseBee(BlockState state, BeehiveBlockEntity.Bee bee, @Nullable List<Entity> list, BeehiveBlockEntity.BeeState beeState)
private void ageBee(int ticks, BeeEntity bee)
private boolean hasFlowerPos()
private void tickBees()
public void fromTag(BlockState state, CompoundTag tag)
fromTag
in class BlockEntity
public CompoundTag toTag(CompoundTag tag)
toTag
in class BlockEntity
public ListTag getBees()