public class ZombieEntity extends HostileEntity
Modifier and Type | Class and Description |
---|---|
(package private) class |
ZombieEntity.DestroyEggGoal |
static class |
ZombieEntity.ZombieData |
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private static TrackedData<Boolean> |
BABY |
private static EntityAttributeModifier |
BABY_SPEED_BONUS |
private static UUID |
BABY_SPEED_ID |
private BreakDoorGoal |
breakDoorsGoal |
private boolean |
canBreakDoors |
private static TrackedData<Boolean> |
CONVERTING_IN_WATER |
private static Predicate<Difficulty> |
DOOR_BREAK_DIFFICULTY_CHECKER |
private int |
inWaterTime |
private int |
ticksUntilWaterConversion |
private static TrackedData<Integer> |
ZOMBIE_TYPE
Unused tracked data, left over from 1.10 when zombies, zombie villagers and husks were all the same type of entity.
|
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 |
---|
ZombieEntity(EntityType<? extends ZombieEntity> type,
World world) |
ZombieEntity(World world) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyAttributeModifiers(float chanceMultiplier) |
protected boolean |
burnsInDaylight() |
boolean |
canBreakDoors() |
protected boolean |
canConvertInWater() |
boolean |
canPickupItem(ItemStack stack) |
protected void |
convertInWater() |
protected void |
convertTo(EntityType<? extends ZombieEntity> entityType) |
static DefaultAttributeContainer.Builder |
createZombieAttributes() |
boolean |
damage(DamageSource source,
float amount) |
protected void |
dropEquipment(DamageSource source,
int lootingMultiplier,
boolean allowDrops) |
protected float |
getActiveEyeHeight(EntityPose pose,
EntityDimensions dimensions) |
protected SoundEvent |
getAmbientSound() |
protected int |
getCurrentExperience(PlayerEntity player) |
protected SoundEvent |
getDeathSound() |
EntityGroup |
getGroup() |
double |
getHeightOffset() |
protected SoundEvent |
getHurtSound(DamageSource source) |
protected ItemStack |
getSkull()
Returns the item stack this entity will drop when killed by a charged creeper.
|
protected SoundEvent |
getStepSound() |
protected void |
initAttributes() |
protected void |
initCustomGoals() |
protected void |
initDataTracker() |
protected void |
initEquipment(LocalDifficulty difficulty) |
protected void |
initGoals() |
EntityData |
initialize(ServerWorldAccess world,
LocalDifficulty difficulty,
SpawnReason spawnReason,
EntityData entityData,
CompoundTag entityTag) |
boolean |
isBaby() |
boolean |
isConvertingInWater() |
static boolean |
method_29936(Random random) |
void |
onKilledOther(ServerWorld serverWorld,
LivingEntity livingEntity) |
void |
onTrackedDataSet(TrackedData<?> data) |
protected void |
playStepSound(BlockPos pos,
BlockState state) |
void |
readCustomDataFromTag(CompoundTag tag) |
void |
setBaby(boolean baby) |
void |
setCanBreakDoors(boolean canBreakDoors) |
private void |
setTicksUntilWaterConversion(int ticksUntilWaterConversion) |
protected boolean |
shouldBreakDoors() |
void |
tick() |
void |
tickMovement() |
boolean |
tryAttack(Entity target) |
void |
writeCustomDataToTag(CompoundTag tag) |
canDropLootAndXp, canSpawnIgnoreLightLevel, canSpawnInDark, createHostileAttributes, getArrowType, getFallSound, getPathfindingFavor, getSoundCategory, getSplashSound, getSwimSound, isAngryAt, isDisallowedInPeaceful, isSpawnDark, shouldDropLoot, updateDespawnCounter
canSpawn, getPathfindingFavor, getRunFromLeashSpeed, isNavigating, updateForLeashLength, updateLeash
attachLeash, baseTick, canBeControlledByRider, canBeLeashedBy, canEquip, canEquipmentSlotContain, canGather, canImmediatelyDespawn, canMobSpawn, canMoveVoluntarily, cannotDespawn, canPickUpLoot, canSpawn, canTarget, canTarget, canUseRangedWeapon, checkDespawn, createBodyControl, createMobAttributes, createNavigation, detachLeash, dropLoot, equip, equipLootStack, equipStack, getArmorItems, getBodyYawSpeed, 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, interact, interactMob, isAffectedByDaylight, isAiDisabled, isAttacking, isInWalkTargetRange, isInWalkTargetRange, isLeashed, isLeftHanded, isLogicalSideForUpdatingMovement, isPersistent, lookAtEntity, loot, method_29243, method_29244, method_30076, method_30758, method_30759, mobTick, movesIndependently, onEatingGrass, onPlayerSpawnedChild, playAmbientSound, playHurtSound, playSpawnEffects, prefersNewDamageableItem, prefersNewEquipment, sendAiDebugData, setAiDisabled, setAttacking, setCanPickUpLoot, setEquipmentDropChance, setForwardSpeed, setHoldingEntityId, setLeftHanded, setMovementSpeed, setPathfindingPenalty, setPersistent, setPositionTarget, setSidewaysSpeed, setTarget, setUpwardSpeed, spawnsTooManyForEachTry, startRiding, swimUpward, tickNewAi, tryEquip, turnHead, updateDropChances, updateEnchantments, updateGoalControls
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, attackLivingEntity, canBeRiddenInWater, canBreatheInWater, 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, fall, getAbsorptionAmount, 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, handleFallDamage, 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, 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, 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, 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
private static final UUID BABY_SPEED_ID
private static final EntityAttributeModifier BABY_SPEED_BONUS
private static final TrackedData<Boolean> BABY
private static final TrackedData<Integer> ZOMBIE_TYPE
private static final TrackedData<Boolean> CONVERTING_IN_WATER
private static final Predicate<Difficulty> DOOR_BREAK_DIFFICULTY_CHECKER
private final BreakDoorGoal breakDoorsGoal
private boolean canBreakDoors
private int inWaterTime
private int ticksUntilWaterConversion
public ZombieEntity(EntityType<? extends ZombieEntity> type, World world)
public ZombieEntity(World world)
protected void initCustomGoals()
public static DefaultAttributeContainer.Builder createZombieAttributes()
protected void initDataTracker()
initDataTracker
in class MobEntity
public boolean isConvertingInWater()
public boolean canBreakDoors()
public void setCanBreakDoors(boolean canBreakDoors)
protected boolean shouldBreakDoors()
public boolean isBaby()
isBaby
in class LivingEntity
protected int getCurrentExperience(PlayerEntity player)
getCurrentExperience
in class MobEntity
public void onTrackedDataSet(TrackedData<?> data)
onTrackedDataSet
in class LivingEntity
protected boolean canConvertInWater()
public void tickMovement()
tickMovement
in class HostileEntity
private void setTicksUntilWaterConversion(int ticksUntilWaterConversion)
protected void convertInWater()
protected void convertTo(EntityType<? extends ZombieEntity> entityType)
protected boolean burnsInDaylight()
public boolean damage(DamageSource source, float amount)
damage
in class HostileEntity
protected SoundEvent getAmbientSound()
getAmbientSound
in class MobEntity
protected SoundEvent getHurtSound(DamageSource source)
getHurtSound
in class HostileEntity
protected SoundEvent getDeathSound()
getDeathSound
in class HostileEntity
protected SoundEvent getStepSound()
protected void playStepSound(BlockPos pos, BlockState state)
playStepSound
in class Entity
public EntityGroup getGroup()
getGroup
in class LivingEntity
protected void initEquipment(LocalDifficulty difficulty)
initEquipment
in class MobEntity
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class MobEntity
public void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class MobEntity
public void onKilledOther(ServerWorld serverWorld, LivingEntity livingEntity)
onKilledOther
in class Entity
protected float getActiveEyeHeight(EntityPose pose, EntityDimensions dimensions)
getActiveEyeHeight
in class LivingEntity
public boolean canPickupItem(ItemStack stack)
canPickupItem
in class MobEntity
@Nullable public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, @Nullable EntityData entityData, @Nullable CompoundTag entityTag)
initialize
in class MobEntity
public static boolean method_29936(Random random)
protected void applyAttributeModifiers(float chanceMultiplier)
protected void initAttributes()
public double getHeightOffset()
getHeightOffset
in class Entity
protected void dropEquipment(DamageSource source, int lootingMultiplier, boolean allowDrops)
dropEquipment
in class MobEntity
protected ItemStack getSkull()