net.minecraft.world.entity.npc

public class Villager

extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder

All mapped superinterfaces:

SyncedDataHolder, Nameable, EntityAccess, UniquelyIdentifyable, ScoreHolder, DataComponentGetter, Attackable, EquipmentUser, Leashable, Targeting, InventoryCarrier, Npc, Merchant, ReputationEventHandler, VillagerDataHolder

cqo
net.minecraft.world.entity.npc.Villager
net.minecraft.class_1646
net.minecraft.unmapped.C_pdtkdbte
net.minecraft.entity.passive.VillagerEntity
net.minecraft.entity.passive.VillagerEntity

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
bM
LOGGER
field_36335
f_zxhrpcmq
LOGGER
LOGGER
private static final EntityDataAccessor<VillagerData>
bN
DATA_VILLAGER_DATA
field_7445
f_xisxjtqv
VILLAGER_DATA
VILLAGER_DATA
public static final int
bI
BREEDING_FOOD_THRESHOLD
field_30602
f_epcheowx
field_30602
BREEDING_FOOD_REQUIRED
public static final Map<Item, Integer>
bJ
FOOD_POINTS
field_18526
f_jhoygheo
ITEM_FOOD_VALUES
ITEM_FOOD_VALUES
private static final int
bO
TRADES_PER_LEVEL
field_30604
f_aruxtchf
field_30604
TRADE_OFFERS_PER_LEVEL
private static final int
bP
MAX_GOSSIP_TOPICS
field_30605
f_lkhjiicp
field_30605
MAX_GOSSIP_TOPICS
private static final int
bQ
GOSSIP_COOLDOWN
field_30606
f_usmdemxw
field_30606
GOSSIP_COOLDOWN
private static final int
bR
GOSSIP_DECAY_INTERVAL
field_30607
f_qjglwcyl
field_30607
GOSSIP_DECAY_INTERVAL
private static final int
bS
HOW_FAR_AWAY_TO_TALK_TO_OTHER_VILLAGERS_ABOUT_GOLEMS
field_30609
f_dzkfxuwi
field_30609
GOLEM_COMMUNICATION_DISTANCE
private static final int
bT
HOW_MANY_VILLAGERS_NEED_TO_AGREE_TO_SPAWN_A_GOLEM
field_30610
f_gklaoynw
field_30610
GOLEM_SPAWN_REQUIRED_AGREEING_VILLAGERS
private static final long
bU
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING
field_30611
f_fhqkkbxb
field_30611
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING
public static final float
bK
SPEED_MODIFIER
field_30603
f_opllnkeh
field_30603
SPEED_MODIFIER
private int
bV
updateMerchantTimer
field_18528
f_tafdryps
levelUpTimer
levelUpTimer
private boolean
bW
increaseProfessionLevelOnUpdate
field_18529
f_qlajekfm
levelingUp
levelingUp
private Player
bX
lastTradedPlayer
field_18530
f_xbuwxivj
lastCustomer
lastCustomer
private boolean
bY
chasing
field_30612
f_mnprlolx
field_30612
chasing
private int
bZ
foodLevel
field_18533
f_gxkrfvtt
foodLevel
foodLevel
private final GossipContainer
ca
gossips
field_18534
f_yutmdxcy
gossip
gossip
private long
cb
lastGossipTime
field_18535
f_aoqjlzkd
gossipStartTime
gossipStartTime
private long
cc
lastGossipDecayTime
field_19357
f_sbabdvav
lastGossipDecayTime
lastGossipDecayTime
private int
cd
villagerXp
field_18536
f_aweloyby
experience
experience
private long
ce
lastRestockGameTime
field_18537
f_audpvcxh
lastRestockTime
lastRestockTime
private int
cf
numberOfRestocksToday
field_19427
f_ounqokay
restocksToday
restocksToday
private long
cg
lastRestockCheckDayTime
field_20332
f_suhwvkte
lastRestockCheckTime
lastRestockCheckTime
private boolean
ch
assignProfessionWhenSpawned
field_25167
f_bferfmkz
natural
natural
private static final com.google.common.collect.ImmutableList<MemoryModuleType<?>>
ci
MEMORY_TYPES
field_18538
f_ahngdmuc
MEMORY_MODULES
MEMORY_MODULES
private static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>>
cj
SENSOR_TYPES
field_18539
f_hfjucsil
SENSORS
SENSORS
public static final Map<MemoryModuleType<GlobalPos>, BiPredicate<Villager, Holder<PoiType>>>
bL
POI_MEMORIES
field_18851
f_mqjxuzni
POINTS_OF_INTEREST
POINTS_OF_INTEREST

Constructor summary

ModifierConstructor
public (EntityType<? extends Villager> arg0, Level world)
public (EntityType<? extends Villager> entityType, Level world, ResourceKey<VillagerType> type)
public (EntityType<? extends Villager> entityType, Level world, Holder<VillagerType> type)

Method summary

Modifier and TypeMethod
public Brain<Villager>
ec()
getBrain()
method_18868()
m_hobjxuks()
getBrain()
getBrain()
protected Brain$Provider<Villager>
ed()
brainProvider()
method_28306()
m_pusvfpox()
createBrainProfile()
createBrainProfile()
protected Brain<?>
a(com.mojang.serialization.Dynamic<?> arg0)
makeBrain(com.mojang.serialization.Dynamic<?> arg0)
method_18867(com.mojang.serialization.Dynamic<?> arg0)
m_epkzhkqg(com.mojang.serialization.Dynamic<?> arg0)
deserializeBrain(com.mojang.serialization.Dynamic<?> arg0)
deserializeBrain(com.mojang.serialization.Dynamic<?> arg0)
public void
g(arq arg0)
refreshBrain(ServerLevel arg0)
method_19179(class_3218 arg0)
m_nxfvdvix(C_bdwnwhiu arg0)
reinitializeBrain(ServerWorld world)
reinitializeBrain(ServerWorld world)
private void
a(bye<cqo> arg0)
registerBrainGoals(Brain<Villager> arg0)
method_19174(class_4095<class_1646> arg0)
m_ypommskk(C_rjqjaxef<C_pdtkdbte> arg0)
initBrain(Brain<VillagerEntity> brain)
initBrain(Brain<VillagerEntity> brain)
protected void
j()
ageBoundaryReached()
method_5619()
m_xdpbetzz()
onGrowUp()
onGrowUp()
public static AttributeSupplier$Builder
gA()
createAttributes()
method_26955()
m_hdwuynny()
createVillagerAttributes()
createAttributes()
public boolean
gB()
assignProfessionWhenSpawned()
method_29279()
m_mjduxnka()
isNatural()
isNatural()
protected void
a(arq arg0)
customServerAiStep(ServerLevel arg0)
method_5958(class_3218 arg0)
m_wbeiezxn(C_bdwnwhiu arg0)
mobTick(ServerWorld arg0)
mobTick(ServerWorld arg0)
public void
h()
tick()
method_5773()
m_arkgrfeb()
tick()
tick()
public InteractionResult
b(crc arg0, buc arg1)
mobInteract(Player arg0, InteractionHand arg1)
method_5992(class_1657 arg0, class_1268 arg1)
m_kuhfocmh(C_jzrpycqo arg0, C_laxmzoqs arg1)
interactMob(PlayerEntity arg0, Hand arg1)
interactMob(PlayerEntity arg0, Hand arg1)
private void
gM()
setUnhappy()
method_20264()
m_znfujvep()
sayNo()
sayNo()
private void
g(crc arg0)
startTrading(Player arg0)
method_19191(class_1657 arg0)
m_zuttxskq(C_jzrpycqo arg0)
beginTradeWith(PlayerEntity customer)
beginTradeWith(PlayerEntity customer)
public void
a(crc arg0)
setTradingPlayer(Player arg0)
method_8259(class_1657 arg0)
m_hlreeqnr(C_jzrpycqo arg0)
setCustomer(PlayerEntity arg0)
setCurrentCustomer(PlayerEntity arg0)
protected void
gw()
stopTrading()
method_19181()
m_hpfqnnmn()
resetCustomer()
resetCustomer()
private void
gN()
resetSpecialPrices()
method_19187()
m_dnarwtec()
clearSpecialPrices()
clearSpecialPrices()
public boolean
gC()
canRestock()
method_20708()
m_bvoaaumq()
canRefreshTrades()
canRefreshTrades()
public void
gD()
restock()
method_19182()
m_cwatgxjj()
restock()
restock()
private void
gO()
resendOffersToTradingPlayer()
method_49695()
m_czadnfrf()
sendOffersToCustomer()
updateTradeOffers()
private boolean
gP()
needsToRestock()
method_20823()
m_rftgjnmb()
needsRestock()
needsRestock()
private boolean
gQ()
allowedToRestock()
method_20824()
m_kqnyepur()
canRestock()
canRestock()
public boolean
gE()
shouldRestock()
method_20822()
m_zghwxgpj()
shouldRestock()
tryDailyRestock()
private void
gR()
catchUpDemand()
method_21723()
m_xdqprxfh()
restockAndUpdateDemandBonus()
restockAndUpdateDemandBonus()
private void
gS()
updateDemand()
method_21724()
m_mpxabify()
updateDemandBonus()
updateDemandBonus()
private void
h(crc arg0)
updateSpecialPrices(Player arg0)
method_19192(class_1657 arg0)
m_wpijqmum(C_jzrpycqo arg0)
prepareOffersFor(PlayerEntity player)
prepareOffersFor(PlayerEntity player)
protected void
a(akn$a arg0)
defineSynchedData(SynchedEntityData$Builder arg0)
method_5693(class_2945$class_9222 arg0)
m_lwugwlsw(C_pyoaoolj$C_oqzxcugu arg0)
initDataTracker(DataTracker$Builder arg0)
initDataTracker(DataTracker$Builder arg0)
public static VillagerData
gF()
createDefaultVillagerData()
method_67359()
m_uudbadxe()
createVillagerData()
public void
b(tz arg0)
addAdditionalSaveData(CompoundTag arg0)
method_5652(class_2487 arg0)
m_xuwbpohg(C_hhlwcnih arg0)
writeCustomDataToNbt(NbtCompound arg0)
writeCustomDataToNbt(NbtCompound arg0)
public void
a(tz arg0)
readAdditionalSaveData(CompoundTag arg0)
method_5749(class_2487 arg0)
m_obkzfysl(C_hhlwcnih arg0)
readCustomDataFromNbt(NbtCompound arg0)
readCustomDataFromNbt(NbtCompound arg0)
public boolean
h(double arg0)
removeWhenFarAway(double arg0)
method_5974(double arg0)
m_dciqpbdm(double arg0)
canImmediatelyDespawn(double arg0)
canImmediatelyDespawn(double arg0)
protected SoundEvent
u()
getAmbientSound()
method_5994()
m_jjefzxbm()
getAmbientSound()
getAmbientSound()
protected SoundEvent
e(buu arg0)
getHurtSound(DamageSource arg0)
method_6011(class_1282 arg0)
m_spwwmdyl(C_sbxfkpyv arg0)
getHurtSound(DamageSource arg0)
getHurtSound(DamageSource arg0)
protected SoundEvent
l_()
getDeathSound()
method_6002()
m_axkhmdzu()
getDeathSound()
getDeathSound()
public void
gG()
playWorkSound()
method_19183()
m_jjwcuxsi()
playWorkSound()
playWorkSound()
public void
a(cqp arg0)
setVillagerData(VillagerData arg0)
method_7195(class_3850 arg0)
m_jidjtpvm(C_zuqrzrur arg0)
setVillagerData(VillagerData arg0)
setVillagerData(VillagerData arg0)
public VillagerData
gz()
getVillagerData()
method_7231()
m_ulhthoau()
getVillagerData()
getVillagerData()
protected void
b(dhy arg0)
rewardTradeXp(MerchantOffer arg0)
method_18008(class_1914 arg0)
m_iabllljm(C_argwryfu arg0)
afterUsing(TradeOffer arg0)
afterUsing(TradeOffer arg0)
public void
a(bxe arg0)
setLastHurtByMob(LivingEntity arg0)
method_6015(class_1309 arg0)
m_fqffmeys(C_usxaxydn arg0)
setAttacker(LivingEntity arg0)
setAttacker(LivingEntity arg0)
public void
a(buu arg0)
die(DamageSource arg0)
method_6078(class_1282 arg0)
m_tflzijcx(C_sbxfkpyv arg0)
onDeath(DamageSource arg0)
onDeath(DamageSource arg0)
private void
gT()
releaseAllPois()
method_30958()
m_wptaprwe()
releaseAllTickets()
releaseAllTickets()
private void
b(bwf arg0)
tellWitnessesThatIWasMurdered(Entity arg0)
method_20690(class_1297 arg0)
m_otzexgpv(C_astfners arg0)
notifyDeath(Entity killer)
notifyDeath(Entity killer)
public void
a(cgg<jd> arg0)
releasePoi(MemoryModuleType<GlobalPos> arg0)
method_19176(class_4140<class_4208> arg0)
m_kiobdwbz(C_vbbyoqyw<C_ovcqqyqp> arg0)
releaseTicketFor(MemoryModuleType<GlobalPos> pos)
releaseTicketFor(MemoryModuleType<GlobalPos> memoryType)
public boolean
T_()
canBreed()
method_19184()
m_qxlffuwy()
isReadyToBreed()
isReadyToBreed()
private boolean
gU()
hungry()
method_20698()
m_pwctnevz()
canEatFood()
lacksFood()
private void
gV()
eatUntilFull()
method_19185()
m_uyreuuxj()
consumeAvailableFood()
consumeAvailableFood()
public int
f(crc arg0)
getPlayerReputation(Player arg0)
method_20594(class_1657 arg0)
m_vvktbnvx(C_jzrpycqo arg0)
getReputation(PlayerEntity player)
getReputation(PlayerEntity player)
private void
u(int arg0)
digestFood(int arg0)
method_19193(int arg0)
m_dnuarqhe(int arg0)
depleteFood(int amount)
depleteFood(int amount)
public void
gH()
eatAndDigestFood()
method_20697()
m_adawsril()
eatForBreeding()
eatForBreeding()
public void
b(dhz arg0)
setOffers(MerchantOffers arg0)
method_16917(class_1916 arg0)
m_hnipyvgh(C_eygsjfgm arg0)
setOffers(TradeOfferList offers)
setOffers(TradeOfferList offers)
private boolean
gW()
shouldIncreaseLevel()
method_19188()
m_clijlzqy()
canLevelUp()
canLevelUp()
private void
gX()
increaseMerchantCareer()
method_16918()
m_llrjmaju()
levelUp()
levelUp()
protected Component
cz()
getTypeName()
method_23315()
m_jvbeeoym()
getDefaultName()
getDefaultName()
public void
b(byte arg0)
handleEntityEvent(byte arg0)
method_5711(byte arg0)
m_kkieextx(byte arg0)
handleStatus(byte arg0)
handleStatus(byte arg0)
public SpawnGroupData
a(djr arg0, bub arg1, bwn arg2, bxw arg3)
finalizeSpawn(ServerLevelAccessor arg0, DifficultyInstance arg1, EntitySpawnReason arg2, SpawnGroupData arg3)
method_5943(class_5425 arg0, class_1266 arg1, class_3730 arg2, class_1315 arg3)
m_oxrxxqyz(C_jmnzlycd arg0, C_jiailwzt arg1, C_bhyaesep arg2, C_lsmqixfx arg3)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3)
public Villager
b(arq arg0, bvv arg1)
getBreedOffspring(ServerLevel arg0, AgeableMob arg1)
method_7225(class_3218 arg0, class_1296 arg1)
m_tdeczxex(C_bdwnwhiu arg0, C_jvojbnla arg1)
createChild(ServerWorld arg0, PassiveEntity arg1)
createChild(ServerWorld world, PassiveEntity arg1)
public void
a(arq arg0, bxd arg1)
thunderHit(ServerLevel arg0, LightningBolt arg1)
method_5800(class_3218 arg0, class_1538 arg1)
m_vindekkr(C_bdwnwhiu arg0, C_kbpqznyn arg1)
onStruckByLightning(ServerWorld arg0, LightningEntity arg1)
onStruckByLightning(ServerWorld arg0, LightningEntity arg1)
protected void
a(arq arg0, cnh arg1)
pickUpItem(ServerLevel arg0, ItemEntity arg1)
method_5949(class_3218 arg0, class_1542 arg1)
m_avgkrrey(C_bdwnwhiu arg0, C_uqpzijng arg1)
loot(ServerWorld arg0, ItemEntity arg1)
loot(ServerWorld arg0, ItemEntity arg1)
public boolean
c(arq arg0, czd arg1)
wantsToPickUp(ServerLevel arg0, ItemStack arg1)
method_20820(class_3218 arg0, class_1799 arg1)
m_nzdowltt(C_bdwnwhiu arg0, C_sddaxwyk arg1)
canGather(ServerWorld arg0, ItemStack arg1)
canGather(ServerWorld arg0, ItemStack arg1)
public boolean
gI()
hasExcessFood()
method_7234()
m_tawsehpr()
canShareFoodForBreeding()
wantsToStartBreeding()
public boolean
gJ()
wantsMoreFood()
method_7239()
m_vtyepvne()
needsFoodForBreeding()
canBreed()
private int
gY()
countFoodPointsInInventory()
method_19189()
m_pagkeccz()
getAvailableFood()
getAvailableFood()
public boolean
gK()
hasFarmSeeds()
method_19623()
m_nhfaurjc()
hasSeedToPlant()
hasSeedToPlant()
protected void
gx()
updateTrades()
method_7237()
m_dnvdzaow()
fillRecipes()
fillRecipes()
public void
a(arq arg0, cqo arg1, long arg2)
gossip(ServerLevel arg0, Villager arg1, long arg2)
method_19177(class_3218 arg0, class_1646 arg1, long arg2)
m_ckcvyxav(C_bdwnwhiu arg0, C_pdtkdbte arg1, long arg2)
talkWithVillager(ServerWorld world, VillagerEntity villager, long time)
talkWithVillager(ServerWorld world, VillagerEntity villager, long time)
private void
gZ()
maybeDecayGossip()
method_20696()
m_yuvzulud()
decayGossip()
decayGossip()
public void
a(arq arg0, long arg1, int arg2)
spawnGolemIfNeeded(ServerLevel arg0, long arg1, int arg2)
method_20688(class_3218 arg0, long arg1, int arg2)
m_oeanogpu(C_bdwnwhiu arg0, long arg1, int arg2)
summonGolem(ServerWorld world, long time, int requiredCount)
summonGolem(ServerWorld world, long time, int requiredCount)
public boolean
a(long arg0)
wantsToSpawnGolem(long arg0)
method_20687(long arg0)
m_nxwgfbdy(long arg0)
canSummonGolem(long time)
canSummonGolem(long time)
public void
a(cid arg0, bwf arg1)
onReputationEventFrom(ReputationEventType arg0, Entity arg1)
method_18870(class_4151 arg0, class_1297 arg1)
m_cczinwkh(C_wdatdqcy arg0, C_astfners arg1)
onInteractionWith(EntityInteraction arg0, Entity arg1)
onInteractionWith(EntityInteraction arg0, Entity arg1)
public int
t()
getVillagerXp()
method_19269()
m_lowowysu()
getExperience()
getExperience()
public void
t(int arg0)
setVillagerXp(int arg0)
method_19625(int arg0)
m_haedgvxm(int arg0)
setExperience(int experience)
setExperience(int amount)
private void
ha()
resetNumberOfRestocks()
method_20821()
m_ohxwrhdt()
clearDailyRestockCount()
doDailyRestock()
public GossipContainer
gL()
getGossips()
method_21651()
m_lebhfnus()
getGossip()
getGossip()
public void
a(uw arg0)
setGossips(Tag arg0)
method_21650(class_2520 arg0)
m_xgtnqlqm(C_oivssbvb arg0)
readGossipDataNbt(NbtElement nbt)
readGossipDataNbt(NbtElement nbt)
protected void
ab()
sendDebugPackets()
method_18409()
m_xozpkuaw()
sendAiDebugData()
sendAiDebugData()
public void
b(iu arg0)
startSleeping(BlockPos arg0)
method_18403(class_2338 arg0)
m_biowqfdg(C_hynzadkk arg0)
sleep(BlockPos arg0)
sleep(BlockPos arg0)
public void
fS()
stopSleeping()
method_18400()
m_redjlchk()
wakeUp()
wakeUp()
private boolean
b(long arg0)
golemSpawnConditionsMet(long arg0)
method_20741(long arg0)
m_cvtoctsp(long arg0)
hasRecentlySlept(long worldTime)
hasRecentlySlept(long worldTime)
public <T> T
a(ki<? extends T> arg0)
get(DataComponentType<? extends T> arg0)
method_58694(class_9331<? extends T> arg0)
m_jtdlrfwm(C_pscqxfcs<? extends T> arg0)
get(ComponentType<? extends T> arg0)
protected void
a(ke arg0)
applyImplicitComponents(DataComponentGetter arg0)
method_66649(class_9473 arg0)
m_oxfzjslk(C_hmcnusfu arg0)
copyComponentsFrom(ComponentsAccess arg0)
protected <T> boolean
b(ki<T> arg0, T arg1)
applyImplicitComponent(DataComponentType<T> arg0, T arg1)
method_66654(class_9331<T> arg0, T arg1)
m_vqawgcdu(C_pscqxfcs<T> arg0, T arg1)
setApplicableComponent(ComponentType<T> arg0, T arg1)