Package net.minecraft.entity.passive
Class BeeEntity
- All Implemented Interfaces:
class_5568,Flutterer,Angerable,CommandOutput,Nameable
public class BeeEntity extends AnimalEntity implements Angerable, Flutterer
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classBeeEntity.BeeFollowTargetGoal(package private) classBeeEntity.BeeLookControl(package private) classBeeEntity.BeeRevengeGoal(package private) classBeeEntity.BeeWanderAroundGoal(package private) classBeeEntity.EnterHiveGoal(package private) classBeeEntity.FindHiveGoal(package private) classBeeEntity.GrowCropsGoalclassBeeEntity.MoveToFlowerGoalclassBeeEntity.MoveToHiveGoal(package private) classBeeEntity.NotAngryGoal(package private) classBeeEntity.PollinateGoal(package private) classBeeEntity.StingGoalNested classes/interfaces inherited from class net.minecraft.entity.passive.PassiveEntity
PassiveEntity.PassiveDataNested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
Fields Modifier and Type Field Description private static TrackedData<Integer>ANGERprivate static IntRangeANGER_TIME_RANGEprivate intcannotEnterHiveTicksprivate intcropsGrownSincePollinationprivate floatcurrentPitchprivate BlockPosflowerPosprivate BlockPoshivePosprivate floatlastPitchprivate BeeEntity.MoveToFlowerGoalmoveToFlowerGoalprivate BeeEntity.MoveToHiveGoalmoveToHiveGoalprivate BeeEntity.PollinateGoalpollinateGoalprivate static TrackedData<Byte>STATUS_TRACKERprivate UUIDtargetUuidprivate intticksInsideWaterprivate intticksLeftToFindHiveprivate intticksSincePollinationprivate intticksSinceStingprivate intticksUntilCanPollinateFields inherited from class net.minecraft.entity.passive.PassiveEntity
breedingAge, forcedAge, happyTicksRemainingFields inherited from class net.minecraft.entity.mob.MobEntity
ambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelectorFields inherited from class net.minecraft.entity.LivingEntity
activeItemStack, attackingPlayer, bodyTrackingIncrements, bodyYaw, brain, dead, deathTime, defaultMaxHealth, despawnCounter, field_6215, flyingSpeed, forwardSpeed, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, jumping, knockbackVelocity, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, lastLimbDistance, limbAngle, limbDistance, LIVING_FLAGS, lookDirection, maxHurtTime, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevStepBobbingAmount, randomLargeSeed, randomSmallSeed, riptideTicks, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeedFields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yawFields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY -
Constructor Summary
Constructors Constructor Description BeeEntity(EntityType<? extends BeeEntity> type, World world) -
Method Summary
Modifier and Type Method Description private voidaddCropCounter()private voidaddParticle(World world, double lastX, double x, double lastZ, double z, double y, ParticleEffect effect)private booleancanEnterHive()voidchooseRandomAngerTime()static DefaultAttributeContainer.BuildercreateBeeAttributes()BeeEntitycreateChild(ServerWorld serverWorld, PassiveEntity passiveEntity)protected EntityNavigationcreateNavigation(World world)booleandamage(DamageSource source, float amount)private booleandoesHiveHaveSpace(BlockPos pos)private booleanfailedPollinatingTooLong()protected voidfall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)protected floatgetActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)protected SoundEventgetAmbientSound()intgetAngerTime()UUIDgetAngryAt()private booleangetBeeFlag(int location)floatgetBodyPitch(float tickDelta)private intgetCropsGrownSincePollination()protected SoundEventgetDeathSound()BlockPosgetFlowerPos()EntityGroupgetGroup()BlockPosgetHivePos()protected SoundEventgetHurtSound(DamageSource source)floatgetPathfindingFavor(BlockPos pos, WorldView world)protected floatgetSoundVolume()booleanhandleFallDamage(float fallDistance, float damageMultiplier)booleanhasFlower()booleanhasHive()booleanhasNectar()booleanhasStung()protected booleanhasWings()protected voidinitDataTracker()protected voidinitGoals()booleanisBreedingItem(ItemStack stack)private booleanisFlowers(BlockPos pos)private booleanisHiveNearFire()private booleanisHiveValid()private booleanisNearTarget()private booleanisTooFar(BlockPos pos)private booleanisWithinDistance(BlockPos pos, int distance)Vec3dmethod_29919()protected voidmobTick()voidonHoneyDelivered()protected voidplayStepSound(BlockPos pos, BlockState state)voidreadCustomDataFromTag(CompoundTag tag)private voidresetCropCounter()voidresetPollinationTicks()protected voidsendAiDebugData()voidsetAngerTime(int ticks)voidsetAngryAt(UUID uuid)private voidsetBeeFlag(int bit, boolean value)voidsetCannotEnterHiveTicks(int ticks)voidsetFlowerPos(BlockPos pos)private voidsetHasNectar(boolean hasNectar)private voidsetHasStung(boolean hasStung)private voidsetNearTarget(boolean nearTarget)private voidstartMovingTo(BlockPos pos)protected voidswimUpward(Tag<Fluid> fluid)voidtick()voidtickMovement()booleantryAttack(Entity target)private voidupdateBodyPitch()voidwriteCustomDataToTag(CompoundTag tag)Methods inherited from class net.minecraft.entity.passive.AnimalEntity
breed, canBreedWith, canEat, canImmediatelyDespawn, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getMinAmbientSoundDelay, handleStatus, interactMob, isInLove, isValidNaturalSpawn, lovePlayer, resetLoveTicks, setLoveTicksMethods inherited from class net.minecraft.entity.passive.PassiveEntity
getBreedingAge, growUp, growUp, initialize, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAgeMethods inherited from class net.minecraft.entity.mob.PathAwareEntity
canSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeashMethods inherited from class net.minecraft.entity.mob.MobEntity
attachLeash, baseTick, canBeControlledByRider, canBeLeashedBy, canEquip, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, checkDespawn, createBodyControl, createMobAttributes, detachLeash, dropEquipment, dropLoot, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLimitPerChunk, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMoveControl, getNavigation, getPathfindingPenalty, getPickBlockStack, getPositionTarget, getPositionTargetRange, getSafeFallDistance, getTarget, getVisibilityCache, hasPositionTarget, initEquipment, interact, isAffectedByDaylight, isAiDisabled, isAttacking, isDisallowedInPeaceful, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, loot, method_29243, method_29244, method_30076, method_30758, method_30759, method_33191, movesIndependently, onEatingGrass, onPlayerSpawnedChild, playAmbientSound, playHurtSound, playSpawnEffects, prefersNewDamageableItem, prefersNewEquipment, setAiDisabled, setAttacking, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, tickNewAi, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControlsMethods inherited from class net.minecraft.entity.LivingEntity
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canFreeze, canHaveStatusEffect, canSee, canWalkOnFluid, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, computeFallDamage, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropInventory, dropXp, eatFood, endCombat, enterCombat, getAbsorptionAmount, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getArrowType, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockState, getBoundingBox, getBrain, getClimbingPos, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getMainHandStack, getMaxHealth, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPoses, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBlocking, isClimbing, isDead, isFallFlying, isHolding, isHolding, isHoldingOntoLadder, isImmobile, isInsideWall, isInSwimmingPose, isMobOrPlayer, isOnSoulSpeedBlock, isPushable, isSleeping, isTarget, isUndead, isUsingItem, isUsingRiptide, jump, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_26317, method_26318, method_29242, method_29500, method_30633, method_31079, method_32318, method_32324, method_32325, method_32326, method_33190, onAttacking, onDeath, onEquipStack, onKilledBy, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, playBlockFallSound, pushAway, pushAwayFrom, removeSoulSpeedBoost, removeStatusEffect, removeStatusEffectInternal, scheduleVelocityUpdate, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAbsorptionAmount, setAttacker, setAttacking, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setNearbySongPlaying, setOnGround, setRiptideTicks, setSleepingPosition, setSprinting, setStackInHand, setStingerCount, setStuckArrowCount, setYaw, shouldAlwaysDropXp, shouldDisplaySoulSpeedEffects, shouldDropLoot, shouldRenderName, shouldSwimInFluids, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickRiptide, tickStatusEffects, travel, triggerItemPickedUpByEntityCriteria, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUpMethods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeSpectated, canClimb, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getZ, handleAttack, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, interactAt, isAttackable, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isPlayer, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29241, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, method_31473, method_31744, method_31746, method_31748, method_32875, method_32877, method_33189, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setFrozenTicks, setGlowing, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollideMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.entity.mob.Angerable
angerFromTag, angerToTag, forgive, getTarget, hasAngerTime, isUniversallyAngry, setAttacker, setAttacking, setTarget, shouldAngerAt, stopAnger, tickAngerLogic, universallyAnger
-
Field Details
-
STATUS_TRACKER
-
ANGER
-
ANGER_TIME_RANGE
-
targetUuid
-
currentPitch
private float currentPitch -
lastPitch
private float lastPitch -
ticksSinceSting
private int ticksSinceSting -
ticksSincePollination
private int ticksSincePollination -
cannotEnterHiveTicks
private int cannotEnterHiveTicks -
cropsGrownSincePollination
private int cropsGrownSincePollination -
ticksLeftToFindHive
private int ticksLeftToFindHive -
ticksUntilCanPollinate
private int ticksUntilCanPollinate -
flowerPos
-
hivePos
-
pollinateGoal
-
moveToHiveGoal
-
moveToFlowerGoal
-
ticksInsideWater
private int ticksInsideWater
-
-
Constructor Details
-
BeeEntity
-
-
Method Details
-
initDataTracker
protected void initDataTracker()- Overrides:
initDataTrackerin classPassiveEntity
-
getPathfindingFavor
- Overrides:
getPathfindingFavorin classAnimalEntity
-
initGoals
protected void initGoals() -
writeCustomDataToTag
- Overrides:
writeCustomDataToTagin classAnimalEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTagin classAnimalEntity
-
tryAttack
-
tick
public void tick() -
addParticle
private void addParticle(World world, double lastX, double x, double lastZ, double z, double y, ParticleEffect effect) -
startMovingTo
-
getFlowerPos
-
hasFlower
public boolean hasFlower() -
setFlowerPos
-
failedPollinatingTooLong
private boolean failedPollinatingTooLong() -
canEnterHive
private boolean canEnterHive() -
setCannotEnterHiveTicks
public void setCannotEnterHiveTicks(int ticks) -
getBodyPitch
@Environment(CLIENT) public float getBodyPitch(float tickDelta) -
updateBodyPitch
private void updateBodyPitch() -
mobTick
protected void mobTick()- Overrides:
mobTickin classAnimalEntity
-
resetPollinationTicks
public void resetPollinationTicks() -
isHiveNearFire
private boolean isHiveNearFire() -
getAngerTime
public int getAngerTime()- Specified by:
getAngerTimein interfaceAngerable
-
setAngerTime
public void setAngerTime(int ticks)- Specified by:
setAngerTimein interfaceAngerable
-
getAngryAt
- Specified by:
getAngryAtin interfaceAngerable
-
setAngryAt
- Specified by:
setAngryAtin interfaceAngerable
-
chooseRandomAngerTime
public void chooseRandomAngerTime()- Specified by:
chooseRandomAngerTimein interfaceAngerable
-
doesHiveHaveSpace
-
hasHive
public boolean hasHive() -
getHivePos
-
sendAiDebugData
protected void sendAiDebugData()- Overrides:
sendAiDebugDatain classMobEntity
-
getCropsGrownSincePollination
private int getCropsGrownSincePollination() -
resetCropCounter
private void resetCropCounter() -
addCropCounter
private void addCropCounter() -
tickMovement
public void tickMovement()- Overrides:
tickMovementin classAnimalEntity
-
isHiveValid
private boolean isHiveValid() -
hasNectar
public boolean hasNectar() -
setHasNectar
private void setHasNectar(boolean hasNectar) -
hasStung
public boolean hasStung() -
setHasStung
private void setHasStung(boolean hasStung) -
isNearTarget
private boolean isNearTarget() -
setNearTarget
private void setNearTarget(boolean nearTarget) -
isTooFar
-
setBeeFlag
private void setBeeFlag(int bit, boolean value) -
getBeeFlag
private boolean getBeeFlag(int location) -
createBeeAttributes
-
isBreedingItem
- Overrides:
isBreedingItemin classAnimalEntity
-
isFlowers
-
playStepSound
- Overrides:
playStepSoundin classEntity
-
getAmbientSound
- Overrides:
getAmbientSoundin classMobEntity
-
getHurtSound
- Overrides:
getHurtSoundin classLivingEntity
-
getDeathSound
- Overrides:
getDeathSoundin classLivingEntity
-
getSoundVolume
protected float getSoundVolume()- Overrides:
getSoundVolumein classLivingEntity
-
createChild
- Specified by:
createChildin classPassiveEntity
-
getActiveEyeHeight
- Overrides:
getActiveEyeHeightin classLivingEntity
-
handleFallDamage
public boolean handleFallDamage(float fallDistance, float damageMultiplier)- Overrides:
handleFallDamagein classLivingEntity
-
fall
protected void fall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)- Overrides:
fallin classLivingEntity
-
hasWings
protected boolean hasWings() -
onHoneyDelivered
public void onHoneyDelivered() -
damage
- Overrides:
damagein classAnimalEntity
-
getGroup
- Overrides:
getGroupin classLivingEntity
-
swimUpward
- Overrides:
swimUpwardin classMobEntity
-
method_29919
- Overrides:
method_29919in classEntity
-
isWithinDistance
-