public class BeeEntity extends AnimalEntity implements Angerable, Flutterer
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
BeeEntity.BeeFollowTargetGoal |
(package private) class |
BeeEntity.BeeLookControl |
(package private) class |
BeeEntity.BeeRevengeGoal |
(package private) class |
BeeEntity.BeeWanderAroundGoal |
(package private) class |
BeeEntity.EnterHiveGoal |
(package private) class |
BeeEntity.FindHiveGoal |
(package private) class |
BeeEntity.GrowCropsGoal |
class |
BeeEntity.MoveToFlowerGoal |
class |
BeeEntity.MoveToHiveGoal |
(package private) class |
BeeEntity.NotAngryGoal |
(package private) class |
BeeEntity.PollinateGoal |
(package private) class |
BeeEntity.StingGoal |
PassiveEntity.PassiveDataEntity.PositionUpdater| Modifier and Type | Field and Description |
|---|---|
private static TrackedData<Integer> |
ANGER |
private static IntRange |
ANGER_TIME_RANGE |
private int |
cannotEnterHiveTicks |
private int |
cropsGrownSincePollination |
private float |
currentPitch |
private BlockPos |
flowerPos |
private BlockPos |
hivePos |
private float |
lastPitch |
private BeeEntity.MoveToFlowerGoal |
moveToFlowerGoal |
private BeeEntity.MoveToHiveGoal |
moveToHiveGoal |
private BeeEntity.PollinateGoal |
pollinateGoal |
private static TrackedData<Byte> |
STATUS_TRACKER |
private UUID |
targetUuid |
private int |
ticksInsideWater |
private int |
ticksLeftToFindHive |
private int |
ticksSincePollination |
private int |
ticksSinceSting |
private int |
ticksUntilCanPollinate |
breedingAge, forcedAge, happyTicksRemainingambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelectoractiveItemStack, 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, upwardSpeedage, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yawDUMMY| Constructor and Description |
|---|
BeeEntity(EntityType<? extends BeeEntity> type,
World world) |
| Modifier and Type | Method and Description |
|---|---|
private void |
addCropCounter() |
private void |
addParticle(World world,
double lastX,
double x,
double lastZ,
double z,
double y,
ParticleEffect effect) |
private boolean |
canEnterHive() |
void |
chooseRandomAngerTime() |
static DefaultAttributeContainer.Builder |
createBeeAttributes() |
BeeEntity |
createChild(ServerWorld serverWorld,
PassiveEntity passiveEntity) |
protected EntityNavigation |
createNavigation(World world) |
boolean |
damage(DamageSource source,
float amount) |
private boolean |
doesHiveHaveSpace(BlockPos pos) |
private boolean |
failedPollinatingTooLong() |
protected void |
fall(double heightDifference,
boolean onGround,
BlockState landedState,
BlockPos landedPosition) |
protected float |
getActiveEyeHeight(EntityPose pose,
EntityDimensions dimensions) |
protected SoundEvent |
getAmbientSound() |
int |
getAngerTime() |
UUID |
getAngryAt() |
private boolean |
getBeeFlag(int location) |
float |
getBodyPitch(float tickDelta) |
private int |
getCropsGrownSincePollination() |
protected SoundEvent |
getDeathSound() |
BlockPos |
getFlowerPos() |
EntityGroup |
getGroup() |
BlockPos |
getHivePos() |
protected SoundEvent |
getHurtSound(DamageSource source) |
float |
getPathfindingFavor(BlockPos pos,
WorldView world) |
protected float |
getSoundVolume() |
boolean |
handleFallDamage(float fallDistance,
float damageMultiplier) |
boolean |
hasFlower() |
boolean |
hasHive() |
boolean |
hasNectar() |
boolean |
hasStung() |
protected boolean |
hasWings() |
protected void |
initDataTracker() |
protected void |
initGoals() |
boolean |
isBreedingItem(ItemStack stack) |
private boolean |
isFlowers(BlockPos pos) |
private boolean |
isHiveNearFire() |
private boolean |
isHiveValid() |
private boolean |
isNearTarget() |
private boolean |
isTooFar(BlockPos pos) |
private boolean |
isWithinDistance(BlockPos pos,
int distance) |
Vec3d |
method_29919() |
protected void |
mobTick() |
void |
onHoneyDelivered() |
protected void |
playStepSound(BlockPos pos,
BlockState state) |
void |
readCustomDataFromTag(CompoundTag tag) |
private void |
resetCropCounter() |
void |
resetPollinationTicks() |
protected void |
sendAiDebugData() |
void |
setAngerTime(int ticks) |
void |
setAngryAt(UUID uuid) |
private void |
setBeeFlag(int bit,
boolean value) |
void |
setCannotEnterHiveTicks(int ticks) |
void |
setFlowerPos(BlockPos pos) |
private void |
setHasNectar(boolean hasNectar) |
private void |
setHasStung(boolean hasStung) |
private void |
setNearTarget(boolean nearTarget) |
private void |
startMovingTo(BlockPos pos) |
protected void |
swimUpward(Tag<Fluid> fluid) |
void |
tick() |
void |
tickMovement() |
boolean |
tryAttack(Entity target) |
private void |
updateBodyPitch() |
void |
writeCustomDataToTag(CompoundTag tag) |
breed, canBreedWith, canEat, canImmediatelyDespawn, eat, getCurrentExperience, getHeightOffset, getLoveTicks, getLovingPlayer, getMinAmbientSoundDelay, handleStatus, interactMob, isInLove, isValidNaturalSpawn, lovePlayer, resetLoveTicks, setLoveTicksgetBreedingAge, growUp, growUp, initialize, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAgecanSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeashattachLeash, baseTick, canBeControlledByRider, canBeLeashedBy, canEquip, canEquipmentSlotContain, canGather, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, checkDespawn, createBodyControl, createMobAttributes, detachLeash, dropEquipment, dropLoot, equip, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLimitPerChunk, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMoveControl, getNavigation, getPathfindingPenalty, getPositionTarget, getPositionTargetRange, getPreferredEquipmentSlot, 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, 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, updateGoalControlsaddSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, 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_29499, method_29500, method_29920, method_30633, method_31079, 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, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swingHand, swingHand, takeKnockback, takeShieldHit, teleport, tickCramming, tickHandSwing, tickRiding, tickRiptide, tickStatusEffects, travel, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wakeUpaddPassenger, 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, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, 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, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29239, method_29241, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, 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, setGlowing, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollideclone, finalize, getClass, notify, notifyAll, wait, wait, waitangerFromTag, angerToTag, forgive, getTarget, hasAngerTime, isUniversallyAngry, setAttacker, setAttacking, setTarget, shouldAngerAt, stopAnger, tickAngerLogic, universallyAngerprivate static final TrackedData<Byte> STATUS_TRACKER
private static final TrackedData<Integer> ANGER
private static final IntRange ANGER_TIME_RANGE
private UUID targetUuid
private float currentPitch
private float lastPitch
private int ticksSinceSting
private int ticksSincePollination
private int cannotEnterHiveTicks
private int cropsGrownSincePollination
private int ticksLeftToFindHive
private int ticksUntilCanPollinate
private BeeEntity.PollinateGoal pollinateGoal
private BeeEntity.MoveToHiveGoal moveToHiveGoal
private BeeEntity.MoveToFlowerGoal moveToFlowerGoal
private int ticksInsideWater
public BeeEntity(EntityType<? extends BeeEntity> type, World world)
protected void initDataTracker()
initDataTracker in class PassiveEntitypublic float getPathfindingFavor(BlockPos pos, WorldView world)
getPathfindingFavor in class AnimalEntitypublic void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag in class AnimalEntitypublic void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag in class AnimalEntityprivate void addParticle(World world, double lastX, double x, double lastZ, double z, double y, ParticleEffect effect)
private void startMovingTo(BlockPos pos)
public boolean hasFlower()
public void setFlowerPos(BlockPos pos)
private boolean failedPollinatingTooLong()
private boolean canEnterHive()
public void setCannotEnterHiveTicks(int ticks)
@Environment(value=CLIENT) public float getBodyPitch(float tickDelta)
private void updateBodyPitch()
protected void mobTick()
mobTick in class AnimalEntitypublic void resetPollinationTicks()
private boolean isHiveNearFire()
public int getAngerTime()
getAngerTime in interface Angerablepublic void setAngerTime(int ticks)
setAngerTime in interface Angerablepublic UUID getAngryAt()
getAngryAt in interface Angerablepublic void setAngryAt(@Nullable UUID uuid)
setAngryAt in interface Angerablepublic void chooseRandomAngerTime()
chooseRandomAngerTime in interface Angerableprivate boolean doesHiveHaveSpace(BlockPos pos)
public boolean hasHive()
protected void sendAiDebugData()
sendAiDebugData in class MobEntityprivate int getCropsGrownSincePollination()
private void resetCropCounter()
private void addCropCounter()
public void tickMovement()
tickMovement in class AnimalEntityprivate boolean isHiveValid()
public boolean hasNectar()
private void setHasNectar(boolean hasNectar)
public boolean hasStung()
private void setHasStung(boolean hasStung)
private boolean isNearTarget()
private void setNearTarget(boolean nearTarget)
private boolean isTooFar(BlockPos pos)
private void setBeeFlag(int bit,
boolean value)
private boolean getBeeFlag(int location)
public static DefaultAttributeContainer.Builder createBeeAttributes()
protected EntityNavigation createNavigation(World world)
createNavigation in class MobEntitypublic boolean isBreedingItem(ItemStack stack)
isBreedingItem in class AnimalEntityprivate boolean isFlowers(BlockPos pos)
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound in class Entityprotected SoundEvent getAmbientSound()
getAmbientSound in class MobEntityprotected SoundEvent getHurtSound(DamageSource source)
getHurtSound in class LivingEntityprotected SoundEvent getDeathSound()
getDeathSound in class LivingEntityprotected float getSoundVolume()
getSoundVolume in class LivingEntitypublic BeeEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity)
createChild in class PassiveEntityprotected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
getActiveEyeHeight in class LivingEntitypublic boolean handleFallDamage(float fallDistance,
float damageMultiplier)
handleFallDamage in class LivingEntityprotected void fall(double heightDifference,
boolean onGround,
BlockState landedState,
BlockPos landedPosition)
fall in class LivingEntitypublic void onHoneyDelivered()
public boolean damage(DamageSource source, float amount)
damage in class AnimalEntitypublic EntityGroup getGroup()
getGroup in class LivingEntityprotected void swimUpward(Tag<Fluid> fluid)
swimUpward in class MobEntity@Environment(value=CLIENT) public Vec3d method_29919()
method_29919 in class Entityprivate boolean isWithinDistance(BlockPos pos, int distance)