类 Mob
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.Mob
- 所有已实现的接口:
SyncedDataHolder
,Attackable
,EquipmentUser
,Leashable
,Targeting
,EntityAccess
,Nameable
,ScoreHolder
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,IForgeLivingEntity
,INBTSerializable<CompoundTag>
- 直接已知子类:
AmbientCreature
,EnderDragon
,FlyingMob
,PathfinderMob
,Slime
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.entity.LivingEntity
LivingEntity.Fallsounds
从类继承的嵌套类/接口 net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.Movement, Entity.MovementEmission, Entity.RemovalReason
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
从接口继承的嵌套类/接口 net.minecraft.world.entity.Leashable
Leashable.LeashData
-
字段概要
字段修饰符和类型字段说明int
protected final float[]
private final NonNullList
<ItemStack> protected float
private ItemStack
private final BodyRotationControl
private boolean
private static final EntityDataAccessor
<Byte> private static final double
static final float
private static final List
<EquipmentSlot> final GoalSelector
protected final float[]
private final NonNullList
<ItemStack> private static final Vec3i
protected JumpControl
private Leashable.LeashData
protected LookControl
private Optional
<ResourceKey<LootTable>> private long
static final float
static final float
static final float
static final float
private static final int
private static final int
private static final int
protected MoveControl
protected PathNavigation
private boolean
protected static final int
static final int
static final float
protected static final ResourceLocation
private BlockPos
private float
private final Sensing
private boolean
private EntitySpawnReason
private LivingEntity
final GoalSelector
static final int
protected int
从类继承的字段 net.minecraft.world.entity.LivingEntity
animStep, animStepO, appliedScale, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, ATTRIBUTES_FIELD, autoSpinAttackDmg, autoSpinAttackItemStack, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, elytraAnimationState, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, HAND_SLOTS, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYHeadRot, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, oRun, PLAYER_HURT_EXPERIENCE_TIME, PLAYER_NOT_WEARING_DISGUISE_ITEM, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
从类继承的字段 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, noPhysics, PASSENGERS_TAG, portalProcess, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
从接口继承的字段 net.minecraft.world.entity.Leashable
LEASH_ELASTIC_DIST, LEASH_TAG, LEASH_TOO_FAR_DIST
从接口继承的字段 net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addAdditionalSaveData
(CompoundTag p_21484_) void
aiStep()
void
ate()
void
baseTick()
boolean
canAttackType
(EntityType<?> p_21399_) boolean
protected boolean
canDispenserEquipIntoSlot
(EquipmentSlot p_367943_) boolean
canFireProjectileWeapon
(ProjectileWeaponItem p_21430_) boolean
canHoldItem
(ItemStack p_21545_) boolean
protected boolean
canReplaceCurrentItem
(ItemStack p_21428_, ItemStack p_21429_, EquipmentSlot p_362798_) boolean
canReplaceEqualItem
(ItemStack p_21478_, ItemStack p_21479_) boolean
canUseSlot
(EquipmentSlot p_334488_) private InteractionResult
checkAndHandleImportantInteractions
(Player p_21500_, InteractionHand p_21501_) void
static boolean
checkMobSpawnRules
(EntityType<? extends Mob> p_217058_, LevelAccessor p_217059_, EntitySpawnReason p_362165_, BlockPos p_217061_, RandomSource p_217062_) boolean
checkSpawnObstruction
(LevelReader p_21433_) boolean
checkSpawnRules
(LevelAccessor p_21431_, EntitySpawnReason p_366364_) protected void
void
private boolean
compareArmor
(ItemStack p_377405_, ItemStack p_378380_, EquipmentSlot p_376197_) private boolean
compareWeapons
(ItemStack p_376507_, ItemStack p_378437_, EquipmentSlot p_378407_) <T extends Mob>
TconvertTo
(EntityType<T> p_364522_, ConversionParams p_368972_, ConversionParams.AfterConversion<T> p_362927_) <T extends Mob>
TconvertTo
(EntityType<T> p_21407_, ConversionParams p_365288_, EntitySpawnReason p_367052_, ConversionParams.AfterConversion<T> p_368263_) protected BodyRotationControl
private LootParams
createEquipmentParams
(ServerLevel p_331909_) static AttributeSupplier.Builder
protected PathNavigation
createNavigation
(Level p_21480_) protected void
customServerAiStep
(ServerLevel p_361697_) protected void
defineSynchedData
(SynchedEntityData.Builder p_335882_) boolean
doHurtTarget
(ServerLevel p_365421_, Entity p_21372_) protected void
dropCustomDeathLoot
(ServerLevel p_345102_, DamageSource p_21385_, boolean p_21387_) protected void
dropFromLootTable
(ServerLevel p_367479_, DamageSource p_21389_, boolean p_21390_) void
dropPreservedEquipment
(ServerLevel p_364926_) dropPreservedEquipment
(ServerLevel p_367808_, Predicate<ItemStack> p_361335_) protected void
enchantSpawnedArmor
(ServerLevelAccessor p_342770_, RandomSource p_217052_, EquipmentSlot p_217054_, DifficultyInstance p_342649_) private void
enchantSpawnedEquipment
(ServerLevelAccessor p_342440_, EquipmentSlot p_344135_, RandomSource p_344290_, float p_343248_, DifficultyInstance p_345046_) protected void
enchantSpawnedWeapon
(ServerLevelAccessor p_344989_, RandomSource p_217049_, DifficultyInstance p_344491_) void
equip
(ResourceKey<LootTable> p_328521_, Map<EquipmentSlot, Float> p_335710_) void
equip
(EquipmentTable p_332456_) equipItemIfPossible
(ServerLevel p_362503_, ItemStack p_255842_) finalizeSpawn
(ServerLevelAccessor p_21434_, DifficultyInstance p_21435_, EntitySpawnReason p_369316_, SpawnGroupData p_21437_) 已过时。protected SoundEvent
int
private double
getApproximateAttributeWith
(ItemStack p_363720_, Holder<Attribute> p_366827_, EquipmentSlot p_366430_) float[]
protected AABB
protected int
getBaseExperienceReward
(ServerLevel p_369877_) protected float
getEquipmentDropChance
(EquipmentSlot p_21520_) static Item
getEquipmentForSlot
(EquipmentSlot p_21413_, int p_21414_) float[]
int
getItemBySlot
(EquipmentSlot p_21467_) final Optional
<ResourceKey<LootTable>> long
int
int
int
int
float
getPathfindingMalus
(PathType p_334857_) protected Vec3i
float
final EntitySpawnReason
Returns the type of spawn that created this mob, if applicable.protected final LivingEntity
void
handleEntityEvent
(byte p_21375_) boolean
final InteractionResult
interact
(Player p_21420_, InteractionHand p_21421_) boolean
boolean
boolean
boolean
isMaxGroupSizeReached
(int p_21489_) boolean
isNoAi()
boolean
final boolean
This method exists so that spawns can be cancelled from theFinalizeSpawnEvent
without needing to hook up an additional handler for theEntityJoinLevelEvent
.protected boolean
boolean
boolean
isWithinMeleeAttackRange
(LivingEntity p_217067_) boolean
boolean
isWithinRestriction
(BlockPos p_21445_) void
jumpInFluid
(FluidType type) Performs what to do when an entity attempts to go up or "jump" in a fluid.protected void
jumpInLiquid
(TagKey<Fluid> p_204045_) 已过时。private void
jumpInLiquidInternal
(Runnable onSuper) void
void
protected InteractionResult
mobInteract
(Player p_21472_, InteractionHand p_21473_) protected void
onAttributeUpdated
(Holder<Attribute> p_365996_) void
protected void
onOffspringSpawnedFromEgg
(Player p_21422_, Mob p_21423_) void
void
protected void
pickUpItem
(ServerLevel p_363972_, ItemEntity p_21471_) void
protected void
protected void
playHurtSound
(DamageSource p_21493_) protected void
populateDefaultEquipmentEnchantments
(ServerLevelAccessor p_344674_, RandomSource p_217063_, DifficultyInstance p_217064_) protected void
populateDefaultEquipmentSlots
(RandomSource p_217055_, DifficultyInstance p_217056_) void
readAdditionalSaveData
(CompoundTag p_21450_) protected void
protected void
void
removeAllGoals
(Predicate<Goal> p_262667_) void
boolean
removeWhenFarAway
(double p_21542_) boolean
private void
void
restrictTo
(BlockPos p_21447_, int p_21448_) private float
rotlerp
(float p_21377_, float p_21378_, float p_21379_) protected void
protected final void
void
setAggressive
(boolean p_21562_) void
setBaby
(boolean p_21451_) void
setBodyArmorItem
(ItemStack p_333947_) void
setCanPickUpLoot
(boolean p_21554_) void
setDropChance
(EquipmentSlot p_21410_, float p_21411_) void
setGuaranteedDrop
(EquipmentSlot p_21509_) void
setItemSlot
(EquipmentSlot p_21416_, ItemStack p_21417_) protected void
setItemSlotAndDropWhenKilled
(EquipmentSlot p_21469_, ItemStack p_21470_) void
setLeashData
(Leashable.LeashData p_344337_) void
setLeftHanded
(boolean p_21560_) void
setNoAi
(boolean p_21558_) void
setPathfindingMalus
(PathType p_332507_, float p_21443_) void
final void
setSpawnCancelled
(boolean cancel) Marks this mob as being disallowed to spawn duringLevelWriter.addFreshEntity(Entity)
.void
setSpeed
(float p_21556_) void
setTarget
(LivingEntity p_21544_) void
setXxa
(float p_21571_) void
setYya
(float p_21568_) void
setZza
(float p_21565_) protected boolean
protected boolean
void
boolean
startRiding
(Entity p_21396_, boolean p_21397_) void
void
tick()
protected float
tickHeadTurn
(float p_21538_, float p_21539_) protected void
boolean
wantsToPickUp
(ServerLevel p_367521_, ItemStack p_21546_) 从类继承的方法 net.minecraft.world.entity.LivingEntity
activeLocationDependentEnchantments, actuallyHurt, addEffect, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, brainProvider, calculateEntityAnimation, calculateFallDamage, canAttack, canBeAffected, canBeNameTagged, canBeSeenAsEnemy, canBeSeenByAnyone, canBreatheUnderwater, cancelLerp, canDisableShield, canEquipWithDispenser, canFreeze, canGlide, canGlideUsing, canStandOnFluid, canUsePortal, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, decreaseAirSupply, die, doAutoAttackOnTouch, doesEmitEquipEvent, doHurtEquipment, doPush, dropAllDeathLoot, dropEquipment, dropExperience, dropFromGiftLootTable, dropFromLootTable, dropFromShearingLootTable, equipmentHasChanged, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getAgeScale, getAllSlots, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBrain, getCapability, getCombatTracker, getComfortableFallDistance, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDeathSound, getDefaultDimensions, getDefaultGravity, getDimensions, getDismountPoses, getEffect, getEffectiveGravity, getEquipmentSlotForItem, getExperienceReward, getFallFlyingTicks, getFallSounds, getFluidFallingAdjustedMovement, getFlyingSpeed, getHealth, getHitbox, getHurtDir, getHurtSound, getItemBlockingWith, getItemHeldByArm, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getKnockback, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtByPlayerTime, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxAbsorption, getMaxHeadRotationRelativeToBody, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getPreciseBodyRotation, getProjectile, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSlot, getSlotForHand, getSoundVolume, getSpeed, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getWeaponItem, getYHeadRot, goDownInWater, handleDamageEvent, handleExtraItemsCreatedOnUse, hasEffect, hasInfiniteMaterials, hasItemInSlot, hasLandedInLiquid, hasLineOfSight, hasLineOfSight, heal, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, hurtServer, igniteForTicks, increaseAirSupply, indicateDamage, internalSetAbsorptionAmount, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isEquippableInSlot, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInvulnerableTo, isInWall, isLookingAtMe, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, makeBrain, makePoofParticles, makeSound, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectsRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onEquippedItemBroken, onItemPickup, onLeaveCombat, onSyncedDataUpdated, playBlockFallSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, remove, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, resetForwardDirectionOfRelativePortalPosition, resolveMobResponsibleForDamage, resolvePlayerResponsibleForDamage, reviveCaps, rideTick, sanitizeScale, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, shouldShowName, skipDropExperience, spawnItemParticles, startSleeping, startUsingItem, stopRiding, stopSleeping, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickRidden, travel, triggerOnDeathMobEffects, tryAddFrost, updateEffectVisibility, updateFallFlying, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPose
从类继承的方法 net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, absRotateTo, addDeltaMovement, addPassenger, addTag, adjustSpawnLocation, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canSprint, canTeleport, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, checkBelowWorld, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, forceSetRotation, fudgePositionAfterSizeChange, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, 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, getInputVector, getKnownMovement, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPersistentData, getPickRadius, 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, getXRot, getY, getY, getYRot, getYRot, getZ, getZ, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, ignoreExplosion, interactAt, is, isAddedToWorld, isAffectedByBlocks, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByClient, isControlledByLocalInstance, isControlledByOrIsLocalPlayer, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterOrSwimmable, 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, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, oldPosition, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onPassengerTurned, onRemoval, onRemovedFromWorld, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, recordMovementThroughBlocks, refreshDimensions, registryAccess, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, setAirSupply, setAsInsidePortal, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleport, teleportRelative, teleportSetPosition, teleportTo, teleportTo, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateInWaterStateAndDoWaterCurrentPushing, updateSwimming, waterSwimSound
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
从接口继承的方法 net.minecraft.world.entity.EquipmentUser
equip, equip, equip, resolveSlot
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
从接口继承的方法 net.minecraftforge.common.extensions.IForgeLivingEntity
canDrownInFluidType, canSwimInFluidType, moveInFluid, self, sinkInFluid
从接口继承的方法 net.minecraft.world.entity.Leashable
canHaveALeashAttachedToIt, closeRangeLeashBehaviour, dropLeash, elasticRangeLeashBehaviour, getLeashHolder, handleLeashAtDistance, isLeashed, mayBeLeashed, readLeashData, removeLeash, setDelayedLeashHolderId, setLeashedTo, writeLeashData
从接口继承的方法 net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
字段详细资料
-
DATA_MOB_FLAGS_ID
-
MOB_FLAG_NO_AI
private static final int MOB_FLAG_NO_AI- 另请参阅:
-
MOB_FLAG_LEFTHANDED
private static final int MOB_FLAG_LEFTHANDED- 另请参阅:
-
MOB_FLAG_AGGRESSIVE
private static final int MOB_FLAG_AGGRESSIVE- 另请参阅:
-
PICKUP_REACH
protected static final int PICKUP_REACH- 另请参阅:
-
ITEM_PICKUP_REACH
-
EQUIPMENT_POPULATION_ORDER
-
MAX_WEARING_ARMOR_CHANCE
public static final float MAX_WEARING_ARMOR_CHANCE- 另请参阅:
-
MAX_PICKUP_LOOT_CHANCE
public static final float MAX_PICKUP_LOOT_CHANCE- 另请参阅:
-
MAX_ENCHANTED_ARMOR_CHANCE
public static final float MAX_ENCHANTED_ARMOR_CHANCE- 另请参阅:
-
MAX_ENCHANTED_WEAPON_CHANCE
public static final float MAX_ENCHANTED_WEAPON_CHANCE- 另请参阅:
-
DEFAULT_EQUIPMENT_DROP_CHANCE
public static final float DEFAULT_EQUIPMENT_DROP_CHANCE- 另请参阅:
-
PRESERVE_ITEM_DROP_CHANCE_THRESHOLD
public static final float PRESERVE_ITEM_DROP_CHANCE_THRESHOLD- 另请参阅:
-
PRESERVE_ITEM_DROP_CHANCE
public static final int PRESERVE_ITEM_DROP_CHANCE- 另请参阅:
-
UPDATE_GOAL_SELECTOR_EVERY_N_TICKS
public static final int UPDATE_GOAL_SELECTOR_EVERY_N_TICKS- 另请参阅:
-
DEFAULT_ATTACK_REACH
private static final double DEFAULT_ATTACK_REACH -
RANDOM_SPAWN_BONUS_ID
-
ambientSoundTime
public int ambientSoundTime -
xpReward
protected int xpReward -
lookControl
-
moveControl
-
jumpControl
-
bodyRotationControl
-
goalSelector
-
targetSelector
-
target
-
sensing
-
handItems
-
handDropChances
protected final float[] handDropChances -
armorItems
-
armorDropChances
protected final float[] armorDropChances -
bodyArmorItem
-
bodyArmorDropChance
protected float bodyArmorDropChance -
canPickUpLoot
private boolean canPickUpLoot -
persistenceRequired
private boolean persistenceRequired -
pathfindingMalus
-
lootTable
-
lootTableSeed
private long lootTableSeed -
leashData
-
restrictCenter
-
restrictRadius
private float restrictRadius -
spawnReason
-
spawnCancelled
private boolean spawnCancelled
-
-
构造器详细资料
-
Mob
-
-
方法详细资料
-
registerGoals
protected void registerGoals() -
createMobAttributes
-
shouldPassengersInheritMalus
protected boolean shouldPassengersInheritMalus() -
getPathfindingMalus
-
setPathfindingMalus
-
onPathfindingStart
public void onPathfindingStart() -
onPathfindingDone
public void onPathfindingDone() -
createBodyControl
-
getLookControl
-
getMoveControl
-
getJumpControl
-
getControllingPassenger
- 覆盖:
getControllingPassenger
在类中Entity
-
getSensing
-
getTarget
-
getTargetFromBrain
-
setTarget
-
canAttackType
- 覆盖:
canAttackType
在类中LivingEntity
-
canFireProjectileWeapon
-
ate
public void ate() -
defineSynchedData
- 覆盖:
defineSynchedData
在类中LivingEntity
-
getAmbientSoundInterval
public int getAmbientSoundInterval() -
playAmbientSound
public void playAmbientSound() -
baseTick
public void baseTick()- 覆盖:
baseTick
在类中LivingEntity
-
playHurtSound
- 覆盖:
playHurtSound
在类中LivingEntity
-
resetAmbientSoundTime
private void resetAmbientSoundTime() -
getBaseExperienceReward
- 覆盖:
getBaseExperienceReward
在类中LivingEntity
-
spawnAnim
public void spawnAnim() -
handleEntityEvent
public void handleEntityEvent(byte p_21375_) - 覆盖:
handleEntityEvent
在类中LivingEntity
-
tick
public void tick()- 覆盖:
tick
在类中LivingEntity
-
updateControlFlags
protected void updateControlFlags() -
tickHeadTurn
protected float tickHeadTurn(float p_21538_, float p_21539_) - 覆盖:
tickHeadTurn
在类中LivingEntity
-
getAmbientSound
-
addAdditionalSaveData
- 覆盖:
addAdditionalSaveData
在类中LivingEntity
-
readAdditionalSaveData
- 覆盖:
readAdditionalSaveData
在类中LivingEntity
-
dropFromLootTable
- 覆盖:
dropFromLootTable
在类中LivingEntity
-
getLootTable
- 覆盖:
getLootTable
在类中Entity
-
getLootTableSeed
public long getLootTableSeed()- 覆盖:
getLootTableSeed
在类中LivingEntity
-
setZza
public void setZza(float p_21565_) -
setYya
public void setYya(float p_21568_) -
setXxa
public void setXxa(float p_21571_) -
setSpeed
public void setSpeed(float p_21556_) - 覆盖:
setSpeed
在类中LivingEntity
-
stopInPlace
public void stopInPlace() -
aiStep
public void aiStep()- 覆盖:
aiStep
在类中LivingEntity
-
getPickupReach
-
pickUpItem
-
equipItemIfPossible
-
setItemSlotAndDropWhenKilled
-
setGuaranteedDrop
-
canReplaceCurrentItem
protected boolean canReplaceCurrentItem(ItemStack p_21428_, ItemStack p_21429_, EquipmentSlot p_362798_) -
compareArmor
-
compareWeapons
-
getApproximateAttributeWith
private double getApproximateAttributeWith(ItemStack p_363720_, Holder<Attribute> p_366827_, EquipmentSlot p_366430_) -
canReplaceEqualItem
-
canHoldItem
-
wantsToPickUp
-
getPreferredWeaponType
-
removeWhenFarAway
public boolean removeWhenFarAway(double p_21542_) -
requiresCustomPersistence
public boolean requiresCustomPersistence() -
shouldDespawnInPeaceful
protected boolean shouldDespawnInPeaceful() -
checkDespawn
public void checkDespawn()- 覆盖:
checkDespawn
在类中Entity
-
serverAiStep
protected final void serverAiStep()- 覆盖:
serverAiStep
在类中LivingEntity
-
sendDebugPackets
protected void sendDebugPackets() -
customServerAiStep
-
getMaxHeadXRot
public int getMaxHeadXRot() -
getMaxHeadYRot
public int getMaxHeadYRot() -
clampHeadRotationToBody
protected void clampHeadRotationToBody() -
getHeadRotSpeed
public int getHeadRotSpeed() -
lookAt
-
rotlerp
private float rotlerp(float p_21377_, float p_21378_, float p_21379_) -
checkMobSpawnRules
public static boolean checkMobSpawnRules(EntityType<? extends Mob> p_217058_, LevelAccessor p_217059_, EntitySpawnReason p_362165_, BlockPos p_217061_, RandomSource p_217062_) -
checkSpawnRules
-
checkSpawnObstruction
-
getMaxSpawnClusterSize
public int getMaxSpawnClusterSize() -
isMaxGroupSizeReached
public boolean isMaxGroupSizeReached(int p_21489_) -
getMaxFallDistance
public int getMaxFallDistance()- 覆盖:
getMaxFallDistance
在类中LivingEntity
-
getHandSlots
- 覆盖:
getHandSlots
在类中LivingEntity
-
getArmorSlots
- 指定者:
getArmorSlots
在类中LivingEntity
-
getBodyArmorItem
-
canUseSlot
- 覆盖:
canUseSlot
在类中LivingEntity
-
isWearingBodyArmor
public boolean isWearingBodyArmor() -
setBodyArmorItem
-
getArmorAndBodyArmorSlots
-
getItemBySlot
- 指定者:
getItemBySlot
在接口中EquipmentUser
- 指定者:
getItemBySlot
在类中LivingEntity
-
setItemSlot
- 指定者:
setItemSlot
在接口中EquipmentUser
- 指定者:
setItemSlot
在类中LivingEntity
-
dropCustomDeathLoot
- 覆盖:
dropCustomDeathLoot
在类中LivingEntity
-
getEquipmentDropChance
-
dropPreservedEquipment
-
dropPreservedEquipment
public Set<EquipmentSlot> dropPreservedEquipment(ServerLevel p_367808_, Predicate<ItemStack> p_361335_) -
createEquipmentParams
-
equip
-
equip
-
populateDefaultEquipmentSlots
-
getEquipmentForSlot
-
populateDefaultEquipmentEnchantments
protected void populateDefaultEquipmentEnchantments(ServerLevelAccessor p_344674_, RandomSource p_217063_, DifficultyInstance p_217064_) -
enchantSpawnedWeapon
protected void enchantSpawnedWeapon(ServerLevelAccessor p_344989_, RandomSource p_217049_, DifficultyInstance p_344491_) -
enchantSpawnedArmor
protected void enchantSpawnedArmor(ServerLevelAccessor p_342770_, RandomSource p_217052_, EquipmentSlot p_217054_, DifficultyInstance p_342649_) -
enchantSpawnedEquipment
private void enchantSpawnedEquipment(ServerLevelAccessor p_342440_, EquipmentSlot p_344135_, RandomSource p_344290_, float p_343248_, DifficultyInstance p_345046_) -
finalizeSpawn
@Deprecated @OverrideOnly @Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_21434_, DifficultyInstance p_21435_, EntitySpawnReason p_369316_, @Nullable SpawnGroupData p_21437_) 已过时。Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
Overrides are allowed. Do not wrap super calls within override (as that will cause stack overflows).
Vanilla calls are replaced with a transformer, and are not visible in source.
Be certain to either call super.finalizeSpawn or set the
spawnReason
field from within your override. -
setPersistenceRequired
public void setPersistenceRequired() -
setDropChance
- 指定者:
setDropChance
在接口中EquipmentUser
-
canPickUpLoot
public boolean canPickUpLoot()- 覆盖:
canPickUpLoot
在类中LivingEntity
-
setCanPickUpLoot
public void setCanPickUpLoot(boolean p_21554_) -
canDispenserEquipIntoSlot
-
isPersistenceRequired
public boolean isPersistenceRequired() -
interact
-
checkAndHandleImportantInteractions
private InteractionResult checkAndHandleImportantInteractions(Player p_21500_, InteractionHand p_21501_) -
onOffspringSpawnedFromEgg
-
mobInteract
-
isWithinRestriction
public boolean isWithinRestriction() -
isWithinRestriction
-
restrictTo
-
getRestrictCenter
-
getRestrictRadius
public float getRestrictRadius() -
clearRestriction
public void clearRestriction() -
hasRestriction
public boolean hasRestriction() -
convertTo
@Nullable public <T extends Mob> T convertTo(EntityType<T> p_21407_, ConversionParams p_365288_, EntitySpawnReason p_367052_, ConversionParams.AfterConversion<T> p_368263_) -
convertTo
@Nullable public <T extends Mob> T convertTo(EntityType<T> p_364522_, ConversionParams p_368972_, ConversionParams.AfterConversion<T> p_362927_) -
getLeashData
- 指定者:
getLeashData
在接口中Leashable
-
setLeashData
- 指定者:
setLeashData
在接口中Leashable
-
onLeashRemoved
public void onLeashRemoved()- 指定者:
onLeashRemoved
在接口中Leashable
-
leashTooFarBehaviour
public void leashTooFarBehaviour()- 指定者:
leashTooFarBehaviour
在接口中Leashable
-
canBeLeashed
public boolean canBeLeashed()- 指定者:
canBeLeashed
在接口中Leashable
-
startRiding
- 覆盖:
startRiding
在类中Entity
-
isEffectiveAi
public boolean isEffectiveAi()- 覆盖:
isEffectiveAi
在类中Entity
-
setNoAi
public void setNoAi(boolean p_21558_) -
setLeftHanded
public void setLeftHanded(boolean p_21560_) -
setAggressive
public void setAggressive(boolean p_21562_) -
isNoAi
public boolean isNoAi() -
isLeftHanded
public boolean isLeftHanded() -
isAggressive
public boolean isAggressive() -
setBaby
public void setBaby(boolean p_21451_) -
getMainArm
- 指定者:
getMainArm
在类中LivingEntity
-
isWithinMeleeAttackRange
-
getAttackBoundingBox
-
doHurtTarget
- 覆盖:
doHurtTarget
在类中LivingEntity
-
playAttackSound
protected void playAttackSound() -
isSunBurnTick
protected boolean isSunBurnTick() -
jumpInLiquid
已过时。- 覆盖:
jumpInLiquid
在类中LivingEntity
-
jumpInLiquidInternal
-
jumpInFluid
从接口复制的说明:IForgeLivingEntity
Performs what to do when an entity attempts to go up or "jump" in a fluid.- 指定者:
jumpInFluid
在接口中IForgeLivingEntity
- 参数:
type
- the type of the fluid
-
removeFreeWill
public void removeFreeWill() -
removeAllGoals
-
removeAfterChangingDimensions
protected void removeAfterChangingDimensions()- 覆盖:
removeAfterChangingDimensions
在类中Entity
-
getPickResult
- 覆盖:
getPickResult
在类中Entity
-
getSpawnReason
Returns the type of spawn that created this mob, if applicable. If it could not be determined, this will return null.This is set via
finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.EntitySpawnReason, net.minecraft.world.entity.SpawnGroupData)
, so you should not call this from within that method, instead using the parameter. -
isSpawnCancelled
@Internal public final boolean isSpawnCancelled()This method exists so that spawns can be cancelled from theFinalizeSpawnEvent
without needing to hook up an additional handler for theEntityJoinLevelEvent
.- 返回:
- if this mob will be blocked from spawning during
LevelWriter.addFreshEntity(Entity)
- API Note:
- Not public-facing API.
-
setSpawnCancelled
@Internal public final void setSpawnCancelled(boolean cancel) Marks this mob as being disallowed to spawn duringLevelWriter.addFreshEntity(Entity)
.- 抛出:
UnsupportedOperationException
- if this entity has already beenadded to the world
.- API Note:
- Not public-facing API.
-
onAttributeUpdated
- 覆盖:
onAttributeUpdated
在类中LivingEntity
-
getHandDropChances
public float[] getHandDropChances() -
getArmorDropChances
public float[] getArmorDropChances()
-