net.minecraft.entity.passive

public class BeeEntity

extends AnimalEntity implements Angerable

All mapped superinterfaces:

Nameable, EntityLike, UniquelyIdentifiable, ScoreHolder, DataTracked, ComponentsAccess, HeldItemContext, StackReferenceGetter, DebugTrackable, EntryConvertible, Attackable, ServerWaypoint, Waypoint, Targeter, EquipmentHolder, Leashable, Angerable

net.minecraft.world.entity.animal.bee.Bee
net.minecraft.world.entity.animal.bee.Bee
net.minecraft.class_4466
net.minecraft.entity.passive.BeeEntity

Field summary

Modifier and TypeField
public static final float
FLAP_DEGREES_PER_TICK
FLAP_DEGREES_PER_TICK
field_30271
field_30271
public static final int
TICKS_PER_FLAP
TICKS_PER_FLAP
field_28638
WING_FLAP_PERIOD
private static final TrackedData<Byte>
DATA_FLAGS_ID
DATA_FLAGS_ID
field_20353
BEE_FLAGS
private static final TrackedData<Long>
DATA_ANGER_END_TIME
DATA_ANGER_END_TIME
field_63320
ANGER_END_TIME
private static final int
FLAG_ROLL
FLAG_ROLL
field_30281
NEAR_TARGET_FLAG
private static final int
FLAG_HAS_STUNG
FLAG_HAS_STUNG
field_30282
HAS_STUNG_FLAG
private static final int
FLAG_HAS_NECTAR
FLAG_HAS_NECTAR
field_30283
HAS_NECTAR_FLAG
private static final int
STING_DEATH_COUNTDOWN
STING_DEATH_COUNTDOWN
field_30284
MAX_LIFETIME_AFTER_STINGING
private static final int
TICKS_BEFORE_GOING_TO_KNOWN_FLOWER
TICKS_BEFORE_GOING_TO_KNOWN_FLOWER
field_30285
FLOWER_NAVIGATION_START_TICKS
private static final int
TICKS_WITHOUT_NECTAR_BEFORE_GOING_HOME
TICKS_WITHOUT_NECTAR_BEFORE_GOING_HOME
field_30286
POLLINATION_FAIL_TICKS
private static final int
MIN_ATTACK_DIST
MIN_ATTACK_DIST
field_30287
field_30287
private static final int
MAX_CROPS_GROWABLE
MAX_CROPS_GROWABLE
field_30288
MAX_POLLINATED_CROPS
private static final int
POISON_SECONDS_NORMAL
POISON_SECONDS_NORMAL
field_30289
NORMAL_DIFFICULTY_STING_POISON_DURATION
private static final int
POISON_SECONDS_HARD
POISON_SECONDS_HARD
field_30290
HARD_DIFFICULTY_STING_POISON_DURATION
private static final int
TOO_FAR_DISTANCE
TOO_FAR_DISTANCE
field_30291
TOO_FAR_DISTANCE
private static final int
HIVE_CLOSE_ENOUGH_DISTANCE
HIVE_CLOSE_ENOUGH_DISTANCE
field_30292
field_30292
private static final int
RESTRICTED_WANDER_DISTANCE_REDUCTION
RESTRICTED_WANDER_DISTANCE_REDUCTION
field_52456
field_52456
private static final int
DEFAULT_WANDER_DISTANCE_REDUCTION
DEFAULT_WANDER_DISTANCE_REDUCTION
field_52457
field_52457
private static final int
PATHFIND_TO_HIVE_WHEN_CLOSER_THAN
PATHFIND_TO_HIVE_WHEN_CLOSER_THAN
field_30293
MIN_HIVE_RETURN_DISTANCE
private static final int
HIVE_SEARCH_DISTANCE
HIVE_SEARCH_DISTANCE
field_30294
field_30294
public static final String
TAG_CROPS_GROWN_SINCE_POLLINATION
TAG_CROPS_GROWN_SINCE_POLLINATION
field_30272
CROPS_GROWN_SINCE_POLLINATION_KEY
public static final String
TAG_CANNOT_ENTER_HIVE_TICKS
TAG_CANNOT_ENTER_HIVE_TICKS
field_30273
CANNOT_ENTER_HIVE_TICKS_KEY
public static final String
TAG_TICKS_SINCE_POLLINATION
TAG_TICKS_SINCE_POLLINATION
field_30276
TICKS_SINCE_POLLINATION_KEY
public static final String
TAG_HAS_STUNG
TAG_HAS_STUNG
field_30277
HAS_STUNG_KEY
public static final String
TAG_HAS_NECTAR
TAG_HAS_NECTAR
field_30278
HAS_NECTAR_KEY
public static final String
TAG_FLOWER_POS
TAG_FLOWER_POS
field_30279
FLOWER_POS_KEY
public static final String
TAG_HIVE_POS
TAG_HIVE_POS
field_30280
HIVE_POS_KEY
public static final boolean
DEFAULT_HAS_NECTAR
DEFAULT_HAS_NECTAR
field_57600
DEFAULT_HAS_NECTAR
private static final boolean
DEFAULT_HAS_STUNG
DEFAULT_HAS_STUNG
field_57601
DEFAULT_HAS_STUNG
private static final int
DEFAULT_TICKS_SINCE_POLLINATION
DEFAULT_TICKS_SINCE_POLLINATION
field_57602
DEFAULT_TICKS_SINCE_POLLINATION
private static final int
DEFAULT_CANNOT_ENTER_HIVE_TICKS
DEFAULT_CANNOT_ENTER_HIVE_TICKS
field_57603
DEFAULT_CANNOT_ENTER_HIVE_TICKS
private static final int
DEFAULT_CROPS_GROWN_SINCE_POLLINATION
DEFAULT_CROPS_GROWN_SINCE_POLLINATION
field_57604
DEFAULT_CROPS_GROWN_SINCE_POLLINATION
private static final UniformIntProvider
PERSISTENT_ANGER_TIME
PERSISTENT_ANGER_TIME
field_25363
ANGER_TIME_RANGE
private LazyEntityReference<LivingEntity>
persistentAngerTarget
persistentAngerTarget
field_25364
angryAt
private float
rollAmount
rollAmount
field_20356
currentPitch
private float
rollAmountO
rollAmountO
field_20357
lastPitch
private int
timeSinceSting
timeSinceSting
field_20358
ticksSinceSting
private int
ticksWithoutNectarSinceExitingHive
ticksWithoutNectarSinceExitingHive
field_20359
ticksSincePollination
private int
stayOutOfHiveCountdown
stayOutOfHiveCountdown
field_20360
cannotEnterHiveTicks
private int
numCropsGrownSincePollination
numCropsGrownSincePollination
field_20361
cropsGrownSincePollination
private static final int
COOLDOWN_BEFORE_LOCATING_NEW_HIVE
COOLDOWN_BEFORE_LOCATING_NEW_HIVE
field_30274
field_30274
private int
remainingCooldownBeforeLocatingNewHive
remainingCooldownBeforeLocatingNewHive
field_21643
ticksLeftToFindHive
private static final int
COOLDOWN_BEFORE_LOCATING_NEW_FLOWER
COOLDOWN_BEFORE_LOCATING_NEW_FLOWER
field_30275
field_30275
private static final int
MIN_FIND_FLOWER_RETRY_COOLDOWN
MIN_FIND_FLOWER_RETRY_COOLDOWN
field_52454
field_52454
private static final int
MAX_FIND_FLOWER_RETRY_COOLDOWN
MAX_FIND_FLOWER_RETRY_COOLDOWN
field_52455
field_52455
private int
remainingCooldownBeforeLocatingNewFlower
remainingCooldownBeforeLocatingNewFlower
field_21644
ticksUntilCanPollinate
private BlockPos
savedFlowerPos
savedFlowerPos
field_20362
flowerPos
private BlockPos
hivePos
hivePos
field_20363
hivePos
private BeeEntity$PollinateGoal
beePollinateGoal
beePollinateGoal
field_21079
pollinateGoal
private BeeEntity$MoveToHiveGoal
goToHiveGoal
goToHiveGoal
field_21645
moveToHiveGoal
private BeeEntity$MoveToFlowerGoal
goToKnownFlowerGoal
goToKnownFlowerGoal
field_21646
moveToFlowerGoal
private int
underWaterTicks
underWaterTicks
field_21509
ticksInsideWater

Constructor summary

ModifierConstructor
public (EntityType<? extends BeeEntity> type, World level)

Method summary

Modifier and TypeMethod
protected void
defineSynchedData(SynchedEntityData$Builder entityData)
defineSynchedData(SynchedEntityData$Builder entityData)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
public float
getWalkTargetValue(BlockPos pos, LevelReader level)
getWalkTargetValue(BlockPos pos, LevelReader level)
method_6144(class_2338 arg0, class_4538 arg1)
getPathfindingFavor(BlockPos arg0, WorldView arg1)
protected void
registerGoals()
registerGoals()
method_5959()
initGoals()
protected void
addAdditionalSaveData(ValueOutput output)
addAdditionalSaveData(ValueOutput output)
method_5652(class_11372 arg0)
writeCustomData(WriteView arg0)
protected void
readAdditionalSaveData(ValueInput input)
readAdditionalSaveData(ValueInput input)
method_5749(class_11368 arg0)
readCustomData(ReadView arg0)
public boolean
doHurtTarget(ServerLevel level, Entity target)
doHurtTarget(ServerLevel level, Entity target)
method_6121(class_3218 arg0, class_1297 arg1)
tryAttack(ServerWorld arg0, Entity arg1)
public void
tick()
tick()
method_5773()
tick()
private void
spawnFluidParticle(Level level, double x1, double x2, double z1, double z2, double y, ParticleOptions dripParticle)
spawnFluidParticle(Level level, double x1, double x2, double z1, double z2, double y, ParticleOptions dripParticle)
method_21769(class_1937 arg0, double arg1, double arg2, double arg3, double arg4, double arg5, class_2394 arg6)
addParticle(World world, double lastX, double x, double lastZ, double z, double y, ParticleEffect effect)
private void
pathfindRandomlyTowards(BlockPos targetPos)
pathfindRandomlyTowards(BlockPos targetPos)
method_23987(class_2338 arg0)
startMovingTo(BlockPos pos)
public BlockPos
getSavedFlowerPos()
getSavedFlowerPos()
method_21778()
getFlowerPos()
public boolean
hasSavedFlowerPos()
hasSavedFlowerPos()
method_21779()
hasFlower()
public void
setSavedFlowerPos(BlockPos savedFlowerPos)
setSavedFlowerPos(BlockPos savedFlowerPos)
method_21797(class_2338 arg0)
setFlowerPos(BlockPos flowerPos)
public int
getTravellingTicks()
getTravellingTicks()
method_35161()
getMoveGoalTicks()
public List<BlockPos>
getBlacklistedHives()
getBlacklistedHives()
method_35162()
getPossibleHives()
private boolean
isTiredOfLookingForNectar()
isTiredOfLookingForNectar()
method_23983()
failedPollinatingTooLong()
private void
dropHive()
dropHive()
method_61463()
clearHivePos()
private void
dropFlower()
dropFlower()
method_61464()
clearFlowerPos()
private boolean
wantsToEnterHive()
wantsToEnterHive()
method_21789()
canEnterHive()
public void
setStayOutOfHiveCountdown(int ticks)
setStayOutOfHiveCountdown(int ticks)
method_21807(int arg0)
setCannotEnterHiveTicks(int cannotEnterHiveTicks)
public float
getRollAmount(float a)
getRollAmount(float a)
method_21811(float arg0)
getBodyPitch(float tickProgress)
private void
updateRollAmount()
updateRollAmount()
method_21790()
updateBodyPitch()
protected void
customServerAiStep(ServerLevel level)
customServerAiStep(ServerLevel level)
method_5958(class_3218 arg0)
mobTick(ServerWorld arg0)
public void
resetTicksWithoutNectarSinceExitingHive()
resetTicksWithoutNectarSinceExitingHive()
method_21780()
resetPollinationTicks()
private boolean
isHiveNearFire()
isHiveNearFire()
method_23984()
isHiveNearFire()
public long
getPersistentAngerEndTime()
getPersistentAngerEndTime()
method_75130()
getAngerEndTime()
public void
setPersistentAngerEndTime(long endTime)
setPersistentAngerEndTime(long endTime)
method_75132(long arg0)
setAngerEndTime(long arg0)
public LazyEntityReference<LivingEntity>
getPersistentAngerTarget()
getPersistentAngerTarget()
method_29508()
getAngryAt()
public void
setPersistentAngerTarget(EntityReference<LivingEntity> persistentAngerTarget)
setPersistentAngerTarget(EntityReference<LivingEntity> persistentAngerTarget)
method_29513(class_10583<class_1309> arg0)
setAngryAt(LazyEntityReference<LivingEntity> arg0)
public void
startPersistentAngerTimer()
startPersistentAngerTimer()
method_29509()
chooseRandomAngerTime()
private boolean
doesHiveHaveSpace(BlockPos hivePos)
doesHiveHaveSpace(BlockPos hivePos)
method_23988(class_2338 arg0)
doesHiveHaveSpace(BlockPos pos)
public boolean
hasHive()
hasHive()
method_21791()
hasHivePos()
public BlockPos
getHivePos()
getHivePos()
method_23884()
getHivePos()
private int
getCropsGrownSincePollination()
getCropsGrownSincePollination()
method_21792()
getCropsGrownSincePollination()
private void
resetNumCropsGrownSincePollination()
resetNumCropsGrownSincePollination()
method_21783()
resetCropCounter()
private void
incrementNumCropsGrownSincePollination()
incrementNumCropsGrownSincePollination()
method_21793()
addCropCounter()
public void
aiStep()
aiStep()
method_6007()
tickMovement()
private BeehiveBlockEntity
getBeehiveBlockEntity()
getBeehiveBlockEntity()
method_65073()
getHive()
private boolean
isHiveValid()
isHiveValid()
method_21794()
hasValidHive()
public boolean
hasNectar()
hasNectar()
method_21784()
hasNectar()
private void
setHasNectar(boolean hasNectar)
setHasNectar(boolean hasNectar)
method_21805(boolean arg0)
setHasNectar(boolean hasNectar)
public boolean
hasStung()
hasStung()
method_21785()
hasStung()
private void
setHasStung(boolean hasStung)
setHasStung(boolean hasStung)
method_21806(boolean arg0)
setHasStung(boolean hasStung)
private boolean
isRolling()
isRolling()
method_21786()
isNearTarget()
private void
setRolling(boolean rolling)
setRolling(boolean rolling)
method_21808(boolean arg0)
setNearTarget(boolean nearTarget)
private boolean
isTooFarAway(BlockPos targetPos)
isTooFarAway(BlockPos targetPos)
method_23990(class_2338 arg0)
isTooFar(BlockPos pos)
private void
setFlag(int flag, boolean value)
setFlag(int flag, boolean value)
method_21775(int arg0, boolean arg1)
setBeeFlag(int bit, boolean value)
private boolean
getFlag(int flag)
getFlag(int flag)
method_21812(int arg0)
getBeeFlag(int location)
public static DefaultAttributeContainer$Builder
createAttributes()
createAttributes()
method_26880()
createBeeAttributes()
protected EntityNavigation
createNavigation(Level level)
createNavigation(Level level)
method_5965(class_1937 arg0)
createNavigation(World arg0)
public ActionResult
mobInteract(Player player, InteractionHand hand)
mobInteract(Player player, InteractionHand hand)
method_5992(class_1657 arg0, class_1268 arg1)
interactMob(PlayerEntity arg0, Hand arg1)
public boolean
isFood(ItemStack itemStack)
isFood(ItemStack itemStack)
method_6481(class_1799 arg0)
isBreedingItem(ItemStack arg0)
protected void
playStepSound(BlockPos pos, BlockState blockState)
playStepSound(BlockPos pos, BlockState blockState)
method_5712(class_2338 arg0, class_2680 arg1)
playStepSound(BlockPos arg0, BlockState arg1)
protected SoundEvent
getAmbientSound()
getAmbientSound()
method_5994()
getAmbientSound()
protected SoundEvent
getHurtSound(DamageSource source)
getHurtSound(DamageSource source)
method_6011(class_1282 arg0)
getHurtSound(DamageSource arg0)
protected SoundEvent
getDeathSound()
getDeathSound()
method_6002()
getDeathSound()
protected float
getSoundVolume()
getSoundVolume()
method_6107()
getSoundVolume()
public BeeEntity
getBreedOffspring(ServerLevel level, AgeableMob partner)
getBreedOffspring(ServerLevel level, AgeableMob partner)
method_5613(class_3218 arg0, class_1296 arg1)
createChild(ServerWorld arg0, PassiveEntity arg1)
protected void
checkFallDamage(double ya, boolean onGround, BlockState onState, BlockPos pos)
checkFallDamage(double ya, boolean onGround, BlockState onState, BlockPos pos)
method_5623(double arg0, boolean arg1, class_2680 arg2, class_2338 arg3)
fall(double arg0, boolean arg1, BlockState arg2, BlockPos arg3)
public boolean
isFlapping()
isFlapping()
method_5776()
isFlappingWings()
public boolean
isFlying()
isFlying()
method_1_4181()
isFlying()
protected boolean
omnidirectionalAirMover()
omnidirectionalAirMover()
method_1_3984()
flutters()
public void
dropOffNectar()
dropOffNectar()
method_21788()
onHoneyDelivered()
public boolean
hurtServer(ServerLevel level, DamageSource source, float damage)
hurtServer(ServerLevel level, DamageSource source, float damage)
method_64397(class_3218 arg0, class_1282 arg1, float arg2)
damage(ServerWorld arg0, DamageSource arg1, float arg2)
protected void
jumpInLiquid(TagKey<Fluid> type)
jumpInLiquid(TagKey<Fluid> type)
method_6010(class_6862<class_3611> arg0)
swimUpward(TagKey<Fluid> arg0)
public Vec3d
getLeashOffset()
getLeashOffset()
method_29919()
getLeashOffset()
private boolean
closerThan(BlockPos targetPos, int distance)
closerThan(BlockPos targetPos, int distance)
method_23979(class_2338 arg0, int arg1)
isWithinDistance(BlockPos pos, int distance)
public void
setHivePos(BlockPos hivePos)
setHivePos(BlockPos hivePos)
method_57301(class_2338 arg0)
setHivePos(BlockPos pos)
public static boolean
attractsBees(BlockState state)
attractsBees(BlockState state)
method_65348(class_2680 arg0)
isAttractive(BlockState state)
public void
registerDebugValues(ServerLevel level, DebugValueSource$Registration registration)
registerDebugValues(ServerLevel level, DebugValueSource$Registration registration)
method_74589(class_3218 arg0, class_12023$class_12024 arg1)
registerTracking(ServerWorld arg0, DebugTrackable$Tracker arg1)