Package net.minecraft.src
Class EntityCreature
java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityLivingBase
net.minecraft.src.EntityLiving
net.minecraft.src.EntityCreature
- Direct Known Subclasses:
DireWolfEntity,EntityAgeable,EntityGolem,EntityMob,EntityWaterMob
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe Entity this EntityCreature is set to attack.static final UUIDstatic final AttributeModifierintUsed to make a creature speed up and wander away when hit.booleanreturns true if a creature has attacked recently only used for creepers and skeletonsprotected intprotected floatIf -1 there is no maximum distanceprotected intFields inherited from class net.minecraft.src.EntityLiving
defaultPitch, equipmentDropChances, experienceValue, HAS_ATTACK_TARGET_DATA_WATCHER_ID, livingSoundTime, numTicksToChaseTarget, targetTasks, tasksFields inherited from class net.minecraft.src.EntityLivingBase
arrowHitTimer, attackedAtYaw, attackingPlayer, attackTime, cameraPitch, dead, deathTime, entityAge, entityLivingToAttack, field_110154_aX, field_70741_aB, field_70763_ax, field_70764_aw, field_70768_au, field_70769_ao, field_70770_ap, hurtTime, isJumping, isLivingDead, isSwingInProgress, jumpMovementFactor, landMovementFactor, lastDamage, limbSwing, limbSwingAmount, maxHurtResistantTime, maxHurtTime, moveForward, moveStrafing, newPosRotationIncrements, newPosX, newPosY, newPosZ, newRotationPitch, newRotationYaw, onChoppingBlockMaxCountdown, prevCameraPitch, prevHealth, prevLimbSwingAmount, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomYawVelocity, recentlyHit, recentlyOnChoppingBlockCountdown, renderYawOffset, revengeCountdown, revengeTimer, rotationYawHead, scoreValue, swingProgress, swingProgressIntFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattackEntity(Entity par1Entity, float par2) Basic mob attack.static intattemptToPossessCreaturesAroundBlock(World world, int i, int j, int k, int iPossessionCount, int iCubicRange, PossessionSource<?> possessionSource) booleanattemptToPossessNearbyCreature(double dRange, boolean bPersistentSpirit, PossessionSource<?> possessionSource) protected voidbooleancanSoulAffectEntity(UrnEntity soulEntity) voidprotected voidprotected voidprotected EntityFinds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking (Animals, Spiders at day, peaceful PigZombies).protected voidbooleanfloatbooleanfunc_110176_b(int par1, int par2, int par3) protected voidfunc_142017_o(float par1) floatgetBlockPathWeight(int par1, int par2, int par3) Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block.booleangetCanCreatureBePossessedFromDistance(boolean bPersistentSpirit) booleanbooleanChecks if the entity's current position is a valid location to spawn this entity.Returns current entities targetReturns the chunk coordinate object of the home position.intintintprotected voidbooleanhasHome()Returns whether a home area is defined for this entity.booleanhasPath()Returns true if entity has a path to followvoidinitiatePossession(PossessionSource<?> possessionSource) booleanprotected booleanDisables a mob's ability to move on its own while true.booleanprotected voidvoidonDeath(DamageSource source) Called when the mob's health reaches 0.voidvoidvoidvoid(abstract) Protected helper method to read subclass entity data from NBT.voidsetHomeArea(int par1, int par2, int par3, int par4) voidsetHomeArea(int par1, int par2, int par3, int par4, int dimension) voidsetPathToEntity(PathEntity par1PathEntity) sets the Entities walk path in EntityCreaturevoidsetPossessionLevel(int iLevel) voidSets the entity which is to be attacked.protected booleanshouldContinueAttacking(float fDistanceToTarget) protected voidprotected voidprotected voidTime remaining during which the Animal is sped up and flees.void// +++START EDIT+++ // ---END EDIT--- (abstract) Protected helper method to write subclass entity data to NBT.Methods inherited from class net.minecraft.src.EntityLiving
addRandomArmor, allowLeashing, applyEntityAttributes, attackEntityAsMob, attractsLightning, canAttackClass, canBeSteered, canDespawn, canEntityCenterOfMassBeSeen, canPickUpLoot, clearLeashed, despawnEntity, doesEntityApplyToSpawnCap, dropEquipment, dropFewItems, eatGrassBonus, enchantEquipment, entityLivingAddRandomArmor, entityLivingDropFewItems, entityLivingOnLivingUpdate, entityLivingOnSpawnWithEgg, entityLivingSetAttackTarget, entityLivingUpdateAITasks, faceEntity, func_110146_f, func_110163_bv, func_130225_q, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorItemForSlot, getArmorPosition, getAttackTarget, getCurrentArmorBTW, getCurrentItemOrArmor, getCustomNameTag, getDropItemId, getEntityName, getEntitySenses, getExperiencePoints, getHeldItem, getJumpHelper, getLastActiveItems, getLeashed, getLeashedToEntity, getLivingSound, getLookHelper, getMaxSafePointTries, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getRenderSizeModifier, getTalkInterval, getVerticalFaceSpeed, hasAttackTarget, hasCustomNameTag, installationIntegrityTest, interact, interactFirst, isAIEnabled, isInsideSpawnAreaAroundChunk, isInsideSpawnAreaAroundOriginalSpawn, isInsideSpawnAreaAroundPlayer, isNoDespawnRequired, meleeAttack, minDistFromPlayerForDespawn, onClimbWhileSwimming, onEntityUpdate, onFlungBySquidTentacle, onHeadCrabbedBySquid, onLivingUpdate, onSpawnWithEgg, onUpdate, outOfUpdateRangeUpdate, playLivingSound, preInitCreature, setAIMoveSpeed, setAlwaysRenderNameTag, setAttackTarget, setCanPickUpLoot, setCurrentItemOrArmor, setCustomNameTag, setEquipmentDropChance, setLeashedToEntity, setMoveForward, setPersistent, spawnerInitCreature, spawnExplosionParticle, updateAITasksMethods inherited from class net.minecraft.src.EntityLivingBase
addPotionEffect, applyArmorCalculations, applyPotionDamageCalculations, attackEntityFrom, canBeCollidedWith, canBePushed, canBreatheUnderwater, canEntityBeSeen, canJump, canJumpMidWater, canSwim, checkForHeadDrop, checkForRareDrop, checkForScrollDrop, clearActivePotions, collideWithEntity, collideWithNearbyEntities, damageArmor, damageEntity, decreaseAirSupply, dismountEntity, dropHead, dropRareDrop, entityLivingBaseFall, entityLivingOnDeath, fall, func_110142_aN, func_142015_aE, func_94060_bK, getAbsorptionAmount, getActivePotionEffect, getActivePotionEffects, getAge, getAIMoveSpeed, getAITarget, getAmbientLootingModifier, getArrowCountInEntity, getAttributeMap, getCreatureAttribute, getDeathSound, getDefaultSlipperinessOnGround, getEntityAttribute, getEyeHeight, getHealth, getHealthAndExhaustionModifier, getHurtSound, getItemIcon, getLadderVerticalMovementModifier, getLandMovementModifier, getLastAttacker, getLastAttackerTime, getLook, getLookVec, getMaxHealth, getMeleeAttackStrength, getPosition, getRNG, getRotationYawHead, getSlipperinessRelativeToBlock, getSoundPitch, getSoundVolume, getSpeedModifier, getSwimmingHorizontalModifier, getSwingProgress, getTeam, getTotalArmorValue, handleHealthUpdate, heal, isChild, isClientWorld, isEntityAlive, isEntityUndead, isMovementBlocked, isOnLadder, isOnSameTeam, isOnTeam, isPlayer, isPlayerSleeping, isPotionActive, isPotionActive, isPotionApplicable, isWeighted, isWeightedByHeadCrab, jump, kill, knockBack, knockbackMagnitude, mouseOverCustomRayTrace, moveEntityWithHeading, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onItemPickup, onNewPotionEffect, performHurtAnimation, rayTrace, recoverAirSupply, removePotionEffect, removePotionEffectClient, renderBrokenItemStack, setAbsorptionAmount, setArrowCountInEntity, setBeenAttacked, setHealth, setJumping, setLastAttacker, setPositionAndRotation2, setPositionAndUpdate, setRevengeTarget, setRotationYawHead, setSprinting, swingItem, updateAITick, updateArmSwingProgress, updateFallState, updatePotionEffects, updateRiddenMethods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, applyEntityCollision, canAttackWithItem, canCollideWithEntity, canEntityTriggerTripwire, canRenderOnFire, canTriggerWalking, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBoundingBox, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getCollisionBox, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityString, getFlag, getHeadCrabSharedAttackTarget, getMaxInPortalTime, getMountedYOffset, getParts, getPortalCooldown, getShadowSize, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSecondaryTargetForSquid, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isValidZombieSecondaryTarget, isWet, mountEntity, mountEntityRemote, moveEntity, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onBlockDispenserConsume, onChunkLoad, onCollideWithPlayer, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, setAir, setAngles, setDead, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setSize, setSneaking, setVelocity, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, shouldSetPositionOnLoad, toString, travelToDimension, tryToSetFireToBlocksInContact, updateCloak, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
-
Field Details
-
field_110179_h
-
field_110181_i
-
pathToEntity
-
entityToAttack
The Entity this EntityCreature is set to attack. -
hasAttacked
public boolean hasAttackedreturns true if a creature has attacked recently only used for creepers and skeletons -
fleeingTick
public int fleeingTickUsed to make a creature speed up and wander away when hit. -
homeDimension
protected int homeDimension -
maximumHomeDistance
protected float maximumHomeDistanceIf -1 there is no maximum distance -
possessionTimer
protected int possessionTimer
-
-
Constructor Details
-
EntityCreature
-
-
Method Details
-
isMovementCeased
protected boolean isMovementCeased()Disables a mob's ability to move on its own while true. -
updateEntityActionState
protected void updateEntityActionState()- Overrides:
updateEntityActionStatein classEntityLiving
-
updateWanderPath
protected void updateWanderPath()Time remaining during which the Animal is sped up and flees. -
attackEntity
Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack. -
getBlockPathWeight
public float getBlockPathWeight(int par1, int par2, int par3) Takes a coordinate in and returns a weight to determine how likely this creature will try to path to the block. Args: x, y, z -
findPlayerToAttack
Finds the closest player within 16 blocks to attack, or null if this Entity isn't interested in attacking (Animals, Spiders at day, peaceful PigZombies). -
getCanSpawnHere
public boolean getCanSpawnHere()Checks if the entity's current position is a valid location to spawn this entity.- Overrides:
getCanSpawnHerein classEntityLiving
-
hasPath
public boolean hasPath()Returns true if entity has a path to follow -
setPathToEntity
sets the Entities walk path in EntityCreature -
getEntityToAttack
Returns current entities target -
setTarget
Sets the entity which is to be attacked. -
entityInit
protected void entityInit()- Overrides:
entityInitin classEntityLiving
-
entityCreatureEntityInit
protected void entityCreatureEntityInit() -
writeEntityToNBT
Description copied from class:EntityLiving// +++START EDIT+++ // ---END EDIT--- (abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBTin classEntityLiving
-
readEntityFromNBT
Description copied from class:EntityLiving(abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBTin classEntityLiving
-
modSpecificOnLivingUpdate
protected void modSpecificOnLivingUpdate()- Overrides:
modSpecificOnLivingUpdatein classEntityLiving
-
getCanCreatureTypeBePossessed
public boolean getCanCreatureTypeBePossessed() -
getCanCreatureBePossessedFromDistance
public boolean getCanCreatureBePossessedFromDistance(boolean bPersistentSpirit) -
isPossessed
public boolean isPossessed() -
isFullyPossessed
public boolean isFullyPossessed() -
setPossessionLevel
public void setPossessionLevel(int iLevel) -
getPossessionLevel
public int getPossessionLevel() -
getInitialPossessionChance
public int getInitialPossessionChance() -
getTimeToFullPossession
public int getTimeToFullPossession() -
onInitialPossession
public void onInitialPossession() -
onFullPossession
public void onFullPossession() -
playFullPossessionSound
public void playFullPossessionSound() -
initiatePossession
-
handlePossession
protected void handlePossession() -
attemptToPossessNearbyCreature
public boolean attemptToPossessNearbyCreature(double dRange, boolean bPersistentSpirit, PossessionSource<?> possessionSource) -
attemptToPossessCreaturesAroundBlock
public static int attemptToPossessCreaturesAroundBlock(World world, int i, int j, int k, int iPossessionCount, int iCubicRange, PossessionSource<?> possessionSource) -
attemptToPossessNearbyCreatureOnDeath
protected void attemptToPossessNearbyCreatureOnDeath() -
onDeath
Description copied from class:EntityLivingBaseCalled when the mob's health reaches 0.- Overrides:
onDeathin classEntityLivingBase
-
shouldContinueAttacking
protected boolean shouldContinueAttacking(float fDistanceToTarget) -
func_110173_bK
public boolean func_110173_bK() -
func_110176_b
public boolean func_110176_b(int par1, int par2, int par3) -
setHomeArea
public void setHomeArea(int par1, int par2, int par3, int par4) -
setHomeArea
public void setHomeArea(int par1, int par2, int par3, int par4, int dimension) -
getHomePosition
Returns the chunk coordinate object of the home position. -
func_110174_bM
public float func_110174_bM() -
detachHome
public void detachHome() -
hasHome
public boolean hasHome()Returns whether a home area is defined for this entity. -
func_110159_bB
protected void func_110159_bB()- Overrides:
func_110159_bBin classEntityLiving
-
func_142017_o
protected void func_142017_o(float par1) -
transmitAttackTargetToClients
protected void transmitAttackTargetToClients() -
canSoulAffectEntity
-