Package net.minecraft.entity.passive
Class BeeEntity.PollinateGoal
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.passive.BeeEntity.PassiveGoal
-
- net.minecraft.entity.passive.BeeEntity.PollinateGoal
-
- Enclosing class:
- BeeEntity
class BeeEntity.PollinateGoal extends BeeEntity.PassiveGoal
-
-
Field Summary
Fields Modifier and Type Field Description private Vector3d
hoverPos
private int
lastSoundPlayedTick
private boolean
pollinating
private int
pollinatingTicks
private int
successfulPollinatingTicks
private java.util.function.Predicate<BlockState>
VALID_POLLINATION_BLOCKS
-
Constructor Summary
Constructors Constructor Description PollinateGoal()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeeContinueToUse()
boolean
canBeeUse()
private java.util.Optional<BlockPos>
findNearbyFlower()
private java.util.Optional<BlockPos>
findNearestBlock(java.util.function.Predicate<BlockState> p_226500_1_, double p_226500_2_)
private float
getOffset()
private boolean
hasPollinatedLongEnough()
private boolean
isPollinating()
private void
setWantedPos()
void
start()
void
stop()
private void
stopPollinating()
void
tick()
-
Methods inherited from class net.minecraft.entity.passive.BeeEntity.PassiveGoal
canContinueToUse, canUse
-
Methods inherited from class net.minecraft.entity.ai.goal.Goal
getFlags, isInterruptable, setFlags, toString
-
-
-
-
Field Detail
-
VALID_POLLINATION_BLOCKS
private final java.util.function.Predicate<BlockState> VALID_POLLINATION_BLOCKS
-
successfulPollinatingTicks
private int successfulPollinatingTicks
-
lastSoundPlayedTick
private int lastSoundPlayedTick
-
pollinating
private boolean pollinating
-
hoverPos
private Vector3d hoverPos
-
pollinatingTicks
private int pollinatingTicks
-
-
Method Detail
-
canBeeUse
public boolean canBeeUse()
- Specified by:
canBeeUse
in classBeeEntity.PassiveGoal
-
canBeeContinueToUse
public boolean canBeeContinueToUse()
- Specified by:
canBeeContinueToUse
in classBeeEntity.PassiveGoal
-
hasPollinatedLongEnough
private boolean hasPollinatedLongEnough()
-
isPollinating
private boolean isPollinating()
-
stopPollinating
private void stopPollinating()
-
setWantedPos
private void setWantedPos()
-
getOffset
private float getOffset()
-
findNearbyFlower
private java.util.Optional<BlockPos> findNearbyFlower()
-
findNearestBlock
private java.util.Optional<BlockPos> findNearestBlock(java.util.function.Predicate<BlockState> p_226500_1_, double p_226500_2_)
-
-