net.minecraft.world.entity.npc

public class Villager

extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder

All mapped superinterfaces:

Nameable, EntityAccess, CommandSource, ScoreHolder, Attackable, Targeting, InventoryCarrier, Npc, Merchant, ReputationEventHandler, VillagerDataHolder, VariantHolder

cev
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
net.minecraft.src.C_1118_
net.minecraft.world.entity.npc.EntityVillager

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
bZ
LOGGER
field_36335
f_zxhrpcmq
LOGGER
LOGGER
f_201976_
private static final EntityDataAccessor<VillagerData>
ca
DATA_VILLAGER_DATA
field_7445
f_xisxjtqv
VILLAGER_DATA
VILLAGER_DATA
f_35371_
public static final int
bV
BREEDING_FOOD_THRESHOLD
field_30602
f_epcheowx
field_30602
BREEDING_FOOD_REQUIRED
f_149997_
public static final Map<Item, Integer>
bW
FOOD_POINTS
field_18526
f_jhoygheo
ITEM_FOOD_VALUES
ITEM_FOOD_VALUES
f_35369_
private static final int
cb
TRADES_PER_LEVEL
field_30604
f_aruxtchf
field_30604
TRADE_OFFERS_PER_LEVEL
f_149999_
private static final Set<Item>
cc
WANTED_ITEMS
field_18527
f_ropiktzr
GATHERABLE_ITEMS
GATHERABLE_ITEMS
f_35372_
private static final int
cd
MAX_GOSSIP_TOPICS
field_30605
f_lkhjiicp
field_30605
MAX_GOSSIP_TOPICS
f_150000_
private static final int
ce
GOSSIP_COOLDOWN
field_30606
f_usmdemxw
field_30606
GOSSIP_COOLDOWN
f_150001_
private static final int
cf
GOSSIP_DECAY_INTERVAL
field_30607
f_qjglwcyl
field_30607
GOSSIP_DECAY_INTERVAL
f_150002_
private static final int
cg
REPUTATION_CHANGE_PER_EVENT
field_30608
f_xrfjtwgp
field_30608
REPUTATION_CHANGE_PER_EVENT
f_150003_
private static final int
ch
HOW_FAR_AWAY_TO_TALK_TO_OTHER_VILLAGERS_ABOUT_GOLEMS
field_30609
f_dzkfxuwi
field_30609
GOLEM_COMMUNICATION_DISTANCE
f_150004_
private static final int
ci
HOW_MANY_VILLAGERS_NEED_TO_AGREE_TO_SPAWN_A_GOLEM
field_30610
f_gklaoynw
field_30610
GOLEM_SPAWN_REQUIRED_AGREEING_VILLAGERS
f_150005_
private static final long
cj
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING
field_30611
f_fhqkkbxb
field_30611
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING
f_150006_
public static final float
bX
SPEED_MODIFIER
field_30603
f_opllnkeh
field_30603
SPEED_MODIFIER
f_149998_
private int
ck
updateMerchantTimer
field_18528
f_tafdryps
levelUpTimer
levelUpTimer
f_35373_
private boolean
cl
increaseProfessionLevelOnUpdate
field_18529
f_qlajekfm
levelingUp
levelingUp
f_35374_
private Player
cm
lastTradedPlayer
field_18530
f_xbuwxivj
lastCustomer
lastCustomer
f_35375_
private boolean
cn
chasing
field_30612
f_mnprlolx
field_30612
chasing
f_150007_
private int
co
foodLevel
field_18533
f_gxkrfvtt
foodLevel
foodLevel
f_35376_
private final GossipContainer
cp
gossips
field_18534
f_yutmdxcy
gossip
gossip
f_35377_
private long
cq
lastGossipTime
field_18535
f_aoqjlzkd
gossipStartTime
gossipStartTime
f_35378_
private long
cr
lastGossipDecayTime
field_19357
f_sbabdvav
lastGossipDecayTime
lastGossipDecayTime
f_35361_
private int
cs
villagerXp
field_18536
f_aweloyby
experience
experience
f_35362_
private long
ct
lastRestockGameTime
field_18537
f_audpvcxh
lastRestockTime
lastRestockTime
f_35363_
private int
cu
numberOfRestocksToday
field_19427
f_ounqokay
restocksToday
restocksToday
f_35364_
private long
cw
lastRestockCheckDayTime
field_20332
f_suhwvkte
lastRestockCheckTime
lastRestockCheckTime
f_35365_
private boolean
cx
assignProfessionWhenSpawned
field_25167
f_bferfmkz
natural
natural
f_35366_
private static final com.google.common.collect.ImmutableList<MemoryModuleType<?>>
cy
MEMORY_TYPES
field_18538
f_ahngdmuc
MEMORY_MODULES
MEMORY_MODULES
f_35367_
private static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>>
cz
SENSOR_TYPES
field_18539
f_hfjucsil
SENSORS
SENSORS
f_35368_
public static final Map<MemoryModuleType<GlobalPos>, BiPredicate<Villager, Holder<PoiType>>>
bY
POI_MEMORIES
field_18851
f_mqjxuzni
POINTS_OF_INTEREST
POINTS_OF_INTEREST
f_35370_

Constructor summary

ModifierConstructor
public (EntityType<? extends Villager> p_35382_, Level arg1)
public (EntityType<? extends Villager> entityType, Level world, VillagerType type)

Method summary

Modifier and TypeMethod
public Brain<Villager>
dO()
getBrain()
method_18868()
m_hobjxuks()
getBrain()
getBrain()
m_6274_()
protected Brain$Provider<Villager>
dP()
brainProvider()
method_28306()
m_pusvfpox()
createBrainProfile()
createBrainProfile()
m_5490_()
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)
m_8075_(com.mojang.serialization.Dynamic<?> arg0)
public void
c(and arg0)
refreshBrain(ServerLevel arg0)
method_19179(class_3218 arg0)
m_nxfvdvix(C_bdwnwhiu arg0)
reinitializeBrain(ServerWorld world)
reinitializeBrain(ServerWorld world)
m_35483_(C_12_ arg0)
private void
a(bnl<cev> 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)
m_35424_(C_548_<C_1118_> arg0)
protected void
m()
ageBoundaryReached()
method_5619()
m_xdpbetzz()
onGrowUp()
onGrowUp()
m_30232_()
public static AttributeSupplier$Builder
gn()
createAttributes()
method_26955()
m_hdwuynny()
createVillagerAttributes()
createAttributes()
m_35503_()
public boolean
go()
assignProfessionWhenSpawned()
method_29279()
m_mjduxnka()
isNatural()
isNatural()
m_35504_()
protected void
Z()
customServerAiStep()
method_5958()
m_wbeiezxn()
mobTick()
mobTick()
m_8024_()
public void
l()
tick()
method_5773()
m_arkgrfeb()
tick()
tick()
m_8119_()
public InteractionResult
b(cfi arg0, bka 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)
m_6071_(C_1141_ p_35473_, C_470_ arg1)
private void
gA()
setUnhappy()
method_20264()
m_znfujvep()
sayNo()
sayNo()
m_35518_()
private void
h(cfi arg0)
startTrading(Player arg0)
method_19191(class_1657 arg0)
m_zuttxskq(C_jzrpycqo arg0)
beginTradeWith(PlayerEntity customer)
beginTradeWith(PlayerEntity customer)
m_35536_(C_1141_ arg0)
public void
f(cfi arg0)
setTradingPlayer(Player arg0)
method_8259(class_1657 arg0)
m_hlreeqnr(C_jzrpycqo arg0)
setCustomer(PlayerEntity arg0)
setCurrentCustomer(PlayerEntity arg0)
m_7189_(C_1141_ arg0)
protected void
gk()
stopTrading()
method_19181()
m_hpfqnnmn()
resetCustomer()
resetCustomer()
m_7996_()
private void
gB()
resetSpecialPrices()
method_19187()
m_dnarwtec()
clearSpecialPrices()
clearSpecialPrices()
m_35519_()
public boolean
gq()
canRestock()
method_20708()
m_bvoaaumq()
canRefreshTrades()
canRefreshTrades()
m_7862_()
public boolean
gm()
isClientSide()
method_38069()
m_cmgdubfr()
isClient()
isClient()
m_183595_()
public void
gr()
restock()
method_19182()
m_cwatgxjj()
restock()
restock()
m_35510_()
private void
gC()
resendOffersToTradingPlayer()
method_49695()
m_czadnfrf()
sendOffersToCustomer()
updateTradeOffers()
m_275846_()
private boolean
gD()
needsToRestock()
method_20823()
m_rftgjnmb()
needsRestock()
needsRestock()
m_35520_()
private boolean
gE()
allowedToRestock()
method_20824()
m_kqnyepur()
canRestock()
canRestock()
m_35521_()
public boolean
gs()
shouldRestock()
method_20822()
m_zghwxgpj()
shouldRestock()
shouldRestock()
m_35511_()
private void
gF()
catchUpDemand()
method_21723()
m_xdqprxfh()
restockAndUpdateDemandBonus()
restockAndUpdateDemandBonus()
m_35522_()
private void
gG()
updateDemand()
method_21724()
m_mpxabify()
updateDemandBonus()
updateDemandBonus()
m_35523_()
private void
i(cfi arg0)
updateSpecialPrices(Player arg0)
method_19192(class_1657 arg0)
m_wpijqmum(C_jzrpycqo arg0)
prepareOffersFor(PlayerEntity player)
prepareOffersFor(PlayerEntity player)
m_35540_(C_1141_ arg0)
protected void
c_()
defineSynchedData()
method_5693()
m_lwugwlsw()
initDataTracker()
initDataTracker()
m_8097_()
public void
b(sn arg0)
addAdditionalSaveData(CompoundTag arg0)
method_5652(class_2487 arg0)
m_xuwbpohg(C_hhlwcnih arg0)
writeCustomDataToNbt(NbtCompound arg0)
writeCustomDataToNbt(NbtCompound arg0)
m_7380_(C_4917_ arg0)
public void
a(sn arg0)
readAdditionalSaveData(CompoundTag arg0)
method_5749(class_2487 arg0)
m_obkzfysl(C_hhlwcnih arg0)
readCustomDataFromNbt(NbtCompound arg0)
readCustomDataFromNbt(NbtCompound arg0)
m_7378_(C_4917_ arg0)
public boolean
h(double arg0)
removeWhenFarAway(double arg0)
method_5974(double arg0)
m_dciqpbdm(double arg0)
canImmediatelyDespawn(double arg0)
canImmediatelyDespawn(double arg0)
m_6785_(double arg0)
protected SoundEvent
y()
getAmbientSound()
method_5994()
m_jjefzxbm()
getAmbientSound()
getAmbientSound()
m_7515_()
protected SoundEvent
d(bkt arg0)
getHurtSound(DamageSource arg0)
method_6011(class_1282 arg0)
m_spwwmdyl(C_sbxfkpyv arg0)
getHurtSound(DamageSource arg0)
getHurtSound(DamageSource arg0)
m_7975_(C_489_ arg0)
protected SoundEvent
n_()
getDeathSound()
method_6002()
m_axkhmdzu()
getDeathSound()
getDeathSound()
m_5592_()
public void
gt()
playWorkSound()
method_19183()
m_jjwcuxsi()
playWorkSound()
playWorkSound()
m_35512_()
public void
a(cew arg0)
setVillagerData(VillagerData arg0)
method_7195(class_3850 arg0)
m_jidjtpvm(C_zuqrzrur arg0)
setVillagerData(VillagerData arg0)
setVillagerData(VillagerData arg0)
m_34375_(C_1119_ arg0)
public VillagerData
gp()
getVillagerData()
method_7231()
m_ulhthoau()
getVillagerData()
getVillagerData()
m_7141_()
protected void
b(csn arg0)
rewardTradeXp(MerchantOffer arg0)
method_18008(class_1914 arg0)
m_iabllljm(C_argwryfu arg0)
afterUsing(TradeOffer arg0)
afterUsing(TradeOffer arg0)
m_8058_(C_1551_ arg0)
public void
x(boolean arg0)
setChasing(boolean arg0)
method_35201(boolean arg0)
m_smnfodbw(boolean arg0)
method_35201(boolean arg0)
setChasing(boolean chasing)
m_150015_(boolean arg0)
public boolean
gu()
isChasing()
method_35200()
m_sdetmvzj()
method_35200()
isChasing()
m_150014_()
public void
a(bml arg0)
setLastHurtByMob(LivingEntity arg0)
method_6015(class_1309 arg0)
m_fqffmeys(C_usxaxydn arg0)
setAttacker(LivingEntity arg0)
setAttacker(LivingEntity arg0)
m_6703_(C_524_ arg0)
public void
a(bkt arg0)
die(DamageSource arg0)
method_6078(class_1282 arg0)
m_tflzijcx(C_sbxfkpyv arg0)
onDeath(DamageSource arg0)
onDeath(DamageSource arg0)
m_6667_(C_489_ arg0)
private void
gH()
releaseAllPois()
method_30958()
m_wptaprwe()
releaseAllTickets()
releaseAllTickets()
m_35524_()
private void
a(blv arg0)
tellWitnessesThatIWasMurdered(Entity arg0)
method_20690(class_1297 arg0)
m_otzexgpv(C_astfners arg0)
notifyDeath(Entity killer)
notifyDeath(Entity killer)
m_35420_(C_507_ arg0)
public void
a(bvn<ig> 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)
m_35428_(C_753_<C_4697_> arg0)
public boolean
Y_()
canBreed()
method_19184()
m_qxlffuwy()
isReadyToBreed()
isReadyToBreed()
m_35506_()
private boolean
gI()
hungry()
method_20698()
m_pwctnevz()
lacksFood()
lacksFood()
m_35525_()
private void
gJ()
eatUntilFull()
method_19185()
m_uyreuuxj()
consumeAvailableFood()
consumeAvailableFood()
m_35526_()
public int
g(cfi arg0)
getPlayerReputation(Player arg0)
method_20594(class_1657 arg0)
m_vvktbnvx(C_jzrpycqo arg0)
getReputation(PlayerEntity player)
getReputation(PlayerEntity player)
m_35532_(C_1141_ arg0)
private void
v(int arg0)
digestFood(int arg0)
method_19193(int arg0)
m_dnuarqhe(int arg0)
depleteFood(int amount)
depleteFood(int amount)
m_35548_(int arg0)
public void
gv()
eatAndDigestFood()
method_20697()
m_adawsril()
eatForBreeding()
eatForBreeding()
m_35513_()
public void
b(cso arg0)
setOffers(MerchantOffers arg0)
method_16917(class_1916 arg0)
m_hnipyvgh(C_eygsjfgm arg0)
setOffers(TradeOfferList offers)
setOffers(TradeOfferList offers)
m_35476_(C_1552_ arg0)
private boolean
gK()
shouldIncreaseLevel()
method_19188()
m_clijlzqy()
canLevelUp()
canLevelUp()
m_35527_()
private void
gL()
increaseMerchantCareer()
method_16918()
m_llrjmaju()
levelUp()
levelUp()
m_35528_()
protected Component
co()
getTypeName()
method_23315()
m_jvbeeoym()
getDefaultName()
getDefaultName()
m_5677_()
public void
b(byte arg0)
handleEntityEvent(byte arg0)
method_5711(byte arg0)
m_kkieextx(byte arg0)
handleStatus(byte arg0)
handleStatus(byte arg0)
m_7822_(byte arg0)
public SpawnGroupData
a(cue arg0, bjz arg1, bmp arg2, bne arg3, sn arg4)
finalizeSpawn(ServerLevelAccessor arg0, DifficultyInstance arg1, MobSpawnType arg2, SpawnGroupData arg3, CompoundTag arg4)
method_5943(class_5425 arg0, class_1266 arg1, class_3730 arg2, class_1315 arg3, class_2487 arg4)
m_oxrxxqyz(C_jmnzlycd arg0, C_jiailwzt arg1, C_uzzvxofv arg2, C_lsmqixfx arg3, C_hhlwcnih arg4)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3, NbtCompound arg4)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3, NbtCompound arg4)
m_6518_(C_1618_ p_35440_, C_469_ p_35441_, C_529_ p_35442_, C_542_ p_35443_, C_4917_ arg4)
public Villager
b(and arg0, blq 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 arg0, PassiveEntity arg1)
m_142606_(C_12_ p_150013_, C_141062_ arg1)
public void
a(and arg0, bmk 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)
m_8038_(C_12_ p_35410_, C_523_ arg1)
protected void
b(cbu arg0)
pickUpItem(ItemEntity arg0)
method_5949(class_1542 arg0)
m_avgkrrey(C_uqpzijng arg0)
loot(ItemEntity arg0)
loot(ItemEntity arg0)
m_7581_(C_976_ arg0)
public boolean
k(cmy arg0)
wantsToPickUp(ItemStack arg0)
method_20820(class_1799 arg0)
m_nzdowltt(C_sddaxwyk arg0)
canGather(ItemStack arg0)
canGather(ItemStack arg0)
m_7243_(C_1391_ arg0)
public boolean
gw()
hasExcessFood()
method_7234()
m_tawsehpr()
wantsToStartBreeding()
wantsToStartBreeding()
m_35514_()
public boolean
gx()
wantsMoreFood()
method_7239()
m_vtyepvne()
canBreed()
canBreed()
m_35515_()
private int
gM()
countFoodPointsInInventory()
method_19189()
m_pagkeccz()
getAvailableFood()
getAvailableFood()
m_35529_()
public boolean
gy()
hasFarmSeeds()
method_19623()
m_nhfaurjc()
hasSeedToPlant()
hasSeedToPlant()
m_35516_()
protected void
gl()
updateTrades()
method_7237()
m_dnvdzaow()
fillRecipes()
fillRecipes()
m_7604_()
public void
a(and arg0, cev 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)
m_35411_(C_12_ p_35413_, C_1118_ p_35414_, long arg2)
private void
gN()
maybeDecayGossip()
method_20696()
m_yuvzulud()
decayGossip()
decayGossip()
m_35530_()
public void
a(and 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)
m_35397_(C_12_ p_35399_, long p_35400_, int arg2)
public boolean
a(long arg0)
wantsToSpawnGolem(long arg0)
method_20687(long arg0)
m_nxwgfbdy(long arg0)
canSummonGolem(long time)
canSummonGolem(long time)
m_35392_(long arg0)
public void
a(bxj arg0, blv 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)
m_6814_(C_783_ p_35432_, C_507_ arg1)
public int
w()
getVillagerXp()
method_19269()
m_lowowysu()
getExperience()
getExperience()
m_7809_()
public void
u(int arg0)
setVillagerXp(int arg0)
method_19625(int arg0)
m_haedgvxm(int arg0)
setExperience(int experience)
setExperience(int amount)
m_35546_(int arg0)
private void
gO()
resetNumberOfRestocks()
method_20821()
m_ohxwrhdt()
clearDailyRestockCount()
clearDailyRestockCount()
m_35531_()
public GossipContainer
gz()
getGossips()
method_21651()
m_lebhfnus()
getGossip()
getGossip()
m_35517_()
public void
a(tk arg0)
setGossips(Tag arg0)
method_21650(class_2520 arg0)
m_xgtnqlqm(C_oivssbvb arg0)
readGossipDataNbt(NbtElement nbt)
readGossipDataNbt(NbtElement arg0)
m_35455_(C_4950_ arg0)
protected void
Y()
sendDebugPackets()
method_18409()
m_xozpkuaw()
sendAiDebugData()
sendAiDebugData()
m_8025_()
public void
b(hx arg0)
startSleeping(BlockPos arg0)
method_18403(class_2338 arg0)
m_biowqfdg(C_hynzadkk arg0)
sleep(BlockPos arg0)
sleep(BlockPos arg0)
m_5802_(C_4675_ arg0)
public void
fE()
stopSleeping()
method_18400()
m_redjlchk()
wakeUp()
wakeUp()
m_5796_()
private boolean
b(long arg0)
golemSpawnConditionsMet(long arg0)
method_20741(long arg0)
m_cvtoctsp(long arg0)
hasRecentlySlept(long worldTime)
hasRecentlySlept(long worldTime)
m_35461_(long arg0)