public abstract class MobEntity extends LivingEntity
Entity.IMoveCallback
Modifier and Type | Field and Description |
---|---|
private static DataParameter<java.lang.Byte> |
AI_FLAGS |
private LivingEntity |
attackTarget |
private BodyController |
bodyController |
private boolean |
canPickUpLoot |
private ResourceLocation |
deathLootTable |
private long |
deathLootTableSeed |
protected int |
experienceValue |
GoalSelector |
goalSelector |
private BlockPos |
homePosition |
private NonNullList<ItemStack> |
inventoryArmor |
protected float[] |
inventoryArmorDropChances |
private NonNullList<ItemStack> |
inventoryHands |
protected float[] |
inventoryHandsDropChances |
protected JumpController |
jumpController |
private Entity |
leashHolder |
private int |
leashHolderID |
private CompoundNBT |
leashNBTTag |
int |
livingSoundTime |
protected LookController |
lookController |
private java.util.Map<PathNodeType,java.lang.Float> |
mapPathPriority |
private float |
maximumHomeDistance |
protected MovementController |
moveController |
protected PathNavigator |
navigator |
private boolean |
persistenceRequired |
private EntitySenses |
senses |
GoalSelector |
targetSelector |
activeItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, beeStingRemovalCooldown, brain, dead, deathTime, ENTITY_GRAVITY, hurtTime, idleTime, interpTargetHeadYaw, interpTargetPitch, interpTargetX, interpTargetY, interpTargetYaw, interpTargetZ, interpTicksHead, isJumping, isSwingInProgress, jumpMovementFactor, lastDamage, limbSwing, limbSwingAmount, LIVING_FLAGS, maxHurtResistantTime, maxHurtTime, movedDistance, moveForward, moveStrafing, moveVertical, NAMETAG_DISTANCE, newPosRotationIncrements, onGroundSpeedFactor, prevLimbSwingAmount, prevMovedDistance, prevOnGroundSpeedFactor, prevRenderYawOffset, prevRotationYawHead, prevSwingProgress, randomUnused1, randomUnused2, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SLEEPING_SIZE, spinAttackDuration, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
MobEntity(EntityType<? extends MobEntity> type,
World worldIn) |
addPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityFrom, attemptTeleport, blockUsingShield, calculateFallDamage, canAttack, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, constructKnockBackVector, createBrain, createSpawnPacket, createWitherRose, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, determineNextAir, dropExperience, dropInventory, findAmmo, frostWalk, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArmorCoverPercentage, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributes, getBedDirection, getBedPosition, getBeeStingCount, getBlockState, getBrain, getCapability, getCombatTracker, getCreatureAttribute, getDeathSound, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getHurtSound, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getMaxHealth, getRenderScale, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSize, getSoundPitch, getSoundVolume, getStandingEyeHeight, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getVisibilityMultiplier, getWaterSlowDown, getYaw, handleFluidSneak, hasItemInSlot, heal, isActiveItemStackBlocking, isActualySwimming, isAlive, isChild, isElytraFlying, isEntityInsideOpaqueBlock, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPotionActive, isPotionApplicable, isSleeping, isSpinAttacking, isSuppressingSlidingDownLadder, jump, knockBack, lookAt, markPotionsDirty, markVelocityChanged, notifyDataManagerChange, onChangedPotionEffect, onDeath, onDeathUpdate, onFinishedPotionEffect, onFoodEaten, onItemPickup, onItemUseFinish, onKillCommand, onLivingFall, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, playFallSound, remove, removeActivePotionEffect, removePotionEffect, resetActiveHand, resetPotionEffectMetadata, sendBreakAnimation, sendBreakAnimation, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBedPosition, setBeeStingCount, setHeadRotation, setHealth, setHeldItem, setIdleTime, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRevengeTarget, setRotationYawHead, setSprinting, shouldRiderFaceForward, spawnDrops, spinAttack, startSleeping, startSpinAttack, stopActiveHand, stopRiding, swing, swingArm, travel, triggerItemUseEffects, updateArmSwingProgress, updateFallState, updatePotionEffects, updatePotionMetadata, updateRidden, updateSpinAttack, wakeUp
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, calculateUpVector, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getProfessionName, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getSelfAndPassengers, getServer, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYOffset, handleFluidAcceleration, handlePistonMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, makeFlySound, maybeBackOffFromEdge, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, onStruckByLightning, pick, playFlySound, playSound, playStepSound, playSwimSound, positionRider, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, repositionDirectPassengers, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, teleportKeepLoaded, toString, updatePassenger, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability
private static final DataParameter<java.lang.Byte> AI_FLAGS
public int livingSoundTime
protected int experienceValue
protected LookController lookController
protected MovementController moveController
protected JumpController jumpController
private final BodyController bodyController
protected PathNavigator navigator
public final GoalSelector goalSelector
public final GoalSelector targetSelector
private LivingEntity attackTarget
private final EntitySenses senses
private final NonNullList<ItemStack> inventoryHands
protected final float[] inventoryHandsDropChances
private final NonNullList<ItemStack> inventoryArmor
protected final float[] inventoryArmorDropChances
private boolean canPickUpLoot
private boolean persistenceRequired
private final java.util.Map<PathNodeType,java.lang.Float> mapPathPriority
private ResourceLocation deathLootTable
private long deathLootTableSeed
@Nullable private Entity leashHolder
private int leashHolderID
@Nullable private CompoundNBT leashNBTTag
private BlockPos homePosition
private float maximumHomeDistance
protected MobEntity(EntityType<? extends MobEntity> type, World worldIn)
protected void registerGoals()
protected void registerAttributes()
registerAttributes
in class LivingEntity
protected PathNavigator createNavigator(World worldIn)
public float getPathPriority(PathNodeType nodeType)
public void setPathPriority(PathNodeType nodeType, float priority)
protected BodyController createBodyController()
public LookController getLookController()
public MovementController getMoveHelper()
public JumpController getJumpController()
public PathNavigator getNavigator()
public EntitySenses getEntitySenses()
@Nullable public LivingEntity getAttackTarget()
public void setAttackTarget(@Nullable LivingEntity entitylivingbaseIn)
public boolean canAttack(EntityType<?> typeIn)
canAttack
in class LivingEntity
public void eatGrassBonus()
protected void registerData()
registerData
in class LivingEntity
public int getTalkInterval()
public void playAmbientSound()
public void baseTick()
baseTick
in class LivingEntity
protected void playHurtSound(DamageSource source)
playHurtSound
in class LivingEntity
private void applyEntityAI()
protected int getExperiencePoints(PlayerEntity player)
getExperiencePoints
in class LivingEntity
public void spawnExplosionParticle()
public void handleStatusUpdate(byte id)
handleStatusUpdate
in class LivingEntity
public void tick()
tick
in class LivingEntity
protected void updateMovementGoalFlags()
protected float updateDistance(float p_110146_1_, float p_110146_2_)
updateDistance
in class LivingEntity
@Nullable protected SoundEvent getAmbientSound()
public void writeAdditional(CompoundNBT compound)
writeAdditional
in class LivingEntity
public void readAdditional(CompoundNBT compound)
readAdditional
in class LivingEntity
protected void dropLoot(DamageSource damageSourceIn, boolean p_213354_2_)
dropLoot
in class LivingEntity
protected LootContext.Builder getLootContextBuilder(boolean p_213363_1_, DamageSource damageSourceIn)
getLootContextBuilder
in class LivingEntity
public final ResourceLocation getLootTableResourceLocation()
getLootTableResourceLocation
in class LivingEntity
protected ResourceLocation getLootTable()
public void setMoveForward(float amount)
public void setMoveVertical(float amount)
public void setMoveStrafing(float amount)
public void setAIMoveSpeed(float speedIn)
setAIMoveSpeed
in class LivingEntity
public void livingTick()
livingTick
in class LivingEntity
protected void updateEquipmentIfNeeded(ItemEntity itemEntity)
protected boolean shouldExchangeEquipment(ItemStack candidate, ItemStack existing, EquipmentSlotType slotTypeIn)
protected boolean canEquipItem(ItemStack stack)
public boolean canDespawn(double distanceToClosestPlayer)
public boolean preventDespawn()
protected boolean isDespawnPeaceful()
public void checkDespawn()
checkDespawn
in class Entity
protected final void updateEntityActionState()
updateEntityActionState
in class LivingEntity
protected void sendDebugPackets()
protected void updateAITasks()
public int getVerticalFaceSpeed()
public int getHorizontalFaceSpeed()
public int getFaceRotSpeed()
public void faceEntity(Entity entityIn, float maxYawIncrease, float maxPitchIncrease)
private float updateRotation(float angle, float targetAngle, float maxIncrease)
public static boolean canSpawnOn(EntityType<? extends MobEntity> typeIn, IWorld worldIn, SpawnReason reason, BlockPos pos, java.util.Random randomIn)
public boolean canSpawn(IWorld worldIn, SpawnReason spawnReasonIn)
public boolean isNotColliding(IWorldReader worldIn)
public int getMaxSpawnedInChunk()
public boolean isMaxGroupSize(int sizeIn)
public int getMaxFallHeight()
getMaxFallHeight
in class Entity
public java.lang.Iterable<ItemStack> getHeldEquipment()
getHeldEquipment
in class Entity
public java.lang.Iterable<ItemStack> getArmorInventoryList()
getArmorInventoryList
in class LivingEntity
public ItemStack getItemStackFromSlot(EquipmentSlotType slotIn)
getItemStackFromSlot
in class LivingEntity
public void setItemStackToSlot(EquipmentSlotType slotIn, ItemStack stack)
setItemStackToSlot
in class LivingEntity
protected void dropSpecialItems(DamageSource source, int looting, boolean recentlyHitIn)
dropSpecialItems
in class LivingEntity
protected float getDropChance(EquipmentSlotType slotIn)
protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty)
public static EquipmentSlotType getSlotForItemStack(ItemStack stack)
@Nullable public static Item getArmorByChance(EquipmentSlotType slotIn, int chance)
protected void setEnchantmentBasedOnDifficulty(DifficultyInstance difficulty)
@Nullable public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficultyIn, SpawnReason reason, @Nullable ILivingEntityData spawnDataIn, @Nullable CompoundNBT dataTag)
public boolean canBeSteered()
public void enablePersistence()
public void setDropChance(EquipmentSlotType slotIn, float chance)
public boolean canPickUpLoot()
public void setCanPickUpLoot(boolean canPickup)
public boolean canPickUpItem(ItemStack itemstackIn)
canPickUpItem
in class LivingEntity
public boolean isNoDespawnRequired()
public final boolean processInitialInteract(PlayerEntity player, Hand hand)
processInitialInteract
in class Entity
protected boolean processInteract(PlayerEntity player, Hand hand)
public boolean isWithinHomeDistanceCurrentPosition()
public boolean isWithinHomeDistanceFromPosition(BlockPos pos)
public void setHomePosAndDistance(BlockPos pos, int distance)
public BlockPos getHomePosition()
public float getMaximumHomeDistance()
public boolean detachHome()
protected void updateLeashedState()
public void clearLeashed(boolean sendPacket, boolean dropLead)
public boolean canBeLeashedTo(PlayerEntity player)
public boolean getLeashed()
@Nullable public Entity getLeashHolder()
public void setLeashHolder(Entity entityIn, boolean sendAttachNotification)
public void setVehicleEntityId(int leashHolderIDIn)
public boolean startRiding(Entity entityIn, boolean force)
startRiding
in class Entity
private void recreateLeash()
public boolean replaceItemInInventory(int inventorySlot, ItemStack itemStackIn)
replaceItemInInventory
in class Entity
public boolean canPassengerSteer()
canPassengerSteer
in class Entity
public static boolean isItemStackInSlot(EquipmentSlotType slotIn, ItemStack stack)
public boolean isServerWorld()
isServerWorld
in class LivingEntity
public void setNoAI(boolean disable)
public void setLeftHanded(boolean leftHanded)
public void setAggroed(boolean hasAggro)
public boolean isAIDisabled()
public boolean isLeftHanded()
public boolean isAggressive()
public HandSide getPrimaryHand()
getPrimaryHand
in class LivingEntity
public boolean canAttack(LivingEntity target)
canAttack
in class LivingEntity
public boolean attackEntityAsMob(Entity entityIn)
attackEntityAsMob
in class LivingEntity
protected boolean isInDaylight()
protected void handleFluidJump(Tag<Fluid> fluidTag)
handleFluidJump
in class LivingEntity
public boolean isHolding(Item itemIn)