@EnvironmentInterfaces(value=@EnvironmentInterface(value=CLIENT,itf=SkinOverlayOwner.class)) public class WitherEntity extends HostileEntity implements SkinOverlayOwner, RangedAttackMob
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
WitherEntity.DescendAtHalfHealthGoal |
Entity.PositionUpdater| Modifier and Type | Field and Description |
|---|---|
private ServerBossBar |
bossBar |
private static Predicate<LivingEntity> |
CAN_ATTACK_PREDICATE |
private int |
field_7082 |
private int[] |
field_7091 |
private int[] |
field_7092 |
private static TargetPredicate |
HEAD_TARGET_PREDICATE |
private static TrackedData<Integer> |
INVUL_TIMER |
private float[] |
prevSideHeadPitches |
private float[] |
prevSideHeadYaws |
private float[] |
sideHeadPitches |
private float[] |
sideHeadYaws |
private static TrackedData<Integer> |
TRACKED_ENTITY_ID_1 |
private static TrackedData<Integer> |
TRACKED_ENTITY_ID_2 |
private static TrackedData<Integer> |
TRACKED_ENTITY_ID_3 |
private static List<TrackedData<Integer>> |
TRACKED_ENTITY_IDS |
ambientSoundChance, 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 |
|---|
WitherEntity(EntityType<? extends WitherEntity> type,
World world) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addStatusEffect(StatusEffectInstance effect) |
void |
attack(LivingEntity target,
float pullProgress) |
static boolean |
canDestroy(BlockState block) |
boolean |
canHaveStatusEffect(StatusEffectInstance effect) |
protected boolean |
canStartRiding(Entity entity) |
boolean |
canUsePortals() |
void |
checkDespawn() |
static DefaultAttributeContainer.Builder |
createWitherAttributes() |
boolean |
damage(DamageSource source,
float amount) |
protected void |
dropEquipment(DamageSource source,
int lootingMultiplier,
boolean allowDrops) |
protected SoundEvent |
getAmbientSound() |
protected SoundEvent |
getDeathSound() |
EntityGroup |
getGroup() |
float |
getHeadPitch(int headIndex) |
private double |
getHeadX(int headIndex) |
private double |
getHeadY(int headIndex) |
float |
getHeadYaw(int headIndex) |
private double |
getHeadZ(int headIndex) |
protected SoundEvent |
getHurtSound(DamageSource source) |
int |
getInvulnerableTimer() |
private float |
getNextAngle(float prevAngle,
float desiredAngle,
float maxDifference) |
int |
getTrackedEntityId(int headIndex) |
boolean |
handleFallDamage(float fallDistance,
float damageMultiplier) |
protected void |
initDataTracker() |
protected void |
initGoals() |
private void |
method_6877(int headIndex,
double double2,
double double3,
double double4,
boolean bool) |
private void |
method_6878(int int2,
LivingEntity livingEntity) |
void |
method_6885() |
protected void |
mobTick() |
void |
onStartedTrackingBy(ServerPlayerEntity player) |
void |
onStoppedTrackingBy(ServerPlayerEntity player) |
void |
readCustomDataFromTag(CompoundTag tag) |
void |
setCustomName(Text name) |
void |
setInvulTimer(int ticks) |
void |
setTrackedEntityId(int headIndex,
int id) |
boolean |
shouldRenderOverlay() |
void |
slowMovement(BlockState state,
Vec3d multiplier) |
void |
tickMovement() |
void |
writeCustomDataToTag(CompoundTag tag) |
canDropLootAndXp, canSpawnIgnoreLightLevel, canSpawnInDark, createHostileAttributes, getArrowType, getFallSound, getPathfindingFavor, getSoundCategory, getSplashSound, getSwimSound, isAngryAt, isDisallowedInPeaceful, isSpawnDark, shouldDropLoot, updateDespawnCountercanSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeashattachLeash, baseTick, canBeControlledByRider, canBeLeashedBy, canEquip, canEquipmentSlotContain, canGather, canImmediatelyDespawn, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickupItem, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropLoot, equip, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, getCurrentExperience, getDropChance, getEquipmentForSlot, getEquippedStack, getHoldingEntity, getItemsHand, getJumpControl, getLimitPerChunk, getLookControl, getLookPitchSpeed, getLookYawSpeed, getLootContextBuilder, getLootTable, getLootTableId, getMainArm, getMinAmbientSoundDelay, getMoveControl, getNavigation, getPathfindingPenalty, getPositionTarget, getPositionTargetRange, getPreferredEquipmentSlot, 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, 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, updateGoalControlsaddSoulSpeedBoostIfNeeded, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, 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_29499, method_29500, method_29920, method_30633, method_31079, 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, 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, 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, getHeightOffset, 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, 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, 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_29919, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, 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, 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, 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, wouldPoseNotCollideprivate static final TrackedData<Integer> TRACKED_ENTITY_ID_1
private static final TrackedData<Integer> TRACKED_ENTITY_ID_2
private static final TrackedData<Integer> TRACKED_ENTITY_ID_3
private static final List<TrackedData<Integer>> TRACKED_ENTITY_IDS
private static final TrackedData<Integer> INVUL_TIMER
private static final Predicate<LivingEntity> CAN_ATTACK_PREDICATE
private static final TargetPredicate HEAD_TARGET_PREDICATE
private final float[] sideHeadPitches
private final float[] sideHeadYaws
private final float[] prevSideHeadPitches
private final float[] prevSideHeadYaws
private final int[] field_7091
private final int[] field_7092
private int field_7082
private final ServerBossBar bossBar
public WitherEntity(EntityType<? extends WitherEntity> type, World world)
protected void initDataTracker()
initDataTracker in class MobEntitypublic void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag in class MobEntitypublic void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag in class MobEntitypublic void setCustomName(@Nullable Text name)
setCustomName in class Entityprotected SoundEvent getAmbientSound()
getAmbientSound in class MobEntityprotected SoundEvent getHurtSound(DamageSource source)
getHurtSound in class HostileEntityprotected SoundEvent getDeathSound()
getDeathSound in class HostileEntitypublic void tickMovement()
tickMovement in class HostileEntitypublic static boolean canDestroy(BlockState block)
public void method_6885()
public void slowMovement(BlockState state, Vec3d multiplier)
slowMovement in class Entitypublic void onStartedTrackingBy(ServerPlayerEntity player)
onStartedTrackingBy in class Entitypublic void onStoppedTrackingBy(ServerPlayerEntity player)
onStoppedTrackingBy in class Entityprivate double getHeadX(int headIndex)
private double getHeadY(int headIndex)
private double getHeadZ(int headIndex)
private float getNextAngle(float prevAngle,
float desiredAngle,
float maxDifference)
private void method_6878(int int2,
LivingEntity livingEntity)
private void method_6877(int headIndex,
double double2,
double double3,
double double4,
boolean bool)
public void attack(LivingEntity target, float pullProgress)
attack in interface RangedAttackMobpublic boolean damage(DamageSource source, float amount)
damage in class HostileEntityprotected void dropEquipment(DamageSource source, int lootingMultiplier, boolean allowDrops)
dropEquipment in class MobEntitypublic void checkDespawn()
checkDespawn in class MobEntitypublic boolean handleFallDamage(float fallDistance,
float damageMultiplier)
handleFallDamage in class LivingEntitypublic boolean addStatusEffect(StatusEffectInstance effect)
addStatusEffect in class LivingEntitypublic static DefaultAttributeContainer.Builder createWitherAttributes()
@Environment(value=CLIENT) public float getHeadYaw(int headIndex)
@Environment(value=CLIENT) public float getHeadPitch(int headIndex)
public int getInvulnerableTimer()
public void setInvulTimer(int ticks)
public int getTrackedEntityId(int headIndex)
public void setTrackedEntityId(int headIndex,
int id)
public boolean shouldRenderOverlay()
shouldRenderOverlay in interface SkinOverlayOwnerpublic EntityGroup getGroup()
getGroup in class LivingEntityprotected boolean canStartRiding(Entity entity)
canStartRiding in class Entitypublic boolean canUsePortals()
canUsePortals in class Entitypublic boolean canHaveStatusEffect(StatusEffectInstance effect)
canHaveStatusEffect in class LivingEntity