Package net.minecraft.world.entity
Class LivingEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
- All Implemented Interfaces:
CommandSource,SyncedDataHolder,Attackable,EntityAccess,Nameable,ScoreHolder,IAttachmentHolder,IEntityExtension,ILivingEntityExtension,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
ArmorStand,Mob,Player
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate final Map<Holder<MobEffect>, MobEffectInstance> private final it.unimi.dsi.fastutil.objects.Reference2ObjectMap<Enchantment, Set<EnchantmentLocationBasedEffect>> protected floatprotected floatprotected floatstatic final intstatic final intfloatprotected intprivate final AttributeMapstatic final Stringprotected floatprotected ItemStackprotected intstatic final floatstatic final intprotected Brain<?> private final CombatTrackerprivate static final intprotected Stack<DamageContainer> This field stores information about damage dealt to this entity.private static final EntityDataAccessor<Integer> private static final EntityDataAccessor<Boolean> private static final EntityDataAccessor<List<ParticleOptions>> private static final EntityDataAccessor<Float> protected static final EntityDataAccessor<Byte> private static final EntityDataAccessor<Integer> protected booleanstatic final intprotected intintstatic final floatstatic final doubleprivate booleanprivate booleanstatic final intstatic final floatprotected intprivate static final intstatic final intintintfinal intprivate static final floatprotected booleanprivate final NonNullList<ItemStack> private ItemStackprivate DamageSourceprivate longprivate final NonNullList<ItemStack> protected floatDamage taken in the last hit.private LivingEntityprivate intprotected Playerprotected intprivate LivingEntityprivate intHolds the value of ticksExisted when setLastAttacker was last called.private BlockPosprotected intprotected intprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected doubleprotected static final intprotected static final intprotected static final intprivate static final org.slf4j.Loggerprivate static final doublestatic final doubleprotected intprivate intfloatprotected floatprivate static final intstatic final intintintfinal floatprotected floatprotected floatprivate booleanprotected static final EntityDimensionsprivate static final EntityDataAccessor<Optional<BlockPos>> private floatprivate static final ResourceLocationprivate static final AttributeModifierprivate static final ResourceLocationprivate floatprivate floatstatic final intbooleanintprivate static final Stringprivate static final intfinal floatstatic final intprotected ItemStackprotected intfinal WalkAnimationStatefloatfloatfloatfloatfloatfloatfloatFields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalProcess, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOldFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSource
NULLFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLivingEntity(EntityType<? extends LivingEntity> pEntityType, Level pLevel) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidactuallyHurt(DamageSource pDamageSource, float pDamageAmount) Deals damage to the entity.voidaddAdditionalSaveData(CompoundTag pCompound) private voidaddEatEffect(FoodProperties pFoodProperties) final booleanaddEffect(MobEffectInstance pEffectInstance) booleanaddEffect(MobEffectInstance pEffectInstance, Entity pEntity) voidaiStep()voidanimateHurt(float pYaw) static booleanareAllEffectsAmbient(Collection<MobEffectInstance> pPotionEffects) Returnstrueif all the potion effects in the specified collection are ambient.booleanvoidbaseTick()protected voidblockedByShield(LivingEntity pDefender) protected voidblockUsingShield(LivingEntity pAttacker) protected Brain.Provider<?> private voidRenders broken item particles using the given ItemStackvoidcalculateEntityAnimation(boolean pIncludeHeight) protected intcalculateFallDamage(float pFallDistance, float pDamageMultiplier) booleancanAttack(LivingEntity pTarget) booleancanAttack(LivingEntity pLivingentity, TargetingConditions pCondition) booleancanAttackType(EntityType<?> pEntityType) booleancanBeAffected(MobEffectInstance pEffectInstance) Deprecated.booleanbooleanfinal booleanDeprecated.booleanbooleanbooleancanStandOnFluid(FluidState pFluidState) booleancanTakeItem(ItemStack pStack) booleancanUsePortal(boolean pAllowPassengers) booleancanUseSlot(EquipmentSlot pSlot) booleancauseFallDamage(float pFallDistance, float pMultiplier, DamageSource pSource) protected voidcheckAutoSpinAttack(AABB pBoundingBoxBeforeSpin, AABB pBoundingBoxAfterSpin) private booleanprotected voidcheckFallDamage(double pY, boolean pOnGround, BlockState pState, BlockPos pPos) private booleancheckTotemDeathProtection(DamageSource pDamageSource) voidprivate Map<EquipmentSlot, ItemStack> protected voidprivate static SlotAccesscreateEquipmentSlotAccess(LivingEntity pEntity, EquipmentSlot pSlot) static AttributeSupplier.Builderprotected voidcreateWitherRose(LivingEntity pEntitySource) protected intdecreaseAirSupply(int pCurrentAir) Decrements the entity's air supply when underwaterprotected voiddefineSynchedData(SynchedEntityData.Builder pBuilder) private voidvoiddie(DamageSource pDamageSource) Called when the mob's health reaches 0.private voiddismountVehicle(Entity pVehicle) protected voiddoAutoAttackOnTouch(LivingEntity pTarget) protected booleandoesEmitEquipEvent(EquipmentSlot pSlot) protected voiddoHurtEquipment(DamageSource pDamageSource, float pDamageAmount, EquipmentSlot... pSlots) booleandoHurtTarget(Entity pTarget) protected voidprotected voiddropAllDeathLoot(ServerLevel pLevel, DamageSource pDamageSource) protected voiddropCustomDeathLoot(ServerLevel pLevel, DamageSource pDamageSource, boolean pRecentlyHit) protected voidprotected voiddropExperience(Entity pEntity) protected voiddropFromLootTable(DamageSource pDamageSource, boolean pHitByPlayer) final ItemStackeat(Level pLevel, ItemStack pFood, FoodProperties pFoodProperties) private static bytebooleanequipmentHasChanged(ItemStack pOldItem, ItemStack pNewItem) voidforceAddEffect(MobEffectInstance pInstance, Entity pEntity) floatfloatfloatintfinal intfloatgetAttackAnim(float pPartialTick) Gets the progression of the swing animation, ranges from 0.0 to 1.0.getAttribute(Holder<Attribute> pAttribute) doublegetAttributeBaseValue(Holder<Attribute> pAttribute) doublegetAttributeValue(Holder<Attribute> pAttribute) protected intprotected floatBrain<?> getBrain()protected final intgetComfortableFallDistance(float pHealth) intprotected floatgetDamageAfterArmorAbsorb(DamageSource pDamageSource, float pDamageAmount) Reduces damage, depending on armorprotected floatgetDamageAfterMagicAbsorb(DamageSource pDamageSource, float pDamageAmount) Reduces damage, depending on potionsprotected SoundEventprotected EntityDimensionsgetDefaultDimensions(Pose pPose) protected doublefinal EntityDimensionsgetDimensions(Pose pPose) protected SoundEventgetDrinkingSound(ItemStack pStack) getEatingSound(ItemStack pStack) private static EquipmentSlotgetEquipmentSlot(int pIndex) getEquipmentSlotForItem(ItemStack pStack) final intgetExperienceReward(ServerLevel pLevel, Entity pKiller) private SoundEventgetFallDamageSound(int pHeight) intgetFluidFallingAdjustedMovement(double pGravity, boolean pIsFalling, Vec3 pDeltaMovement) protected floatprivate floatgetFrictionInfluencedSpeed(float pFriction) floatfloatprotected SoundEventgetHurtSound(DamageSource pDamageSource) abstract ItemStackgetItemBySlot(EquipmentSlot pSlot) getItemInHand(InteractionHand pHand) floatprotected floatprotected floatgetJumpPower(float pMultiplier) protected floatgetKnockback(Entity pAttacker, DamageSource pDamageSource) private ItemStackgetLastArmorItem(EquipmentSlot pSlot) private ItemStackgetLastHandItem(EquipmentSlot pSlot) intintgetLocalBoundsForPose(Pose pPose) longabstract HumanoidArmfinal floatintprotected floatfinal floatintgetPassengerRidingPosition(Entity pEntity) floatgetPreciseBodyRotation(float pPartialTick) getProjectile(ItemStack pWeaponStack) Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available.getRelativePortalPosition(Direction.Axis pAxis, BlockUtil.FoundRectangle pPortal) protected Vec3getRiddenInput(Player pPlayer, Vec3 pTravelVector) protected floatgetRiddenSpeed(Player pPlayer) floatgetScale()getSlot(int pSlot) static EquipmentSlotgetSlotForHand(InteractionHand pHand) protected floatfloatgetSpeed()final intfloatgetSwimAmount(float pPartialTicks) intintfloatgetViewYRot(float pPartialTicks) Gets the current yaw of the entitydoublegetVisibilityPercent(Entity pLookingEntity) floatfloatprotected floatfloatprotected voidDeprecated.voidhandleDamageEvent(DamageSource pDamageSource) voidhandleEntityEvent(byte pId) Handler forinvalid reference
World#setEntityStateprivate voidhandleEquipmentChanges(Map<EquipmentSlot, ItemStack> pEquipments) private voidhandleHandSwap(Map<EquipmentSlot, ItemStack> pHands) private Vec3handleOnClimbable(Vec3 pDeltaMovement) handleRelativeFrictionAndCalculateMovement(Vec3 pDeltaMovement, float pFriction) booleanbooleanbooleanhasItemInSlot(EquipmentSlot pSlot) booleanbooleanhasLineOfSight(Entity pEntity) voidheal(float pHealAmount) Heal living entity (param: amount of half-hearts)booleanhurt(DamageSource pSource, float pAmount) Called when the entity is attacked.protected voidhurtArmor(DamageSource pDamageSource, float pDamageAmount) protected voidhurtCurrentlyUsedShield(float pDamageAmount) protected voidhurtHelmet(DamageSource pDamageSource, float pDamageAmount) voidigniteForTicks(int pTicks) protected intincreaseAirSupply(int pCurrentAir) voidindicateDamage(double pXDistance, double pZDistance) protected voidinternalSetAbsorptionAmount(float pAbsorptionAmount) protected booleanbooleanbooleanisAlive()protected booleanbooleanbooleanisBaby()booleanbooleanbooleanisDamageSourceBlocked(DamageSource pDamageSource) Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking.booleanbooleanbooleanbooleanprotected booleanbooleanbooleanisInvulnerableTo(DamageSource pSource) Returns whether this Entity is invulnerable to the given DamageSource.booleanisInWall()booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidprotected voidjumpInLiquid(TagKey<Fluid> pFluidTag) Deprecated.voidkill()voidknockback(double pStrength, double pX, double pZ) protected voidlerpHeadRotationStep(int pLerpHeadSteps, double pLerpYHeadRot) voidlerpHeadTo(float pYaw, int pPitch) doublefloatdoublefloatdoublevoidlerpTo(double pX, double pY, double pZ, float pYRot, float pXRot, int pSteps) voidlookAt(EntityAnchorArgument.Anchor pAnchor, Vec3 pTarget) protected Brain<?> makeBrain(com.mojang.serialization.Dynamic<?> pDynamic) private voidvoidmakeSound(SoundEvent pSound) floatprivate voidonAttributeUpdated(Holder<Attribute> pAttribute) protected voidprotected voidonChangedBlock(ServerLevel pLevel, BlockPos pPos) booleanprotected voidonEffectAdded(MobEffectInstance pEffectInstance, Entity pEntity) protected voidonEffectRemoved(MobEffectInstance pEffectInstance) protected voidonEffectUpdated(MobEffectInstance pEffectInstance, boolean pForced, Entity pEntity) voidvoidonEquipItem(EquipmentSlot pSlot, ItemStack pOldItem, ItemStack pNewItem) voidonEquippedItemBroken(Item pItem, EquipmentSlot pSlot) voidonItemPickup(ItemEntity pItemEntity) voidvoidonSyncedDataUpdated(EntityDataAccessor<?> pKey) protected voidprotected voidplayHurtSound(DamageSource pSource) voidApplies a velocity to the entities, to push them away from each other.protected voidbooleanrandomTeleport(double pX, double pY, double pZ, boolean pBroadcastTeleport) voidreadAdditionalSaveData(CompoundTag pCompound) (abstract) Protected helper method to read subclass entity data from NBT.voidprivate voidvoidvoidremove(Entity.RemovalReason pReason) booleanbooleanremoveEffect(Holder<MobEffect> pEffect) removeEffectNoUpdate(Holder<MobEffect> pEffect) protected voidbooleanNeo: Removes all potion effects that have the givenEffectCurein their set of curesprotected voidstatic Vec3resetForwardDirectionOfRelativePortalPosition(Vec3 pRelativePortalPosition) voidrideTick()protected floatsanitizeScale(float pScale) voidsendEffectToPassengers(MobEffectInstance pEffectInstance) protected voidfinal voidsetAbsorptionAmount(float pAbsorptionAmount) final voidsetArrowCount(int pCount) Sets the amount of arrows stuck in the entity.voidsetDiscardFriction(boolean pDiscardFriction) voidsetHealth(float pHealth) voidsetItemInHand(InteractionHand pHand, ItemStack pStack) abstract voidsetItemSlot(EquipmentSlot pSlot, ItemStack pStack) voidsetJumping(boolean pJumping) private voidsetLastArmorItem(EquipmentSlot pSlot, ItemStack pStack) private voidsetLastHandItem(EquipmentSlot pSlot, ItemStack pStack) voidsetLastHurtByMob(LivingEntity pLivingEntity) Hint to AI tasks that we were attacked by the passed EntityLivingBase and should retaliate.voidsetLastHurtByPlayer(Player pPlayer) voidsetLastHurtMob(Entity pEntity) protected voidsetLivingEntityFlag(int pKey, boolean pValue) voidsetNoActionTime(int pIdleTime) private voidsetPosToBed(BlockPos p_21081_) Sets entity position to a supplied BlockPos plus a little offsetvoidsetRecordPlayingNearby(BlockPos pJukebox, boolean pPartyParrot) Called when a record starts or stops playing.voidsetSleepingPos(BlockPos pPos) voidsetSpeed(float pSpeed) Sets the movespeed used for the new AI system.voidsetSprinting(boolean pSprinting) Set sprinting switch for Entity.final voidsetStingerCount(int pStingerCount) voidsetYBodyRot(float pOffset) Set the render yaw offsetvoidsetYHeadRot(float pRotation) Sets the head's yaw rotation of the entity.booleanbooleanprotected booleanbooleanshouldRiderFaceForward(Player player) Neo: Returns true if the entity's rider (EntityPlayer) should face forward when mounted.booleanprivate booleanvoidprivate voidspawnItemParticles(ItemStack pStack, int pAmount) voidstartSleeping(BlockPos pPos) voidstartUsingItem(InteractionHand pHand) voidvoidvoidprivate voidvoidswing(InteractionHand pHand) voidswing(InteractionHand pHand, boolean pUpdateSelf) voidCalled when the entity picks up an item.voidtick()protected voidprotected voidprotected floattickHeadTurn(float pYRot, float pAnimStep) protected voidtickRidden(Player pPlayer, Vec3 pTravelVector) private booleantrapdoorUsableAsLadder(BlockPos pPos, BlockState pState) voidprivate voidtravelRidden(Player pPlayer, Vec3 pTravelVector) protected voidtriggerItemUseEffects(ItemStack pStack, int pAmount) protected voidtriggerOnDeathMobEffects(Entity.RemovalReason pRemovalReason) protected voidprotected voidprivate voidprivate voidprotected voidprivate voidprotected voidprivate voidprotected voidupdateUsingItem(ItemStack pUsingItem) protected voidupdateWalkAnimation(float pPartialTick) private voidprotected voidverifyEquippedItem(ItemStack pStack) booleanprotected booleanMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, absRotateTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, applyGravity, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canSprint, canTrample, captureDrops, captureDrops, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, fudgePositionAfterSizeChange, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getKnownMovement, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandom, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, igniteForSeconds, ignoreExplosion, interact, interactAt, is, isAddedToLevel, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, killedEntity, lavaHurt, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToLevel, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setAsInsidePortal, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopSeenByPlayer, syncData, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateInWaterStateAndDoWaterCurrentPushing, updateSwimming, waterSwimSoundMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToLevel, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToLevel, onRemovedFromLevel, revive, sendPairingData, serializeNBT, shouldRiderSitMethods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, onDamageTaken, self, sinkInFluidMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
TAG_ACTIVE_EFFECTS
- See Also:
-
SPEED_MODIFIER_POWDER_SNOW_ID
-
SPRINTING_MODIFIER_ID
-
SPEED_MODIFIER_SPRINTING
-
HAND_SLOTS
public static final int HAND_SLOTS- See Also:
-
ARMOR_SLOTS
public static final int ARMOR_SLOTS- See Also:
-
EQUIPMENT_SLOT_OFFSET
public static final int EQUIPMENT_SLOT_OFFSET- See Also:
-
ARMOR_SLOT_OFFSET
public static final int ARMOR_SLOT_OFFSET- See Also:
-
BODY_ARMOR_OFFSET
public static final int BODY_ARMOR_OFFSET- See Also:
-
SWING_DURATION
public static final int SWING_DURATION- See Also:
-
PLAYER_HURT_EXPERIENCE_TIME
public static final int PLAYER_HURT_EXPERIENCE_TIME- See Also:
-
DAMAGE_SOURCE_TIMEOUT
private static final int DAMAGE_SOURCE_TIMEOUT- See Also:
-
MIN_MOVEMENT_DISTANCE
public static final double MIN_MOVEMENT_DISTANCE- See Also:
-
DEFAULT_BASE_GRAVITY
public static final double DEFAULT_BASE_GRAVITY- See Also:
-
DEATH_DURATION
public static final int DEATH_DURATION- See Also:
-
TICKS_PER_ELYTRA_FREE_FALL_EVENT
private static final int TICKS_PER_ELYTRA_FREE_FALL_EVENT- See Also:
-
FREE_FALL_EVENTS_PER_ELYTRA_BREAK
private static final int FREE_FALL_EVENTS_PER_ELYTRA_BREAK- See Also:
-
USE_ITEM_INTERVAL
public static final int USE_ITEM_INTERVAL- See Also:
-
BASE_JUMP_POWER
public static final float BASE_JUMP_POWER- See Also:
-
MAX_LINE_OF_SIGHT_TEST_RANGE
private static final double MAX_LINE_OF_SIGHT_TEST_RANGE- See Also:
-
LIVING_ENTITY_FLAG_IS_USING
protected static final int LIVING_ENTITY_FLAG_IS_USING- See Also:
-
LIVING_ENTITY_FLAG_OFF_HAND
protected static final int LIVING_ENTITY_FLAG_OFF_HAND- See Also:
-
LIVING_ENTITY_FLAG_SPIN_ATTACK
protected static final int LIVING_ENTITY_FLAG_SPIN_ATTACK- See Also:
-
DATA_LIVING_ENTITY_FLAGS
-
DATA_HEALTH_ID
-
DATA_EFFECT_PARTICLES
-
DATA_EFFECT_AMBIENCE_ID
-
DATA_ARROW_COUNT_ID
-
DATA_STINGER_COUNT_ID
-
SLEEPING_POS_ID
-
PARTICLE_FREQUENCY_WHEN_INVISIBLE
private static final int PARTICLE_FREQUENCY_WHEN_INVISIBLE- See Also:
-
SLEEPING_DIMENSIONS
-
EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT
public static final float EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT- See Also:
-
DEFAULT_BABY_SCALE
public static final float DEFAULT_BABY_SCALE- See Also:
-
ITEM_USE_EFFECT_START_FRACTION
private static final float ITEM_USE_EFFECT_START_FRACTION- See Also:
-
ATTRIBUTES_FIELD
- See Also:
-
attributes
-
combatTracker
-
activeEffects
-
lastHandItemStacks
-
lastArmorItemStacks
-
lastBodyItemStack
-
swinging
public boolean swinging -
discardFriction
private boolean discardFriction -
swingingArm
-
swingTime
public int swingTime -
removeArrowTime
public int removeArrowTime -
removeStingerTime
public int removeStingerTime -
hurtTime
public int hurtTime -
hurtDuration
public int hurtDuration -
deathTime
public int deathTime -
oAttackAnim
public float oAttackAnim -
attackAnim
public float attackAnim -
attackStrengthTicker
protected int attackStrengthTicker -
walkAnimation
-
invulnerableDuration
public final int invulnerableDuration- See Also:
-
timeOffs
public final float timeOffs -
rotA
public final float rotA -
yBodyRot
public float yBodyRot -
yBodyRotO
public float yBodyRotO -
yHeadRot
public float yHeadRot -
yHeadRotO
public float yHeadRotO -
lastHurtByPlayer
-
lastHurtByPlayerTime
protected int lastHurtByPlayerTime -
dead
protected boolean dead -
noActionTime
protected int noActionTime -
oRun
protected float oRun -
run
protected float run -
animStep
protected float animStep -
animStepO
protected float animStepO -
rotOffs
protected float rotOffs -
deathScore
protected int deathScore -
lastHurt
protected float lastHurtDamage taken in the last hit. Mobs are resistant to damage less than this for a short time after taking damage. -
jumping
protected boolean jumping -
xxa
public float xxa -
yya
public float yya -
zza
public float zza -
lerpSteps
protected int lerpSteps -
lerpX
protected double lerpX -
lerpY
protected double lerpY -
lerpZ
protected double lerpZ -
lerpYRot
protected double lerpYRot -
lerpXRot
protected double lerpXRot -
lerpYHeadRot
protected double lerpYHeadRot -
lerpHeadSteps
protected int lerpHeadSteps -
effectsDirty
private boolean effectsDirty -
lastHurtByMob
-
lastHurtByMobTimestamp
private int lastHurtByMobTimestamp -
lastHurtMob
-
lastHurtMobTimestamp
private int lastHurtMobTimestampHolds the value of ticksExisted when setLastAttacker was last called. -
speed
private float speed -
noJumpDelay
private int noJumpDelay -
absorptionAmount
private float absorptionAmount -
useItem
-
useItemRemaining
protected int useItemRemaining -
fallFlyTicks
protected int fallFlyTicks -
lastPos
-
lastClimbablePos
-
lastDamageSource
-
lastDamageStamp
private long lastDamageStamp -
autoSpinAttackTicks
protected int autoSpinAttackTicks -
autoSpinAttackDmg
protected float autoSpinAttackDmg -
autoSpinAttackItemStack
-
swimAmount
private float swimAmount -
swimAmountO
private float swimAmountO -
brain
-
skipDropExperience
private boolean skipDropExperience -
activeLocationDependentEnchantments
private final it.unimi.dsi.fastutil.objects.Reference2ObjectMap<Enchantment,Set<EnchantmentLocationBasedEffect>> activeLocationDependentEnchantments -
appliedScale
protected float appliedScale -
damageContainers
This field stores information about damage dealt to this entity. a newDamageContaineris instantiated viahurt(DamageSource, float)after invulnerability checks, and is removed from the stack before the method's return.
-
-
Constructor Details
-
LivingEntity
-
-
Method Details
-
getBrain
-
brainProvider
-
makeBrain
-
kill
public void kill() -
canAttackType
-
defineSynchedData
- Specified by:
defineSynchedDatain classEntity
-
createLivingAttributes
-
checkFallDamage
- Overrides:
checkFallDamagein classEntity
-
canBreatheUnderwater
Deprecated. -
getSwimAmount
public float getSwimAmount(float pPartialTicks) -
hasLandedInLiquid
public boolean hasLandedInLiquid() -
baseTick
public void baseTick() -
getBlockSpeedFactor
protected float getBlockSpeedFactor()- Overrides:
getBlockSpeedFactorin classEntity
-
removeFrost
protected void removeFrost() -
tryAddFrost
protected void tryAddFrost() -
onChangedBlock
-
isBaby
public boolean isBaby() -
getAgeScale
public float getAgeScale() -
getScale
public float getScale() -
sanitizeScale
protected float sanitizeScale(float pScale) -
isAffectedByFluids
protected boolean isAffectedByFluids() -
tickDeath
protected void tickDeath() -
shouldDropExperience
public boolean shouldDropExperience() -
shouldDropLoot
protected boolean shouldDropLoot() -
decreaseAirSupply
protected int decreaseAirSupply(int pCurrentAir) Decrements the entity's air supply when underwater -
increaseAirSupply
protected int increaseAirSupply(int pCurrentAir) -
getExperienceReward
-
getBaseExperienceReward
protected int getBaseExperienceReward() -
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper() -
getLastHurtByMob
-
getLastAttacker
- Specified by:
getLastAttackerin interfaceAttackable
-
getLastHurtByMobTimestamp
public int getLastHurtByMobTimestamp() -
setLastHurtByPlayer
-
setLastHurtByMob
Hint to AI tasks that we were attacked by the passed EntityLivingBase and should retaliate. Is not guaranteed to change our actual active target (for example if we are currently busy attacking someone else) -
getLastHurtMob
-
getLastHurtMobTimestamp
public int getLastHurtMobTimestamp() -
setLastHurtMob
-
getNoActionTime
public int getNoActionTime() -
setNoActionTime
public void setNoActionTime(int pIdleTime) -
shouldDiscardFriction
public boolean shouldDiscardFriction() -
setDiscardFriction
public void setDiscardFriction(boolean pDiscardFriction) -
doesEmitEquipEvent
-
onEquipItem
-
remove
-
triggerOnDeathMobEffects
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveDatain classEntity
-
readAdditionalSaveData
(abstract) Protected helper method to read subclass entity data from NBT.- Specified by:
readAdditionalSaveDatain classEntity
-
tickEffects
protected void tickEffects() -
updateInvisibilityStatus
protected void updateInvisibilityStatus() -
updateSynchronizedMobEffectParticles
private void updateSynchronizedMobEffectParticles() -
updateGlowingStatus
private void updateGlowingStatus() -
getVisibilityPercent
-
canAttack
-
canAttack
-
canBeSeenAsEnemy
public boolean canBeSeenAsEnemy() -
canBeSeenByAnyone
public boolean canBeSeenByAnyone() -
areAllEffectsAmbient
Returnstrueif all the potion effects in the specified collection are ambient. -
removeEffectParticles
protected void removeEffectParticles() -
removeAllEffects
public boolean removeAllEffects() -
getActiveEffects
-
getActiveEffectsMap
-
hasEffect
-
getEffect
-
addEffect
-
addEffect
-
canBeAffected
Deprecated.Neo: Override-Only. Call viaCommonHooks.canMobEffectBeApplied(LivingEntity, MobEffectInstance,Entity)- Parameters:
pEffectInstance- A mob effect instance- Returns:
- If the mob effect instance can be applied to this entity
-
forceAddEffect
-
isInvertedHealAndHarm
public boolean isInvertedHealAndHarm() -
removeEffectNoUpdate
-
removeEffect
-
onEffectAdded
-
sendEffectToPassengers
-
onEffectUpdated
protected void onEffectUpdated(MobEffectInstance pEffectInstance, boolean pForced, @Nullable Entity pEntity) -
onEffectRemoved
-
refreshDirtyAttributes
private void refreshDirtyAttributes() -
onAttributeUpdated
-
heal
public void heal(float pHealAmount) Heal living entity (param: amount of half-hearts) -
getHealth
public float getHealth() -
setHealth
public void setHealth(float pHealth) -
isDeadOrDying
public boolean isDeadOrDying() -
hurt
Called when the entity is attacked. -
blockUsingShield
-
blockedByShield
-
checkTotemDeathProtection
-
getLastDamageSource
-
playHurtSound
-
makeSound
-
isDamageSourceBlocked
Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking. -
breakItem
Renders broken item particles using the given ItemStack -
die
Called when the mob's health reaches 0. -
createWitherRose
-
dropAllDeathLoot
-
dropEquipment
protected void dropEquipment() -
dropExperience
-
dropCustomDeathLoot
protected void dropCustomDeathLoot(ServerLevel pLevel, DamageSource pDamageSource, boolean pRecentlyHit) -
getLootTable
-
getLootTableSeed
public long getLootTableSeed() -
getKnockback
-
dropFromLootTable
-
knockback
public void knockback(double pStrength, double pX, double pZ) -
indicateDamage
public void indicateDamage(double pXDistance, double pZDistance) -
getHurtSound
-
getDeathSound
-
getFallDamageSound
-
skipDropExperience
public void skipDropExperience() -
wasExperienceConsumed
public boolean wasExperienceConsumed() -
getHurtDir
public float getHurtDir() -
getHitbox
-
activeLocationDependentEnchantments
-
getFallSounds
-
getDrinkingSound
-
getEatingSound
-
getLastClimbablePos
-
onClimbable
public boolean onClimbable() -
trapdoorUsableAsLadder
-
isAlive
public boolean isAlive() -
getMaxFallDistance
public int getMaxFallDistance()- Overrides:
getMaxFallDistancein classEntity
-
getComfortableFallDistance
protected final int getComfortableFallDistance(float pHealth) -
causeFallDamage
- Overrides:
causeFallDamagein classEntity
-
calculateFallDamage
protected int calculateFallDamage(float pFallDistance, float pDamageMultiplier) -
playBlockFallSound
protected void playBlockFallSound() -
animateHurt
public void animateHurt(float pYaw) - Overrides:
animateHurtin classEntity
-
getArmorValue
public int getArmorValue() -
hurtArmor
-
hurtHelmet
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float pDamageAmount) -
doHurtEquipment
protected void doHurtEquipment(DamageSource pDamageSource, float pDamageAmount, EquipmentSlot... pSlots) -
getDamageAfterArmorAbsorb
Reduces damage, depending on armor -
getDamageAfterMagicAbsorb
Reduces damage, depending on potions -
actuallyHurt
Deals damage to the entity. This will take the armor of the entity into consideration before damaging the health bar. -
getCombatTracker
-
getKillCredit
-
getMaxHealth
public final float getMaxHealth() -
getMaxAbsorption
public final float getMaxAbsorption() -
getArrowCount
public final int getArrowCount() -
setArrowCount
public final void setArrowCount(int pCount) Sets the amount of arrows stuck in the entity. Used for rendering those. -
getStingerCount
public final int getStingerCount() -
setStingerCount
public final void setStingerCount(int pStingerCount) -
getCurrentSwingDuration
public int getCurrentSwingDuration() -
swing
-
swing
-
handleDamageEvent
- Overrides:
handleDamageEventin classEntity
-
handleEntityEvent
public void handleEntityEvent(byte pId) Handler forinvalid reference
World#setEntityState- Overrides:
handleEntityEventin classEntity
-
makePoofParticles
private void makePoofParticles() -
swapHandItems
private void swapHandItems() -
onBelowWorld
protected void onBelowWorld()- Overrides:
onBelowWorldin classEntity
-
updateSwingTime
protected void updateSwingTime() -
getAttribute
-
getAttributeValue
-
getAttributeBaseValue
-
getAttributes
-
getMainHandItem
-
getOffhandItem
-
getWeaponItem
- Overrides:
getWeaponItemin classEntity
-
isHolding
-
isHolding
-
getItemInHand
-
setItemInHand
-
hasItemInSlot
-
canUseSlot
-
getArmorSlots
-
getItemBySlot
-
setItemSlot
-
getHandSlots
-
getArmorAndBodyArmorSlots
-
getAllSlots
-
verifyEquippedItem
-
getArmorCoverPercentage
public float getArmorCoverPercentage() -
setSprinting
public void setSprinting(boolean pSprinting) Set sprinting switch for Entity.- Overrides:
setSprintingin classEntity
-
getSoundVolume
protected float getSoundVolume() -
getVoicePitch
public float getVoicePitch() -
isImmobile
protected boolean isImmobile() -
push
Applies a velocity to the entities, to push them away from each other. -
dismountVehicle
-
shouldShowName
public boolean shouldShowName()- Overrides:
shouldShowNamein classEntity
-
getJumpPower
protected float getJumpPower() -
getJumpPower
protected float getJumpPower(float pMultiplier) -
getJumpBoostPower
public float getJumpBoostPower() -
jumpFromGround
public void jumpFromGround() -
goDownInWater
Deprecated. -
jumpInLiquid
Deprecated. -
getWaterSlowDown
protected float getWaterSlowDown() -
canStandOnFluid
-
getDefaultGravity
protected double getDefaultGravity()- Overrides:
getDefaultGravityin classEntity
-
travel
-
travelRidden
-
tickRidden
-
getRiddenInput
-
getRiddenSpeed
-
calculateEntityAnimation
public void calculateEntityAnimation(boolean pIncludeHeight) -
updateWalkAnimation
protected void updateWalkAnimation(float pPartialTick) -
handleRelativeFrictionAndCalculateMovement
-
getFluidFallingAdjustedMovement
-
handleOnClimbable
-
getFrictionInfluencedSpeed
private float getFrictionInfluencedSpeed(float pFriction) -
getFlyingSpeed
protected float getFlyingSpeed() -
getSpeed
public float getSpeed() -
setSpeed
public void setSpeed(float pSpeed) Sets the movespeed used for the new AI system. -
doHurtTarget
-
tick
public void tick() -
detectEquipmentUpdates
private void detectEquipmentUpdates() -
collectEquipmentChanges
-
equipmentHasChanged
-
handleHandSwap
-
handleEquipmentChanges
-
getLastArmorItem
-
setLastArmorItem
-
getLastHandItem
-
setLastHandItem
-
tickHeadTurn
protected float tickHeadTurn(float pYRot, float pAnimStep) -
getMaxHeadRotationRelativeToBody
protected float getMaxHeadRotationRelativeToBody() -
aiStep
public void aiStep() -
isSensitiveToWater
public boolean isSensitiveToWater() -
updateFallFlying
private void updateFallFlying() -
serverAiStep
protected void serverAiStep() -
pushEntities
protected void pushEntities() -
checkAutoSpinAttack
-
doPush
-
doAutoAttackOnTouch
-
isAutoSpinAttack
public boolean isAutoSpinAttack() -
stopRiding
public void stopRiding()- Overrides:
stopRidingin classEntity
-
rideTick
public void rideTick() -
lerpTo
public void lerpTo(double pX, double pY, double pZ, float pYRot, float pXRot, int pSteps) -
lerpTargetX
public double lerpTargetX()- Overrides:
lerpTargetXin classEntity
-
lerpTargetY
public double lerpTargetY()- Overrides:
lerpTargetYin classEntity
-
lerpTargetZ
public double lerpTargetZ()- Overrides:
lerpTargetZin classEntity
-
lerpTargetXRot
public float lerpTargetXRot()- Overrides:
lerpTargetXRotin classEntity
-
lerpTargetYRot
public float lerpTargetYRot()- Overrides:
lerpTargetYRotin classEntity
-
lerpHeadTo
public void lerpHeadTo(float pYaw, int pPitch) - Overrides:
lerpHeadToin classEntity
-
setJumping
public void setJumping(boolean pJumping) -
onItemPickup
-
take
Called when the entity picks up an item. -
hasLineOfSight
-
getViewYRot
public float getViewYRot(float pPartialTicks) Gets the current yaw of the entity- Overrides:
getViewYRotin classEntity
-
getAttackAnim
public float getAttackAnim(float pPartialTick) Gets the progression of the swing animation, ranges from 0.0 to 1.0. -
isPickable
public boolean isPickable()- Overrides:
isPickablein classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushablein classEntity
-
getYHeadRot
public float getYHeadRot()- Overrides:
getYHeadRotin classEntity
-
setYHeadRot
public void setYHeadRot(float pRotation) Sets the head's yaw rotation of the entity.- Overrides:
setYHeadRotin classEntity
-
setYBodyRot
public void setYBodyRot(float pOffset) Set the render yaw offset- Overrides:
setYBodyRotin classEntity
-
getRelativePortalPosition
- Overrides:
getRelativePortalPositionin classEntity
-
resetForwardDirectionOfRelativePortalPosition
-
getAbsorptionAmount
public float getAbsorptionAmount() -
setAbsorptionAmount
public final void setAbsorptionAmount(float pAbsorptionAmount) -
internalSetAbsorptionAmount
protected void internalSetAbsorptionAmount(float pAbsorptionAmount) -
onEnterCombat
public void onEnterCombat() -
onLeaveCombat
public void onLeaveCombat() -
updateEffectVisibility
protected void updateEffectVisibility() -
getMainArm
-
isUsingItem
public boolean isUsingItem() -
getUsedItemHand
-
updatingUsingItem
private void updatingUsingItem() -
updateUsingItem
-
shouldTriggerItemUseEffects
private boolean shouldTriggerItemUseEffects() -
updateSwimAmount
private void updateSwimAmount() -
setLivingEntityFlag
protected void setLivingEntityFlag(int pKey, boolean pValue) -
startUsingItem
-
onSyncedDataUpdated
- Specified by:
onSyncedDataUpdatedin interfaceSyncedDataHolder- Overrides:
onSyncedDataUpdatedin classEntity
-
lookAt
-
getPreciseBodyRotation
public float getPreciseBodyRotation(float pPartialTick) - Overrides:
getPreciseBodyRotationin classEntity
-
triggerItemUseEffects
-
spawnItemParticles
-
completeUsingItem
protected void completeUsingItem() -
getUseItem
-
getUseItemRemainingTicks
public int getUseItemRemainingTicks() -
getTicksUsingItem
public int getTicksUsingItem() -
releaseUsingItem
public void releaseUsingItem() -
stopUsingItem
public void stopUsingItem() -
isBlocking
public boolean isBlocking() -
isSuppressingSlidingDownLadder
public boolean isSuppressingSlidingDownLadder() -
isFallFlying
public boolean isFallFlying() -
isVisuallySwimming
public boolean isVisuallySwimming()- Overrides:
isVisuallySwimmingin classEntity
-
getFallFlyingTicks
public int getFallFlyingTicks() -
randomTeleport
public boolean randomTeleport(double pX, double pY, double pZ, boolean pBroadcastTeleport) -
isAffectedByPotions
public boolean isAffectedByPotions() -
attackable
public boolean attackable() -
setRecordPlayingNearby
Called when a record starts or stops playing. Used to make parrots start or stop partying. -
canTakeItem
-
getDimensions
- Overrides:
getDimensionsin classEntity
-
getDefaultDimensions
-
getDismountPoses
-
getLocalBoundsForPose
-
wouldNotSuffocateAtTargetPose
-
canUsePortal
public boolean canUsePortal(boolean pAllowPassengers) - Overrides:
canUsePortalin classEntity
-
getSleepingPos
-
setSleepingPos
-
clearSleepingPos
public void clearSleepingPos() -
isSleeping
public boolean isSleeping() -
startSleeping
-
setPosToBed
Sets entity position to a supplied BlockPos plus a little offset -
checkBedExists
private boolean checkBedExists() -
stopSleeping
public void stopSleeping() -
getBedOrientation
-
isInWall
public boolean isInWall() -
getProjectile
Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available. -
eat
-
eat
-
addEatEffect
-
entityEventForEquipmentBreak
-
onEquippedItemBroken
-
getSlotForHand
-
removeEffectsCuredBy
Neo: Removes all potion effects that have the givenEffectCurein their set of cures- Parameters:
cure- the EffectCure being used
-
shouldRiderFaceForward
Neo: Returns true if the entity's rider (EntityPlayer) should face forward when mounted. currently only used in vanilla code by pigs.- Parameters:
player- The player who is riding the entity.- Returns:
- If the player should orient the same direction as this entity.
-
getBoundingBoxForCulling
- Overrides:
getBoundingBoxForCullingin classEntity
-
getEquipmentSlotForItem
-
createEquipmentSlotAccess
-
getEquipmentSlot
-
getSlot
-
canFreeze
public boolean canFreeze() -
isCurrentlyGlowing
public boolean isCurrentlyGlowing()- Overrides:
isCurrentlyGlowingin classEntity
-
getVisualRotationYInDegrees
public float getVisualRotationYInDegrees()- Overrides:
getVisualRotationYInDegreesin classEntity
-
recreateFromPacket
- Overrides:
recreateFromPacketin classEntity
-
canDisableShield
public boolean canDisableShield() -
maxUpStep
public float maxUpStep() -
getPassengerRidingPosition
- Overrides:
getPassengerRidingPositionin classEntity
-
lerpHeadRotationStep
protected void lerpHeadRotationStep(int pLerpHeadSteps, double pLerpYHeadRot) -
igniteForTicks
public void igniteForTicks(int pTicks) - Overrides:
igniteForTicksin classEntity
-
hasInfiniteMaterials
public boolean hasInfiniteMaterials() -
isInvulnerableTo
Returns whether this Entity is invulnerable to the given DamageSource.- Overrides:
isInvulnerableToin classEntity
-