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.PassiveData
Entity.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, happyTicksRemaining
ambientSoundChance, armorDropChances, experiencePoints, goalSelector, handDropChances, jumpControl, lookControl, moveControl, navigation, targetSelector
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, upwardSpeed
age, 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, yaw
DUMMY
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, setLoveTicks
getBreedingAge, growUp, growUp, initialize, isBaby, isReadyToBreed, onGrowUp, onTrackedDataSet, setBaby, setBreedingAge
canSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeash
attachLeash, 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, updateGoalControls
addSoulSpeedBoostIfNeeded, 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, wakeUp
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, 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, wouldPoseNotCollide
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
angerFromTag, angerToTag, forgive, getTarget, hasAngerTime, isUniversallyAngry, setAttacker, setAttacking, setTarget, shouldAngerAt, stopAnger, tickAngerLogic, universallyAnger
private 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 PassiveEntity
public float getPathfindingFavor(BlockPos pos, WorldView world)
getPathfindingFavor
in class AnimalEntity
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class AnimalEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class AnimalEntity
private 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 AnimalEntity
public void resetPollinationTicks()
private boolean isHiveNearFire()
public int getAngerTime()
getAngerTime
in interface Angerable
public void setAngerTime(int ticks)
setAngerTime
in interface Angerable
public UUID getAngryAt()
getAngryAt
in interface Angerable
public void setAngryAt(@Nullable UUID uuid)
setAngryAt
in interface Angerable
public void chooseRandomAngerTime()
chooseRandomAngerTime
in interface Angerable
private boolean doesHiveHaveSpace(BlockPos pos)
public boolean hasHive()
protected void sendAiDebugData()
sendAiDebugData
in class MobEntity
private int getCropsGrownSincePollination()
private void resetCropCounter()
private void addCropCounter()
public void tickMovement()
tickMovement
in class AnimalEntity
private 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 MobEntity
public boolean isBreedingItem(ItemStack stack)
isBreedingItem
in class AnimalEntity
private boolean isFlowers(BlockPos pos)
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound
in class Entity
protected SoundEvent getAmbientSound()
getAmbientSound
in class MobEntity
protected SoundEvent getHurtSound(DamageSource source)
getHurtSound
in class LivingEntity
protected SoundEvent getDeathSound()
getDeathSound
in class LivingEntity
protected float getSoundVolume()
getSoundVolume
in class LivingEntity
public BeeEntity createChild(ServerWorld serverWorld, PassiveEntity passiveEntity)
createChild
in class PassiveEntity
protected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
getActiveEyeHeight
in class LivingEntity
public boolean handleFallDamage(float fallDistance, float damageMultiplier)
handleFallDamage
in class LivingEntity
protected void fall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
fall
in class LivingEntity
public void onHoneyDelivered()
public boolean damage(DamageSource source, float amount)
damage
in class AnimalEntity
public EntityGroup getGroup()
getGroup
in class LivingEntity
protected void swimUpward(Tag<Fluid> fluid)
swimUpward
in class MobEntity
@Environment(value=CLIENT) public Vec3d method_29919()
method_29919
in class Entity
private boolean isWithinDistance(BlockPos pos, int distance)