Package net.minecraft.entity.boss
Class WitherEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.LivingEntity
net.minecraft.entity.mob.MobEntity
net.minecraft.entity.mob.PathAwareEntity
net.minecraft.entity.mob.HostileEntity
net.minecraft.entity.boss.WitherEntity
- All Implemented Interfaces:
class_5568,SkinOverlayOwner,RangedAttackMob,Monster,CommandOutput,Nameable
@EnvironmentInterfaces(@EnvironmentInterface(value=CLIENT,itf=SkinOverlayOwner.class)) public class WitherEntity extends HostileEntity implements SkinOverlayOwner, RangedAttackMob
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classWitherEntity.DescendAtHalfHealthGoalNested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
Fields Modifier and Type Field Description private ServerBossBarbossBarprivate static Predicate<LivingEntity>CAN_ATTACK_PREDICATEprivate intfield_7082private int[]field_7091private int[]field_7092private static TargetPredicateHEAD_TARGET_PREDICATEprivate static TrackedData<Integer>INVUL_TIMERprivate float[]prevSideHeadPitchesprivate float[]prevSideHeadYawsprivate float[]sideHeadPitchesprivate float[]sideHeadYawsprivate static TrackedData<Integer>TRACKED_ENTITY_ID_1private static TrackedData<Integer>TRACKED_ENTITY_ID_2private static TrackedData<Integer>TRACKED_ENTITY_ID_3private static List<TrackedData<Integer>>TRACKED_ENTITY_IDSFields 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 WitherEntity(EntityType<? extends WitherEntity> type, World world) -
Method Summary
Modifier and Type Method Description booleanaddStatusEffect(StatusEffectInstance effect)voidattack(LivingEntity target, float pullProgress)static booleancanDestroy(BlockState block)booleancanHaveStatusEffect(StatusEffectInstance effect)protected booleancanStartRiding(Entity entity)booleancanUsePortals()voidcheckDespawn()static DefaultAttributeContainer.BuildercreateWitherAttributes()booleandamage(DamageSource source, float amount)protected voiddropEquipment(DamageSource source, int lootingMultiplier, boolean allowDrops)protected SoundEventgetAmbientSound()protected SoundEventgetDeathSound()EntityGroupgetGroup()floatgetHeadPitch(int headIndex)private doublegetHeadX(int headIndex)private doublegetHeadY(int headIndex)floatgetHeadYaw(int headIndex)private doublegetHeadZ(int headIndex)protected SoundEventgetHurtSound(DamageSource source)intgetInvulnerableTimer()private floatgetNextAngle(float prevAngle, float desiredAngle, float maxDifference)intgetTrackedEntityId(int headIndex)booleanhandleFallDamage(float fallDistance, float damageMultiplier)protected voidinitDataTracker()protected voidinitGoals()private voidmethod_6877(int headIndex, double double2, double double3, double double4, boolean bool)private voidmethod_6878(int int2, LivingEntity livingEntity)protected voidmobTick()voidonStartedTrackingBy(ServerPlayerEntity player)voidonStoppedTrackingBy(ServerPlayerEntity player)voidonSummoned()voidreadCustomDataFromTag(CompoundTag tag)voidsetCustomName(Text name)voidsetInvulTimer(int ticks)voidsetTrackedEntityId(int headIndex, int id)booleanshouldRenderOverlay()voidslowMovement(BlockState state, Vec3d multiplier)voidtickMovement()voidwriteCustomDataToTag(CompoundTag tag)Methods inherited from class net.minecraft.entity.mob.HostileEntity
canDropLootAndXp, canSpawnIgnoreLightLevel, canSpawnInDark, createHostileAttributes, getArrowType, getFallSound, getPathfindingFavor, getSoundCategory, getSplashSound, getSwimSound, isAngryAt, isDisallowedInPeaceful, isSpawnDark, shouldDropLoot, updateDespawnCounterMethods 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, canImmediatelyDespawn, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropLoot, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getCurrentExperience, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLimitPerChunk, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMinAmbientSoundDelay, getMoveControl, getNavigation, getPathfindingPenalty, getPickBlockStack, getPositionTarget, getPositionTargetRange, getSafeFallDistance, getTarget, getVisibilityCache, handleStatus, hasPositionTarget, initEquipment, initialize, interact, interactMob, isAffectedByDaylight, isAiDisabled, isAttacking, 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, sendAiDebugData, setAiDisabled, setAttacking, setBaby, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tick, tickNewAi, tryAttack, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControlsMethods inherited from class net.minecraft.entity.LivingEntity
addSoulSpeedBoostIfNeeded, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, canFreeze, canSee, canWalkOnFluid, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, computeFallDamage, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, damageArmor, damageShield, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropInventory, dropXp, eatFood, endCombat, enterCombat, fall, getAbsorptionAmount, getActiveEyeHeight, getActiveHand, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockState, getBoundingBox, getBrain, getClimbingPos, getDamageTracker, getDespawnCounter, getDimensions, getDrinkSound, getEatSound, getEyeHeight, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getMainHandStack, getMaxHealth, getMovementSpeed, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPoses, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getSoundVolume, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVelocityMultiplier, getVisibilityBoundingBox, getYaw, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBaby, 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, onTrackedDataSet, 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, 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, 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, getHeightOffset, 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, getStandingEyeHeight, 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, hasWings, 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_29919, 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, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, sendSystemMessage, setAir, setBoundingBox, 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, 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, wouldPoseNotCollide
-
Field Details
-
TRACKED_ENTITY_ID_1
-
TRACKED_ENTITY_ID_2
-
TRACKED_ENTITY_ID_3
-
TRACKED_ENTITY_IDS
-
INVUL_TIMER
-
CAN_ATTACK_PREDICATE
-
HEAD_TARGET_PREDICATE
-
sideHeadPitches
private final float[] sideHeadPitches -
sideHeadYaws
private final float[] sideHeadYaws -
prevSideHeadPitches
private final float[] prevSideHeadPitches -
prevSideHeadYaws
private final float[] prevSideHeadYaws -
field_7091
private final int[] field_7091 -
field_7092
private final int[] field_7092 -
field_7082
private int field_7082 -
bossBar
-
-
Constructor Details
-
WitherEntity
-
-
Method Details
-
initGoals
protected void initGoals() -
initDataTracker
protected void initDataTracker()- Overrides:
initDataTrackerin classMobEntity
-
writeCustomDataToTag
- Overrides:
writeCustomDataToTagin classMobEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTagin classMobEntity
-
setCustomName
- Overrides:
setCustomNamein classEntity
-
getAmbientSound
- Overrides:
getAmbientSoundin classMobEntity
-
getHurtSound
- Overrides:
getHurtSoundin classHostileEntity
-
getDeathSound
- Overrides:
getDeathSoundin classHostileEntity
-
tickMovement
public void tickMovement()- Overrides:
tickMovementin classHostileEntity
-
mobTick
protected void mobTick() -
canDestroy
-
onSummoned
public void onSummoned() -
slowMovement
- Overrides:
slowMovementin classEntity
-
onStartedTrackingBy
- Overrides:
onStartedTrackingByin classEntity
-
onStoppedTrackingBy
- Overrides:
onStoppedTrackingByin classEntity
-
getHeadX
private double getHeadX(int headIndex) -
getHeadY
private double getHeadY(int headIndex) -
getHeadZ
private double getHeadZ(int headIndex) -
getNextAngle
private float getNextAngle(float prevAngle, float desiredAngle, float maxDifference) -
method_6878
-
method_6877
private void method_6877(int headIndex, double double2, double double3, double double4, boolean bool) -
attack
- Specified by:
attackin interfaceRangedAttackMob
-
damage
- Overrides:
damagein classLivingEntity
-
dropEquipment
- Overrides:
dropEquipmentin classMobEntity
-
checkDespawn
public void checkDespawn()- Overrides:
checkDespawnin classMobEntity
-
handleFallDamage
public boolean handleFallDamage(float fallDistance, float damageMultiplier)- Overrides:
handleFallDamagein classLivingEntity
-
addStatusEffect
- Overrides:
addStatusEffectin classLivingEntity
-
createWitherAttributes
-
getHeadYaw
@Environment(CLIENT) public float getHeadYaw(int headIndex) -
getHeadPitch
@Environment(CLIENT) public float getHeadPitch(int headIndex) -
getInvulnerableTimer
public int getInvulnerableTimer() -
setInvulTimer
public void setInvulTimer(int ticks) -
getTrackedEntityId
public int getTrackedEntityId(int headIndex) -
setTrackedEntityId
public void setTrackedEntityId(int headIndex, int id) -
shouldRenderOverlay
public boolean shouldRenderOverlay()- Specified by:
shouldRenderOverlayin interfaceSkinOverlayOwner
-
getGroup
- Overrides:
getGroupin classLivingEntity
-
canStartRiding
- Overrides:
canStartRidingin classEntity
-
canUsePortals
public boolean canUsePortals()- Overrides:
canUsePortalsin classEntity
-
canHaveStatusEffect
- Overrides:
canHaveStatusEffectin classLivingEntity
-