Package cn.nukkit.blockentity
Class BlockEntityBeehive
java.lang.Object
cn.nukkit.math.Vector3
cn.nukkit.positiontracking.NamedPosition
cn.nukkit.level.Position
cn.nukkit.blockentity.BlockEntity
cn.nukkit.blockentity.BlockEntityBeehive
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
-
Field Summary
Fields inherited from class cn.nukkit.blockentity.BlockEntity
BANNER, BARREL, BEACON, BED, BEEHIVE, BELL, BLAST_FURNACE, BREWING_STAND, CAMPFIRE, CAULDRON, CHEST, chunk, closed, COMMAND_BLOCK, COMPARATOR, CONDUIT, count, DAYLIGHT_DETECTOR, DISPENSER, DROPPER, ENCHANT_TABLE, END_GATEWAY, END_PORTAL, ENDER_CHEST, FLOWER_POT, FURNACE, HOPPER, id, ITEM_FRAME, JUKEBOX, lastUpdate, LECTERN, LODESTONE, MOB_SPAWNER, movable, MOVING_BLOCK, MUSIC, name, namedTag, NETHER_REACTOR, PISTON_ARM, SCULK_CATALYST, SCULK_SENSOR, SCULK_SHRIEKER, server, SHULKER_BOX, SIGN, SKULL, SMOKER, TARGET, timing
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addOccupant
(BlockEntityBeehive.Occupant occupant) addOccupant
(Entity entity) addOccupant
(Entity entity, int ticksLeftToStay) addOccupant
(Entity entity, int ticksLeftToStay, boolean hasNectar) addOccupant
(Entity entity, int ticksLeftToStay, boolean hasNectar, boolean playSound) void
int
int
protected void
boolean
boolean
isEmpty()
boolean
boolean
boolean
isSpawnFaceValid
(BlockFace face) void
loadNBT()
void
onBreak()
void
onBreak
(boolean isSilkTouch) boolean
onUpdate()
boolean
removeOccupant
(BlockEntityBeehive.Occupant occupant) void
saveNBT()
scanValidSpawnFaces
(boolean preferFront) void
setHoneyLevel
(int honeyLevel) spawnOccupant
(BlockEntityBeehive.Occupant occupant, List<BlockFace> validFaces) Methods inherited from class cn.nukkit.blockentity.BlockEntity
close, createBlockEntity, createBlockEntity, createBlockEntity, getBlock, getCleanedNBT, getDefaultCompound, getId, getLevelBlockEntity, getName, getSaveId, isMovable, isObservable, registerBlockEntity, scheduleUpdate, setDirty
Methods inherited from class cn.nukkit.level.Position
abs, add, add, add, add, ceil, clone, divide, floor, fromObject, fromObject, getChunk, getLevel, getLevelBlock, getLevelBlock, getLevelBlock, getLevelBlockAround, getLevelBlockAtLayer, getLevelBlockState, getLevelBlockState, getLevelName, getLocation, getSide, getSide, getTickCachedLevelBlock, getTickCachedLevelBlockAtLayer, getTypedBlockEntity, getValidLevel, isValid, multiply, round, setComponents, setComponents, setLevel, setStrong, setWeak, subtract, subtract, subtract, subtract, subtract, toString
Methods inherited from class cn.nukkit.positiontracking.NamedPosition
matchesNamedPosition
Methods inherited from class cn.nukkit.math.Vector3
asBlockVector3, asVector3f, cross, distance, distance, distanceManhattan, distanceSquared, distanceSquared, dot, down, down, east, east, equals, getAxis, getChunkSectionY, getChunkVector, getChunkX, getChunkZ, getFloorX, getFloorY, getFloorZ, getForward, getIntermediateWithXValue, getIntermediateWithYValue, getIntermediateWithZValue, getRight, getSideVec, getSouth, getUp, getWest, getX, getY, getZ, hashCode, length, lengthSquared, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, maxPlainDistance, normalize, north, north, rawHashCode, setComponentsAdding, setComponentsAdding, setX, setY, setZ, south, south, up, up, west, west
-
Constructor Details
-
BlockEntityBeehive
-
-
Method Details
-
initBlockEntity
protected void initBlockEntity()- Overrides:
initBlockEntity
in classBlockEntity
-
saveNBT
public void saveNBT()- Overrides:
saveNBT
in classBlockEntity
-
loadNBT
- Overrides:
loadNBT
in classBlockEntity
-
getHoneyLevel
-
setHoneyLevel
-
addOccupant
-
addOccupant
-
addOccupant
-
addOccupant
@PowerNukkitOnly public BlockEntityBeehive.Occupant addOccupant(Entity entity, int ticksLeftToStay, boolean hasNectar) -
addOccupant
@PowerNukkitOnly public BlockEntityBeehive.Occupant addOccupant(Entity entity, int ticksLeftToStay, boolean hasNectar, boolean playSound) -
getOccupants
-
removeOccupant
-
isHoneyEmpty
-
isHoneyFull
-
isEmpty
-
getOccupantsCount
-
isSpawnFaceValid
-
scanValidSpawnFaces
-
scanValidSpawnFaces
-
spawnOccupant
@PowerNukkitOnly public Entity spawnOccupant(BlockEntityBeehive.Occupant occupant, List<BlockFace> validFaces) -
onBreak
public void onBreak()- Overrides:
onBreak
in classBlockEntity
-
onBreak
- Overrides:
onBreak
in classBlockEntity
-
angerBees
-
onUpdate
public boolean onUpdate()- Overrides:
onUpdate
in classBlockEntity
-
isBlockEntityValid
public boolean isBlockEntityValid()- Specified by:
isBlockEntityValid
in classBlockEntity
-