Package net.minecraft.world.entity.npc
Class Villager
- All Implemented Interfaces:
- CommandSource,- Attackable,- InventoryCarrier,- Npc,- VillagerDataHolder,- ReputationEventHandler,- Targeting,- VariantHolder<VillagerType>,- Merchant,- EntityAccess,- Nameable,- ICapabilityProvider,- ICapabilityProviderImpl<Entity>,- ICapabilitySerializable<CompoundTag>,- IForgeEntity,- IForgeLivingEntity,- INBTSerializable<CompoundTag>
public class Villager
extends AbstractVillager
implements ReputationEventHandler, VillagerDataHolder
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.entity.AgeableMobAgeableMob.AgeableMobGroupDataNested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntityLivingEntity.FallsoundsNested classes/interfaces inherited from class net.minecraft.world.entity.EntityEntity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProviderCapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanstatic final intprivate booleanprivate static final EntityDataAccessor<VillagerData>private intprivate static final intprivate static final intprivate final GossipContainerprivate static final intprivate static final intprivate booleanprivate longprivate longprivate longprivate longprivate Playerprivate static final org.slf4j.Loggerprivate static final intprivate static final com.google.common.collect.ImmutableList<MemoryModuleType<?>>private intstatic final Map<MemoryModuleType<GlobalPos>,BiPredicate<Villager, Holder<PoiType>>> private static final intprivate static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>>static final floatprivate static final longprivate static final intprivate intprivate intFields inherited from class net.minecraft.world.entity.npc.AbstractVillageroffers, VILLAGER_SLOT_OFFSETFields inherited from class net.minecraft.world.entity.AgeableMobage, BABY_START_AGE, forcedAge, forcedAgeTimerFields inherited from class net.minecraft.world.entity.PathfinderMobDEFAULT_WALK_TARGET_VALUEFields inherited from class net.minecraft.world.entity.MobambientSoundTime, armorDropChances, DEFAULT_EQUIPMENT_DROP_CHANCE, goalSelector, handDropChances, jumpControl, LEASH_TAG, lookControl, MAX_ENCHANTED_ARMOR_CHANCE, MAX_ENCHANTED_WEAPON_CHANCE, MAX_PICKUP_LOOT_CHANCE, MAX_WEARING_ARMOR_CHANCE, moveControl, navigation, PICKUP_REACH, PRESERVE_ITEM_DROP_CHANCE, targetSelector, UPDATE_GOAL_SELECTOR_EVERY_N_TICKS, xpRewardFields inherited from class net.minecraft.world.entity.LivingEntityanimStep, animStepO, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, DEFAULT_BASE_GRAVITY, DEFAULT_EYE_HEIGHT, 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, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, timeOffs, USE_ITEM_INTERVAL, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zzaFields inherited from class net.minecraft.world.entity.EntityBASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, 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, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, 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 interface net.minecraft.commands.CommandSourceNULLFields inherited from interface net.minecraft.world.entity.npc.InventoryCarrierTAG_INVENTORY
- 
Constructor SummaryConstructorsConstructorDescriptionVillager(EntityType<? extends Villager> p_35381_, Level p_35382_) Villager(EntityType<? extends Villager> p_35384_, Level p_35385_, VillagerType p_35386_) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAdditionalSaveData(CompoundTag p_35481_) protected voidprivate booleanbooleanprotected Brain.Provider<Villager>booleancanBreed()booleanprivate voidprivate intstatic AttributeSupplier.Builderprotected voidprotected voidvoiddie(DamageSource p_35419_) private voiddigestFood(int p_35549_) voidprivate voidfinalizeSpawn(ServerLevelAccessor p_35439_, DifficultyInstance p_35440_, MobSpawnType p_35441_, SpawnGroupData p_35442_, CompoundTag p_35443_) Forge: Override-Only, call via ForgeEventFactory.onFinalizeSpawn.
 Overrides are allowed.protected SoundEventgetBrain()getBreedOffspring(ServerLevel p_150012_, AgeableMob p_150013_) protected SoundEventprotected SoundEventgetHurtSound(DamageSource p_35498_) intgetPlayerReputation(Player p_35533_) protected Componentintprivate booleangolemSpawnConditionsMet(long p_35462_) voidgossip(ServerLevel p_35412_, Villager p_35413_, long p_35414_) voidhandleEntityEvent(byte p_35391_) booleanbooleanprivate booleanhungry()private voidbooleanbooleanprotected Brain<?>makeBrain(com.mojang.serialization.Dynamic<?> p_35445_) private voidmobInteract(Player p_35472_, InteractionHand p_35473_) private booleanvoidonReputationEventFrom(ReputationEventType p_35431_, Entity p_35432_) protected voidpickUpItem(ItemEntity p_35467_) voidvoidreadAdditionalSaveData(CompoundTag p_35451_) voidrefreshBrain(ServerLevel p_35484_) private voidregisterBrainGoals(Brain<Villager> p_35425_) private voidvoidreleasePoi(MemoryModuleType<GlobalPos> p_35429_) booleanremoveWhenFarAway(double p_35535_) private voidprivate voidprivate voidvoidrestock()protected voidrewardTradeXp(MerchantOffer p_35475_) protected voidvoidsetChasing(boolean p_150016_) voidsetGossips(Tag p_35456_) voidsetLastHurtByMob(LivingEntity p_35423_) voidsetOffers(MerchantOffers p_35477_) voidsetTradingPlayer(Player p_35508_) private voidvoidsetVillagerData(VillagerData p_35437_) voidsetVillagerXp(int p_35547_) private booleanbooleanvoidspawnGolemIfNeeded(ServerLevel p_35398_, long p_35399_, int p_35400_) voidstartSleeping(BlockPos p_35479_) private voidstartTrading(Player p_35537_) voidprotected voidprivate voidtellWitnessesThatIWasMurdered(Entity p_35421_) voidthunderHit(ServerLevel p_35409_, LightningBolt p_35410_) voidtick()private voidprivate voidupdateSpecialPrices(Player p_35541_) protected voidbooleanbooleanwantsToPickUp(ItemStack p_35543_) booleanwantsToSpawnGolem(long p_35393_) Methods inherited from class net.minecraft.world.entity.npc.AbstractVillageraddOffersFromItemListings, addParticlesAroundSelf, canBeLeashed, changeDimension, getInventory, getNotifyTradeSound, getOffers, getRopeHoldPosition, getSlot, getStandingEyeHeight, getTradeUpdatedSound, getTradingPlayer, getUnhappyCounter, isTrading, notifyTrade, notifyTradeUpdated, overrideOffers, overrideXp, playCelebrateSound, setUnhappyCounter, showProgressBarMethods inherited from class net.minecraft.world.entity.AgeableMobageUp, ageUp, aiStep, getAge, getSpeedUpSecondsWhenFeeding, isBaby, onSyncedDataUpdated, setAge, setBabyMethods inherited from class net.minecraft.world.entity.PathfinderMobcheckSpawnRules, followLeashSpeed, getWalkTargetValue, getWalkTargetValue, isPanicking, isPathFinding, onLeashDistance, shouldStayCloseToLeashHolder, tickLeashMethods inherited from class net.minecraft.world.entity.Mobate, baseTick, canAttackType, canFireProjectileWeapon, canHoldItem, canPickUpLoot, canReplaceCurrentItem, canReplaceEqualItem, canTakeItem, checkDespawn, checkMobSpawnRules, checkSpawnObstruction, clearRestriction, convertTo, createBodyControl, createMobAttributes, createNavigation, doHurtTarget, dropCustomDeathLoot, dropFromLootTable, dropLeash, enchantSpawnedArmor, enchantSpawnedWeapon, equipItemIfPossible, getAmbientSoundInterval, getArmorSlots, getAttackBoundingBox, getControllingPassenger, getDefaultLootTable, getEquipmentDropChance, getEquipmentForSlot, getExperienceReward, getHandSlots, getHeadRotSpeed, getItemBySlot, getJumpControl, getLeashHolder, getLookControl, getLootTable, getLootTableSeed, getMainArm, getMaxFallDistance, getMaxHeadXRot, getMaxHeadYRot, getMaxSpawnClusterSize, getMoveControl, getNavigation, getPathfindingMalus, getPickResult, getPickupReach, getRestrictCenter, getRestrictRadius, getSensing, getSpawnType, getTarget, hasRestriction, interact, isAggressive, isEffectiveAi, isLeashed, isLeftHanded, isMaxGroupSizeReached, isNoAi, isPersistenceRequired, isSpawnCancelled, isSunBurnTick, isWithinMeleeAttackRange, isWithinRestriction, isWithinRestriction, jumpInFluid, jumpInLiquid, lookAt, onOffspringSpawnedFromEgg, onPathfindingDone, onPathfindingStart, playAmbientSound, playHurtSound, populateDefaultEquipmentEnchantments, populateDefaultEquipmentSlots, registerGoals, removeAfterChangingDimensions, removeAllGoals, removeFreeWill, requiresCustomPersistence, restrictTo, serverAiStep, setAggressive, setCanPickUpLoot, setDelayedLeashHolderId, setDropChance, setGuaranteedDrop, setItemSlot, setItemSlotAndDropWhenKilled, setLeashedTo, setLeftHanded, setNoAi, setPathfindingMalus, setPersistenceRequired, setSpawnCancelled, setSpeed, setTarget, setXxa, setYya, setZza, shouldDespawnInPeaceful, shouldPassengersInheritMalus, spawnAnim, startRiding, tickHeadTurn, updateControlFlagsMethods inherited from class net.minecraft.world.entity.LivingEntityactuallyHurt, addEffect, addEffect, animateHurt, areAllEffectsAmbient, attackable, blockedByShield, blockUsingShield, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canBeAffected, canBeSeenAsEnemy, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, causeFallDamage, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, doAutoAttackOnTouch, doesEmitEquipEvent, doPush, dropAllDeathLoot, dropEquipment, dropExperience, eat, equipmentHasChanged, forceAddEffect, getAbsorptionAmount, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributeBaseValue, getAttributes, getAttributeValue, getAttributeValue, getBedOrientation, getBlockSpeedFactor, getBoundingBoxForCulling, getCapability, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDimensions, getDismountPoses, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getEyeHeight, getFallFlyingTicks, getFallSounds, getFluidFallingAdjustedMovement, getFlyingSpeed, getHealth, getHitbox, getHurtDir, getItemInHand, getJumpBoostPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getMainHandItem, getMaxAbsorption, getMaxHealth, getMobType, getMyRidingOffset, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getProjectile, getRandom, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSoundVolume, getSpeed, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, hasLineOfSight, heal, hurt, hurtArmor, hurtCurrentlyUsedShield, hurtHelmet, increaseAirSupply, indicateDamage, internalSetAbsorptionAmount, invalidateCaps, isAffectedByFluids, isAffectedByPotions, isAlive, isAlwaysExperienceDropper, isAutoSpinAttack, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isImmobile, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpFromGround, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onItemPickup, onLeaveCombat, onSoulSpeedBlock, playBlockFallSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, remove, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, reviveCaps, rideTick, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRemoveSoulSpeed, shouldRiderFaceForward, shouldShowName, skipDropExperience, spawnSoulSpeedParticle, startUsingItem, stopRiding, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickRidden, travel, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPoseMethods inherited from class net.minecraft.world.entity.EntityabsMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, checkBelowWorld, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensionsForge, getDirection, getDismountLocationForPassenger, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getMovementEmission, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, 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, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, refreshDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, ridingOffset, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSoundMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProviderareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSourcealwaysAcceptsMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvidergetCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeEntitycanBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeHeightForge, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoatingMethods inherited from interface net.minecraftforge.common.extensions.IForgeLivingEntitycanDrownInFluidType, canSwimInFluidType, moveInFluid, self, sinkInFluidMethods inherited from interface net.minecraft.world.entity.npc.InventoryCarrierreadInventoryFromTag, writeInventoryToTagMethods inherited from interface net.minecraft.world.item.trading.MerchantopenTradingScreenMethods inherited from interface net.minecraft.world.entity.npc.VillagerDataHoldergetVariant, setVariant
- 
Field Details- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
DATA_VILLAGER_DATA
- 
BREEDING_FOOD_THRESHOLDpublic static final int BREEDING_FOOD_THRESHOLD- See Also:
 
- 
FOOD_POINTS
- 
TRADES_PER_LEVELprivate static final int TRADES_PER_LEVEL- See Also:
 
- 
WANTED_ITEMS
- 
MAX_GOSSIP_TOPICSprivate static final int MAX_GOSSIP_TOPICS- See Also:
 
- 
GOSSIP_COOLDOWNprivate static final int GOSSIP_COOLDOWN- See Also:
 
- 
GOSSIP_DECAY_INTERVALprivate static final int GOSSIP_DECAY_INTERVAL- See Also:
 
- 
REPUTATION_CHANGE_PER_EVENTprivate static final int REPUTATION_CHANGE_PER_EVENT- See Also:
 
- 
HOW_FAR_AWAY_TO_TALK_TO_OTHER_VILLAGERS_ABOUT_GOLEMSprivate static final int HOW_FAR_AWAY_TO_TALK_TO_OTHER_VILLAGERS_ABOUT_GOLEMS- See Also:
 
- 
HOW_MANY_VILLAGERS_NEED_TO_AGREE_TO_SPAWN_A_GOLEMprivate static final int HOW_MANY_VILLAGERS_NEED_TO_AGREE_TO_SPAWN_A_GOLEM- See Also:
 
- 
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNINGprivate static final long TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING- See Also:
 
- 
SPEED_MODIFIERpublic static final float SPEED_MODIFIER- See Also:
 
- 
updateMerchantTimerprivate int updateMerchantTimer
- 
increaseProfessionLevelOnUpdateprivate boolean increaseProfessionLevelOnUpdate
- 
lastTradedPlayer
- 
chasingprivate boolean chasing
- 
foodLevelprivate int foodLevel
- 
gossips
- 
lastGossipTimeprivate long lastGossipTime
- 
lastGossipDecayTimeprivate long lastGossipDecayTime
- 
villagerXpprivate int villagerXp
- 
lastRestockGameTimeprivate long lastRestockGameTime
- 
numberOfRestocksTodayprivate int numberOfRestocksToday
- 
lastRestockCheckDayTimeprivate long lastRestockCheckDayTime
- 
assignProfessionWhenSpawnedprivate boolean assignProfessionWhenSpawned
- 
MEMORY_TYPES
- 
SENSOR_TYPESprivate static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>> SENSOR_TYPES
- 
POI_MEMORIESpublic static final Map<MemoryModuleType<GlobalPos>,BiPredicate<Villager, POI_MEMORIESHolder<PoiType>>> 
 
- 
- 
Constructor Details- 
Villager
- 
Villager
 
- 
- 
Method Details- 
getBrain- Overrides:
- getBrainin class- LivingEntity
 
- 
brainProvider- Overrides:
- brainProviderin class- LivingEntity
 
- 
makeBrain- Overrides:
- makeBrainin class- LivingEntity
 
- 
refreshBrain
- 
registerBrainGoals
- 
ageBoundaryReachedprotected void ageBoundaryReached()- Overrides:
- ageBoundaryReachedin class- AgeableMob
 
- 
createAttributes
- 
assignProfessionWhenSpawnedpublic boolean assignProfessionWhenSpawned()
- 
customServerAiStepprotected void customServerAiStep()- Overrides:
- customServerAiStepin class- Mob
 
- 
tickpublic void tick()
- 
mobInteract- Overrides:
- mobInteractin class- Mob
 
- 
setUnhappyprivate void setUnhappy()
- 
startTrading
- 
setTradingPlayer- Specified by:
- setTradingPlayerin interface- Merchant
- Overrides:
- setTradingPlayerin class- AbstractVillager
 
- 
stopTradingprotected void stopTrading()- Overrides:
- stopTradingin class- AbstractVillager
 
- 
resetSpecialPricesprivate void resetSpecialPrices()
- 
canRestockpublic boolean canRestock()- Specified by:
- canRestockin interface- Merchant
 
- 
isClientSidepublic boolean isClientSide()- Specified by:
- isClientSidein interface- Merchant
- Overrides:
- isClientSidein class- AbstractVillager
 
- 
restockpublic void restock()
- 
resendOffersToTradingPlayerprivate void resendOffersToTradingPlayer()
- 
needsToRestockprivate boolean needsToRestock()
- 
allowedToRestockprivate boolean allowedToRestock()
- 
shouldRestockpublic boolean shouldRestock()
- 
catchUpDemandprivate void catchUpDemand()
- 
updateDemandprivate void updateDemand()
- 
updateSpecialPrices
- 
defineSynchedDataprotected void defineSynchedData()- Overrides:
- defineSynchedDatain class- AbstractVillager
 
- 
addAdditionalSaveData- Overrides:
- addAdditionalSaveDatain class- AbstractVillager
 
- 
readAdditionalSaveData- Overrides:
- readAdditionalSaveDatain class- AbstractVillager
 
- 
removeWhenFarAwaypublic boolean removeWhenFarAway(double p_35535_) - Overrides:
- removeWhenFarAwayin class- Mob
 
- 
getAmbientSound- Overrides:
- getAmbientSoundin class- Mob
 
- 
getHurtSound- Overrides:
- getHurtSoundin class- LivingEntity
 
- 
getDeathSound- Overrides:
- getDeathSoundin class- LivingEntity
 
- 
playWorkSoundpublic void playWorkSound()
- 
setVillagerData- Specified by:
- setVillagerDatain interface- VillagerDataHolder
 
- 
getVillagerData- Specified by:
- getVillagerDatain interface- VillagerDataHolder
 
- 
rewardTradeXp- Specified by:
- rewardTradeXpin class- AbstractVillager
 
- 
setChasingpublic void setChasing(boolean p_150016_) 
- 
isChasingpublic boolean isChasing()
- 
setLastHurtByMob- Overrides:
- setLastHurtByMobin class- LivingEntity
 
- 
die- Overrides:
- diein class- AbstractVillager
 
- 
releaseAllPoisprivate void releaseAllPois()
- 
tellWitnessesThatIWasMurdered
- 
releasePoi
- 
canBreedpublic boolean canBreed()- Overrides:
- canBreedin class- AgeableMob
 
- 
hungryprivate boolean hungry()
- 
eatUntilFullprivate void eatUntilFull()
- 
getPlayerReputation
- 
digestFoodprivate void digestFood(int p_35549_) 
- 
eatAndDigestFoodpublic void eatAndDigestFood()
- 
setOffers
- 
shouldIncreaseLevelprivate boolean shouldIncreaseLevel()
- 
increaseMerchantCareerprivate void increaseMerchantCareer()
- 
getTypeName- Overrides:
- getTypeNamein class- Entity
 
- 
handleEntityEventpublic void handleEntityEvent(byte p_35391_) - Overrides:
- handleEntityEventin class- Mob
 
- 
finalizeSpawn@Nullable public SpawnGroupData finalizeSpawn(ServerLevelAccessor p_35439_, DifficultyInstance p_35440_, MobSpawnType p_35441_, @Nullable SpawnGroupData p_35442_, @Nullable CompoundTag p_35443_) Description copied from class:MobForge: 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 Mob.spawnTypefield from within your override.- Overrides:
- finalizeSpawnin class- AbstractVillager
 
- 
getBreedOffspring- Specified by:
- getBreedOffspringin class- AgeableMob
 
- 
thunderHit- Overrides:
- thunderHitin class- Entity
 
- 
pickUpItem- Overrides:
- pickUpItemin class- Mob
 
- 
wantsToPickUp- Overrides:
- wantsToPickUpin class- Mob
 
- 
hasExcessFoodpublic boolean hasExcessFood()
- 
wantsMoreFoodpublic boolean wantsMoreFood()
- 
countFoodPointsInInventoryprivate int countFoodPointsInInventory()
- 
hasFarmSeedspublic boolean hasFarmSeeds()
- 
updateTradesprotected void updateTrades()- Specified by:
- updateTradesin class- AbstractVillager
 
- 
gossip
- 
maybeDecayGossipprivate void maybeDecayGossip()
- 
spawnGolemIfNeeded
- 
wantsToSpawnGolempublic boolean wantsToSpawnGolem(long p_35393_) 
- 
onReputationEventFrom- Specified by:
- onReputationEventFromin interface- ReputationEventHandler
 
- 
getVillagerXppublic int getVillagerXp()- Specified by:
- getVillagerXpin interface- Merchant
- Overrides:
- getVillagerXpin class- AbstractVillager
 
- 
setVillagerXppublic void setVillagerXp(int p_35547_) 
- 
resetNumberOfRestocksprivate void resetNumberOfRestocks()
- 
getGossips
- 
setGossips
- 
sendDebugPacketsprotected void sendDebugPackets()- Overrides:
- sendDebugPacketsin class- Mob
 
- 
startSleeping- Overrides:
- startSleepingin class- LivingEntity
 
- 
stopSleepingpublic void stopSleeping()- Overrides:
- stopSleepingin class- LivingEntity
 
- 
golemSpawnConditionsMetprivate boolean golemSpawnConditionsMet(long p_35462_) 
 
-