Package net.minecraft.entity.monster
Class EntityZombie
- java.lang.Object
-
- Direct Known Subclasses:
EntityPigZombie
public class EntityZombie extends EntityMob
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.entity.EntityLiving
EntityLiving.SpawnPlacementType
-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected static IAttribute
reinforcementChance
+ The attribute which determines the chance that this mob will spawn reinforcements-
Fields inherited from class net.minecraft.entity.EntityCreature
FLEEING_SPEED_MODIFIER, FLEEING_SPEED_MODIFIER_UUID
-
Fields inherited from class net.minecraft.entity.EntityLiving
equipmentDropChances, experienceValue, livingSoundTime
-
Fields inherited from class net.minecraft.entity.EntityLivingBase
arrowHitTimer, attackedAtYaw, attackingPlayer, cameraPitch, dead, deathTime, entityAge, field_70741_aB, field_70769_ao, field_70770_ap, hurtTime, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, onGroundSpeedFactor, prevCameraPitch, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, swingProgress, swingProgressInt
-
Fields inherited from class net.minecraft.entity.Entity
addedToChunk, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
-
Fields inherited from interface net.minecraft.entity.monster.IMob
mobSelector, VISIBLE_MOB_SELECTOR
-
-
Constructor Summary
Constructors Constructor Description EntityZombie(World worldIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addRandomDrop()
+ Causes this Entity to drop a random item.protected void
applyEntityAttributes()
boolean
attackEntityAsMob(Entity entity)
boolean
attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.protected boolean
canDespawn()
+ Determines if an entity can be despawned, used on idle far away entitiesprotected void
convertToVillager()
+ Convert this zombie into a villager.protected void
entityInit()
protected boolean
func_175448_a(ItemStack itemstack)
protected int
getConversionTimeBoost()
+ Return the amount of time decremented from conversionTime every tick.EnumCreatureAttribute
getCreatureAttribute()
+ Get this Entity's EnumCreatureAttributeprotected java.lang.String
getDeathSound()
+ Returns the sound this mob makes on death.protected Item
getDropItem()
protected int
getExperiencePoints(EntityPlayer entityplayer)
+ Get the experience points the entity currently has.float
getEyeHeight()
protected java.lang.String
getHurtSound()
+ Returns the sound this mob makes when it is hurt.protected java.lang.String
getLivingSound()
+ Returns the sound this mob makes while it's alive.int
getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValuedouble
getYOffset()
+ Returns the Y Offset of this entity.void
handleStatusUpdate(byte b0)
boolean
interact(EntityPlayer entityplayer)
+ Called when a player interacts with a mob.boolean
isBreakDoorsTaskSet()
boolean
isChild()
+ If Animal, checks if the age timer is negativeboolean
isConverting()
+ Returns whether this zombie is in the process of converting to a villagerboolean
isVillager()
+ Return whether this zombie is a villager.protected void
multiplySize(float size)
+ Multiplies the height and width by the provided float.void
onDeath(DamageSource damagesource)
+ Called when the mob's health reaches 0.IEntityLivingData
onInitialSpawn(DifficultyInstance difficultyinstance, IEntityLivingData ientitylivingdata)
+ Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called when entity is reloaded from nbt.void
onKillEntity(EntityLivingBase entitylivingbase)
+ This method gets called when the entity kills another one.protected void
playStepSound(BlockPos var1, Block var2)
void
readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.void
setChild(boolean childZombie)
+ Set whether this zombie is a child.void
setChildSize(boolean isChild)
+ sets the size of the entity to be half of its current size if true.protected void
setEquipmentBasedOnDifficulty(DifficultyInstance difficultyinstance)
+ Gives armor or weapon for entity based on given DifficultyInstanceprotected void
setSize(float f, float f1)
+ Sets the width and height of the entity.void
setVillager(boolean villager)
+ Set whether this zombie is a villager.protected void
startConversion(int ticks)
+ Starts converting this zombie into a villager.void
writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.-
Methods inherited from class net.minecraft.entity.monster.EntityMob
canDropLoot, getBlockPathWeight, getCanSpawnHere, getFallSoundString, getSplashSound, getSwimSound, isValidLightLevel, onLivingUpdate
-
Methods inherited from class net.minecraft.entity.EntityCreature
detachHome, func_142017_o, getHomePosition, getMaximumHomeDistance, hasHome, hasPath, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, setHomePosAndDistance, updateLeashedState
-
Methods inherited from class net.minecraft.entity.EntityLiving
allowLeashing, canAttackClass, canBeSteered, canPickUpLoot, clearLeashed, despawnEntity, dropEquipment, dropFewItems, eatGrassBonus, enablePersistence, faceEntity, func_110146_f, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmor, getEquipmentInSlot, getHeldItem, getInventory, getLeashed, getLeashedToEntity, getMaxFallHeight, getMaxSpawnedInChunk, getRenderSizeModifier, getTalkInterval, getVerticalFaceSpeed, interactFirst, isAIDisabled, isNoDespawnRequired, isNotColliding, isServerWorld, onEntityUpdate, playLivingSound, replaceItemInInventory, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setEnchantmentBasedOnDifficulty, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setNoAI, spawnExplosionParticle, updateAITasks, updateEntityActionState, updateEquipmentIfNeeded
-
Methods inherited from class net.minecraft.entity.EntityLivingBase
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, clearActivePotions, collideWithEntity, collideWithNearbyEntities, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, fall, func_181013_g, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttributeMap, getCombatTracker, getEntityAttribute, getHealth, getJumpUpwardsMotion, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getRevengeTimer, getRNG, getRotationYawHead, getSoundPitch, getSoundVolume, getSwingProgress, getTeam, handleJumpLava, heal, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, jump, kill, knockBack, loadPluginData, makePluginData, markPotionsDirty, mountEntity, moveEntityWithHeading, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onKillCommand, onNewPotionEffect, onUpdate, performHurtAnimation, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, resetPotionEffectMetadata, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setRevengeTarget, setRotationYawHead, setSprinting, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRidden
-
Methods inherited from class net.minecraft.entity.Entity
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, applyEntityCollision, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canTriggerWalking, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fromNBT, func_181012_aH, func_181014_aG, func_181015_d, getAir, getAlwaysRenderNameTag, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSenderEntity, getCustomNameTag, getDataWatcher, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getFlag, getHorizontalFacing, getHoverEvent, getMaxInPortalTime, getMountedYOffset, getName, getNBTTagCompound, getParts, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getUniqueID, getVectorForRotation, handleWaterMovement, hasCustomName, hashCode, hitByEntity, interactAt, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSprinting, isWet, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onStruckByLightning, playSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setCustomNameTag, setDead, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPosition, setPositionAndRotation, setPositionAndUpdate, setRotation, setSilent, setSneaking, setVelocity, setWorld, shouldSetPosAfterLoading, spawnRunningParticles, toNBT, toString, travelToDimension, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Field Detail
-
reinforcementChance
protected static final IAttribute reinforcementChance
+ The attribute which determines the chance that this mob will spawn reinforcements
-
-
Constructor Detail
-
EntityZombie
public EntityZombie(World worldIn)
-
-
Method Detail
-
applyEntityAttributes
protected void applyEntityAttributes()
- Overrides:
applyEntityAttributes
in classEntityMob
-
entityInit
protected void entityInit()
- Overrides:
entityInit
in classEntityLiving
-
getTotalArmorValue
public int getTotalArmorValue()
+ Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue- Overrides:
getTotalArmorValue
in classEntityLivingBase
-
isBreakDoorsTaskSet
public boolean isBreakDoorsTaskSet()
-
isChild
public boolean isChild()
+ If Animal, checks if the age timer is negative- Overrides:
isChild
in classEntityLivingBase
-
getExperiencePoints
protected int getExperiencePoints(EntityPlayer entityplayer)
+ Get the experience points the entity currently has.- Overrides:
getExperiencePoints
in classEntityLiving
-
setChild
public void setChild(boolean childZombie)
+ Set whether this zombie is a child.
-
isVillager
public boolean isVillager()
+ Return whether this zombie is a villager.
-
setVillager
public void setVillager(boolean villager)
+ Set whether this zombie is a villager.
-
attackEntityFrom
public boolean attackEntityFrom(DamageSource damagesource, float f)
+ Called when the entity is attacked.- Overrides:
attackEntityFrom
in classEntityMob
-
attackEntityAsMob
public boolean attackEntityAsMob(Entity entity)
- Overrides:
attackEntityAsMob
in classEntityMob
-
getLivingSound
protected java.lang.String getLivingSound()
+ Returns the sound this mob makes while it's alive.- Overrides:
getLivingSound
in classEntityLiving
-
getHurtSound
protected java.lang.String getHurtSound()
+ Returns the sound this mob makes when it is hurt.- Overrides:
getHurtSound
in classEntityMob
-
getDeathSound
protected java.lang.String getDeathSound()
+ Returns the sound this mob makes on death.- Overrides:
getDeathSound
in classEntityMob
-
playStepSound
protected void playStepSound(BlockPos var1, Block var2)
- Overrides:
playStepSound
in classEntity
-
getDropItem
protected Item getDropItem()
- Overrides:
getDropItem
in classEntityLiving
-
getCreatureAttribute
public EnumCreatureAttribute getCreatureAttribute()
+ Get this Entity's EnumCreatureAttribute- Overrides:
getCreatureAttribute
in classEntityLivingBase
-
addRandomDrop
protected void addRandomDrop()
+ Causes this Entity to drop a random item.- Overrides:
addRandomDrop
in classEntityLivingBase
-
setEquipmentBasedOnDifficulty
protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficultyinstance)
+ Gives armor or weapon for entity based on given DifficultyInstance- Overrides:
setEquipmentBasedOnDifficulty
in classEntityLiving
-
writeEntityToNBT
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBT
in classEntityLiving
-
readEntityFromNBT
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
+ (abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBT
in classEntityLiving
-
onKillEntity
public void onKillEntity(EntityLivingBase entitylivingbase)
+ This method gets called when the entity kills another one.- Overrides:
onKillEntity
in classEntity
-
getEyeHeight
public float getEyeHeight()
- Overrides:
getEyeHeight
in classEntity
-
func_175448_a
protected boolean func_175448_a(ItemStack itemstack)
- Overrides:
func_175448_a
in classEntityLiving
-
onInitialSpawn
public IEntityLivingData onInitialSpawn(DifficultyInstance difficultyinstance, IEntityLivingData ientitylivingdata)
+ Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called when entity is reloaded from nbt. Mainly used for initializing attributes and inventory- Overrides:
onInitialSpawn
in classEntityLiving
-
interact
public boolean interact(EntityPlayer entityplayer)
+ Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.- Overrides:
interact
in classEntityLiving
-
startConversion
protected void startConversion(int ticks)
+ Starts converting this zombie into a villager. The zombie converts into a villager after the specified time in ticks.
-
handleStatusUpdate
public void handleStatusUpdate(byte b0)
- Overrides:
handleStatusUpdate
in classEntityLiving
-
canDespawn
protected boolean canDespawn()
+ Determines if an entity can be despawned, used on idle far away entities- Overrides:
canDespawn
in classEntityLiving
-
isConverting
public boolean isConverting()
+ Returns whether this zombie is in the process of converting to a villager
-
convertToVillager
protected void convertToVillager()
+ Convert this zombie into a villager.
-
getConversionTimeBoost
protected int getConversionTimeBoost()
+ Return the amount of time decremented from conversionTime every tick.
-
setChildSize
public void setChildSize(boolean isChild)
+ sets the size of the entity to be half of its current size if true.
-
setSize
protected final void setSize(float f, float f1)
+ Sets the width and height of the entity. Args: width, height
-
multiplySize
protected final void multiplySize(float size)
+ Multiplies the height and width by the provided float.
-
getYOffset
public double getYOffset()
+ Returns the Y Offset of this entity.- Overrides:
getYOffset
in classEntity
-
onDeath
public void onDeath(DamageSource damagesource)
+ Called when the mob's health reaches 0.- Overrides:
onDeath
in classEntityLivingBase
-
-