public class VillagerEntity extends AbstractVillagerEntity implements IReputationTracking, IVillagerDataHolder
| Modifier and Type | Field and Description | 
|---|---|
| static java.util.Map<MemoryModuleType<GlobalPos>,java.util.function.BiPredicate<VillagerEntity,PointOfInterestType>> | field_213774_bB | 
| static java.util.Map<Item,java.lang.Integer> | field_213788_bA | 
offersforcedAge, forcedAgeTimer, growingAgeexperienceValue, goalSelector, inventoryArmorDropChances, inventoryHandsDropChances, jumpController, livingSoundTime, lookController, moveController, navigator, targetSelectoractiveItemStack, activeItemStackUseCount, arrowHitTimer, attackedAtYaw, attackingPlayer, 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, randomYawVelocity, recentlyHit, renderYawOffset, rotationYawHead, scoreValue, SLEEPING_SIZE, spinAttackDuration, SWIM_SPEED, swingingHand, swingProgress, swingProgressInt, ticksElytraFlying, ticksSinceLastSwing, unused180addedToChunk, 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, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldfield_213139_a_| Constructor and Description | 
|---|
| VillagerEntity(EntityType<? extends VillagerEntity> p_i50182_1_,
              World p_i50182_2_) | 
| VillagerEntity(EntityType<? extends VillagerEntity> p_i50183_1_,
              World p_i50183_2_,
              IVillagerType p_i50183_3_) | 
addTrades, canBeLeashedTo, changeDimension, func_213702_q, func_213703_a, func_213705_dZ, func_213711_eb, func_213714_ea, func_213715_ed, func_213716_dX, func_213718_a, func_213721_r, getCustomer, getOffers, getShakeHeadTicks, getStandingEyeHeight, getWorld, onTrade, replaceItemInInventory, setShakeHeadTicks, verifySellingItemaddGrowth, ageUp, getGrowingAge, isChild, livingTick, notifyDataManagerChange, onChildSpawnFromEgg, setGrowingAgecanSpawn, followLeashSpeed, getBlockPathWeight, getBlockPathWeight, hasPath, onLeashDistance, updateLeashedStateattackEntityAsMob, baseTick, canAttack, canAttack, canBeSteered, canEquipItem, canPassengerSteer, canPickUpLoot, checkDespawn, clearLeashed, createBodyController, createNavigator, detachHome, dropLoot, dropSpecialItems, eatGrassBonus, enablePersistence, faceEntity, func_204209_c, func_213346_cF, func_213363_a, func_213365_e, func_213381_d, func_213385_F, func_213396_dB, func_223315_a, getArmorByChance, getArmorInventoryList, getAttackTarget, getDropChance, getEntitySenses, getExperiencePoints, getHeldEquipment, getHomePosition, getHorizontalFaceSpeed, getItemStackFromSlot, getJumpController, getLeashed, getLeashHolder, getLookController, getLootTable, getMaxFallHeight, getMaximumHomeDistance, getMaxSpawnedInChunk, getMoveHelper, getNavigator, getPathPriority, getPrimaryHand, getSlotForItemStack, getTalkInterval, getVerticalFaceSpeed, handleFluidJump, isAggressive, isAIDisabled, isHolding, isInDaylight, isItemStackInSlot, isLeftHanded, isNoDespawnRequired, isNotColliding, isServerWorld, isWithinHomeDistanceCurrentPosition, isWithinHomeDistanceFromPosition, playAmbientSound, playHurtSound, preventDespawn, processInitialInteract, registerGoals, setAggroed, setAIMoveSpeed, setAttackTarget, setCanPickUpLoot, setDropChance, setEnchantmentBasedOnDifficulty, setEquipmentBasedOnDifficulty, setHomePosAndDistance, setItemStackToSlot, setLeashHolder, setLeftHanded, setMoveForward, setMoveStrafing, setMoveVertical, setNoAI, setPathPriority, shouldExchangeEquipment, spawnExplosionParticle, startRiding, updateDistance, updateEntityActionStateaddPotionEffect, applyArmorCalculations, applyEntityCollision, applyPotionDamageCalculations, areAllPotionsAmbient, attackable, attackEntityFrom, attemptTeleport, blockUsingShield, canBeCollidedWith, canBeHitWithPotion, canBePushed, canBeRiddenInWater, canBreatheUnderwater, canDropLoot, canEntityBeSeen, clearActivePotions, clearBedPosition, collideWithEntity, collideWithNearbyEntities, createSpawnPacket, curePotionEffects, damageArmor, damageEntity, damageShield, decreaseAirSupply, determineNextAir, dismountEntity, dropInventory, fall, findAmmo, frostWalk, func_213314_bj, func_213343_cS, func_213344_a, func_213371_e, getAbsorptionAmount, getActiveHand, getActiveItemStack, getActivePotionEffect, getActivePotionEffects, getActivePotionMap, getAIMoveSpeed, getAlwaysRenderNameTagForRender, getArrowCountInEntity, getAttackingEntity, getAttribute, getAttributes, getBedDirection, getBedPosition, getBlockState, getCapability, getCombatTracker, getCreatureAttribute, getDrinkSound, getEatSound, getEyeHeight, getFallSound, getHealth, getHeldItem, getHeldItemMainhand, getHeldItemOffhand, getIdleTime, getItemInUseCount, getItemInUseMaxCount, getJumpUpwardsMotion, getLastAttackedEntity, getLastAttackedEntityTime, getLastDamageSource, getMaxHealth, getRenderScale, getRevengeTarget, getRevengeTimer, getRNG, getRotationYawHead, getSize, getSoundPitch, getSoundVolume, getSwimAnimation, getSwingProgress, getTicksElytraFlying, getTotalArmorValue, getVisibilityMultiplier, getWaterSlowDown, getYaw, handleFluidSneak, hasItemInSlot, heal, isActiveItemStackBlocking, isAlive, isElytraFlying, isEntityInsideOpaqueBlock, isEntityUndead, isHandActive, isMovementBlocked, isOnLadder, isPlayer, isPotionActive, isPotionApplicable, isSleeping, isSpinAttacking, jump, knockBack, lookAt, markPotionsDirty, markVelocityChanged, onChangedPotionEffect, onDeathUpdate, onFinishedPotionEffect, onFoodEaten, onItemPickup, onItemUseFinish, onKillCommand, onNewPotionEffect, outOfWorld, performHurtAnimation, playEquipSound, remove, removeActivePotionEffect, removePotionEffect, resetActiveHand, resetPotionEffectMetadata, sendBreakAnimation, sendBreakAnimation, sendEndCombat, sendEnterCombat, setAbsorptionAmount, setActiveHand, setArrowCountInEntity, setBedPosition, setHeadRotation, setHealth, setHeldItem, setIdleTime, setJumping, setLastAttackedEntity, setLivingFlag, setPartying, setPositionAndRotationDirect, setRenderYawOffset, setRotationYawHead, setSprinting, shouldRiderFaceForward, spawnDrops, spinAttack, startSpinAttack, stopActiveHand, stopRiding, swingArm, travel, updateArmSwingProgress, updateFallState, updateItemUse, updatePotionEffects, updatePotionMetadata, updateRidden, updateSpinAttack, wakeUpaddPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canRenderOnFire, canSwim, canTrample, canTriggerWalking, canUpdate, canUpdate, captureDrops, captureDrops, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, func_213286_i, func_213296_b, func_213300_bk, func_213312_b, func_213320_d, func_213324_a, func_223307_a, func_223308_g, func_223310_a, func_223314_ad, getAbsoluteMotion, getAdjustedHorizontalFacing, getAir, getAllowedMovement, getBoundingBox, getBoundingBox, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCollisionBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFlag, getForward, getHeight, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxInPortalTime, getMirroredYaw, getMotion, getMountedYOffset, getName, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionVec, getPositionVector, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getScoreboardName, getServer, getSoundCategory, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeleportDirection, getType, getUniqueID, getVectorForRotation, getWidth, getYOffset, handleFluidAcceleration, handlePistonMovement, handleSneakMovement, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCustomNameVisible, 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, isSwimming, isWet, makeFlySound, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillEntity, onRemovedFromWorld, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFlag, setGlowing, setInLava, setInvisible, setInvulnerable, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRotation, setSilent, setSneaking, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldRenderSneaking, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, teleportKeepLoaded, toString, updatePassenger, updatePortal, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitfunc_213707_acanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapabilitypublic static final java.util.Map<Item,java.lang.Integer> field_213788_bA
public static final java.util.Map<MemoryModuleType<GlobalPos>,java.util.function.BiPredicate<VillagerEntity,PointOfInterestType>> field_213774_bB
public VillagerEntity(EntityType<? extends VillagerEntity> p_i50182_1_, World p_i50182_2_)
public VillagerEntity(EntityType<? extends VillagerEntity> p_i50183_1_, World p_i50183_2_, IVillagerType p_i50183_3_)
public Brain<VillagerEntity> getBrain()
getBrain in class LivingEntityprotected Brain<?> createBrain(com.mojang.datafixers.Dynamic<?> p_213364_1_)
createBrain in class LivingEntitypublic void resetBrain(ServerWorld p_213770_1_)
protected void onGrowingAdult()
onGrowingAdult in class AgeableEntityprotected void registerAttributes()
registerAttributes in class MobEntityprotected void updateAITasks()
updateAITasks in class MobEntitypublic boolean processInteract(PlayerEntity player, Hand hand)
processInteract in class AgeableEntitypublic void setCustomer(@Nullable
                        PlayerEntity player)
setCustomer in interface IMerchantsetCustomer in class AbstractVillagerEntityprotected void func_213750_eg()
func_213750_eg in class AbstractVillagerEntitypublic boolean func_223340_ej()
func_223340_ej in interface IMerchantpublic void func_213766_ei()
public boolean func_223721_ek()
protected void registerData()
registerData in class AbstractVillagerEntitypublic void writeAdditional(CompoundNBT compound)
writeAdditional in class AbstractVillagerEntitypublic void readAdditional(CompoundNBT compound)
readAdditional in class AbstractVillagerEntitypublic boolean canDespawn(double distanceToClosestPlayer)
canDespawn in class MobEntity@Nullable protected SoundEvent getAmbientSound()
getAmbientSound in class MobEntityprotected SoundEvent getHurtSound(DamageSource damageSourceIn)
getHurtSound in class LivingEntityprotected SoundEvent getDeathSound()
getDeathSound in class LivingEntitypublic void playWorkstationSound()
public void setVillagerData(VillagerData p_213753_1_)
public VillagerData getVillagerData()
getVillagerData in interface IVillagerDataHolderprotected void func_213713_b(MerchantOffer p_213713_1_)
func_213713_b in class AbstractVillagerEntitypublic void setRevengeTarget(@Nullable
                             LivingEntity livingBase)
setRevengeTarget in class LivingEntitypublic void onDeath(DamageSource cause)
onDeath in class AbstractVillagerEntitypublic void func_213742_a(MemoryModuleType<GlobalPos> p_213742_1_)
public boolean canBreed()
public int func_223107_f(PlayerEntity p_223107_1_)
public void func_223346_ep()
public void func_213768_b(MerchantOffers p_213768_1_)
public ITextComponent getDisplayName()
getDisplayName in interface INameablegetDisplayName in class Entitypublic void handleStatusUpdate(byte id)
handleStatusUpdate in class MobEntity@Nullable public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficultyIn, SpawnReason reason, @Nullable ILivingEntityData spawnDataIn, @Nullable CompoundNBT dataTag)
onInitialSpawn in class MobEntitypublic VillagerEntity createChild(AgeableEntity ageable)
createChild in class AgeableEntitypublic void onStruckByLightning(LightningBoltEntity lightningBolt)
onStruckByLightning in class Entityprotected void updateEquipmentIfNeeded(ItemEntity itemEntity)
updateEquipmentIfNeeded in class MobEntitypublic boolean func_223717_b(Item p_223717_1_)
public boolean canAbondonItems()
public boolean wantsMoreFood()
public boolean isFarmItemInInventory()
protected void populateTradeData()
populateTradeData in class AbstractVillagerEntitypublic void func_213746_a(VillagerEntity p_213746_1_, long p_213746_2_)
public void func_223358_a(long p_223358_1_,
                          int p_223358_3_)
public boolean func_223350_a(long p_223350_1_)
public void func_213739_a(IReputationType p_213739_1_, Entity p_213739_2_)
func_213739_a in interface IReputationTrackingpublic int getXp()
getXp in interface IMerchantgetXp in class AbstractVillagerEntitypublic void setXp(int p_213761_1_)
public GossipManager func_223722_es()
public void func_223716_a(INBT p_223716_1_)
protected void func_213387_K()
func_213387_K in class MobEntitypublic void startSleeping(BlockPos p_213342_1_)
startSleeping in class LivingEntity