net.minecraft.world.entity.npc

public class Villager

extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder

All mapped superinterfaces:

Nameable, CommandSource, Npc, Merchant, ReputationEventHandler, VillagerDataHolder

bdp
net.minecraft.world.entity.npc.Villager
net.minecraft.class_1646
net.minecraft.entity.passive.VillagerEntity
net.minecraft.entity.merchant.villager.VillagerEntity
net.minecraft.server.v1_16_R1.EntityVillager

Field summary

Modifier and TypeField
private static final EntityDataAccessor<VillagerData>
by
DATA_VILLAGER_DATA
field_7445
VILLAGER_DATA
field_213775_bC
public static final Map<Item, Integer>
bw
FOOD_POINTS
field_18526
ITEM_FOOD_VALUES
field_213788_bA
private static final Set<Item>
bz
WANTED_ITEMS
field_18527
GATHERABLE_ITEMS
field_213776_bD
private int
bA
updateMerchantTimer
field_18528
levelUpTimer
field_70961_j
private boolean
bB
increaseProfessionLevelOnUpdate
field_18529
levelingUp
field_213777_bF
private Player
bC
lastTradedPlayer
field_18530
lastCustomer
field_213778_bG
private byte
bE
foodLevel
field_18533
foodLevel
field_213781_bL
private final GossipContainer
bF
gossips
field_18534
gossip
field_213782_bM
private long
bG
lastGossipTime
field_18535
gossipStartTime
field_213783_bN
private long
bH
lastGossipDecayTime
field_19357
lastGossipDecayTime
field_223362_bL
private int
bI
villagerXp
field_18536
experience
field_213784_bO
private long
bJ
lastRestockGameTime
field_18537
lastRestockTime
field_213785_bP
private int
bK
numberOfRestocksToday
field_19427
restocksToday
field_223725_bO
private long
bL
lastRestockCheckDayTime
field_20332
lastRestockCheckTime
field_223726_bP
private boolean
bM
assignProfessionWhenSpawned
field_25167
natural
field_234542_bL_
private static final com.google.common.collect.ImmutableList<MemoryModuleType<?>>
bN
MEMORY_TYPES
field_18538
MEMORY_MODULES
field_213786_bQ
private static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>>
bO
SENSOR_TYPES
field_18539
SENSORS
field_213787_bR
public static final Map<MemoryModuleType<GlobalPos>, BiPredicate<Villager, PoiType>>
bx
POI_MEMORIES
field_18851
POINTS_OF_INTEREST
field_213774_bB

Constructor summary

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

Method summary

Modifier and TypeMethod
public Brain<Villager>
cI()
getBrain()
method_18868()
getBrain()
func_213375_cj()
getBehaviorController()
protected Brain$Provider<Villager>
cJ()
brainProvider()
method_28306()
createBrainProfile()
func_230289_cH_()
protected Brain<?>
a(com.mojang.serialization.Dynamic<?> arg0)
makeBrain(com.mojang.serialization.Dynamic<?> arg0)
method_18867(com.mojang.serialization.Dynamic<?> arg0)
deserializeBrain(com.mojang.serialization.Dynamic<?> arg0)
func_213364_a(com.mojang.serialization.Dynamic<?> arg0)
public void
b(zd arg0)
refreshBrain(ServerLevel arg0)
method_19179(class_3218 arg0)
reinitializeBrain(ServerWorld world)
func_213770_a(ServerWorld arg0)
private void
a(apr<bdp> arg0)
registerBrainGoals(Brain<Villager> arg0)
method_19174(class_4095<class_1646> arg0)
initBrain(Brain<VillagerEntity> brain)
func_213744_a(Brain<VillagerEntity> arg0)
protected void
m()
ageBoundaryReached()
method_5619()
onGrowUp()
func_175500_n()
public static AttributeSupplier$Builder
eX()
createAttributes()
method_26955()
createVillagerAttributes()
func_234551_eU_()
public boolean
eZ()
assignProfessionWhenSpawned()
method_29279()
isNatural()
func_234552_eW_()
protected void
N()
customServerAiStep()
method_5958()
mobTick()
func_70619_bc()
mobTick()
public void
j()
tick()
method_5773()
tick()
func_70071_h_()
tick()
public InteractionResult
b(bec arg0, anf arg1)
mobInteract(Player arg0, InteractionHand arg1)
method_5992(class_1657 arg0, class_1268 arg1)
interactMob(PlayerEntity arg0, Hand arg1)
func_230254_b_(PlayerEntity arg0, Hand arg1)
private void
fk()
setUnhappy()
method_20264()
sayNo()
func_213756_es()
private void
h(bec arg0)
startTrading(Player arg0)
method_19191(class_1657 arg0)
beginTradeWith(PlayerEntity customer)
func_213740_f(PlayerEntity arg0)
public void
f(bec arg0)
setTradingPlayer(Player arg0)
method_8259(class_1657 arg0)
setCurrentCustomer(PlayerEntity arg0)
func_70932_a_(PlayerEntity arg0)
setTradingPlayer(EntityHuman arg0)
protected void
eT()
stopTrading()
method_19181()
resetCustomer()
func_213750_eg()
private void
fl()
resetSpecialPrices()
method_19187()
clearCurrentBonus()
func_213748_et()
public boolean
fa()
canRestock()
method_20708()
canRefreshTrades()
func_223340_ej()
public void
fb()
restock()
method_19182()
restock()
func_213766_ei()
private boolean
fm()
needsToRestock()
method_20823()
needRestock()
func_223723_ev()
private boolean
fn()
allowedToRestock()
method_20824()
canRestock()
func_223720_ew()
public boolean
fc()
shouldRestock()
method_20822()
shouldRestock()
func_223721_ek()
private void
fo()
catchUpDemand()
method_21723()
method_21723()
func_223719_ex()
private void
fp()
updateDemand()
method_21724()
updatePricesOnDemand()
func_223715_ey()
private void
i(bec arg0)
updateSpecialPrices(Player arg0)
method_19192(class_1657 arg0)
prepareRecipesFor(PlayerEntity player)
func_213762_g(PlayerEntity arg0)
protected void
e()
defineSynchedData()
method_5693()
initDataTracker()
func_70088_a()
initDatawatcher()
public void
b(le arg0)
addAdditionalSaveData(CompoundTag arg0)
method_5652(class_2487 arg0)
writeCustomDataToTag(CompoundTag arg0)
func_213281_b(CompoundNBT arg0)
saveData(NBTTagCompound arg0)
public void
a(le arg0)
readAdditionalSaveData(CompoundTag arg0)
method_5749(class_2487 arg0)
readCustomDataFromTag(CompoundTag arg0)
func_70037_a(CompoundNBT arg0)
loadData(NBTTagCompound arg0)
public boolean
h(double arg0)
removeWhenFarAway(double arg0)
method_5974(double arg0)
canImmediatelyDespawn(double arg0)
func_213397_c(double arg0)
isTypeNotPersistent(double arg0)
protected SoundEvent
I()
getAmbientSound()
method_5994()
getAmbientSound()
func_184639_G()
getSoundAmbient()
protected SoundEvent
e(anw arg0)
getHurtSound(DamageSource arg0)
method_6011(class_1282 arg0)
getHurtSound(DamageSource arg0)
func_184601_bQ(DamageSource arg0)
getSoundHurt(DamageSource arg0)
protected SoundEvent
dp()
getDeathSound()
method_6002()
getDeathSound()
func_184615_bR()
getSoundDeath()
public void
fd()
playWorkSound()
method_19183()
playWorkSound()
func_213767_ej()
public void
a(bdq arg0)
setVillagerData(VillagerData arg0)
method_7221(class_3850 arg0)
setVillagerData(VillagerData villagerData)
func_213753_a(VillagerData arg0)
setVillagerData(VillagerData arg0)
public VillagerData
eY()
getVillagerData()
method_7231()
getVillagerData()
func_213700_eh()
getVillagerData()
protected void
b(boz arg0)
rewardTradeXp(MerchantOffer arg0)
method_18008(class_1914 arg0)
afterUsing(TradeOffer arg0)
func_213713_b(MerchantOffer arg0)
public void
a(aoy arg0)
setLastHurtByMob(LivingEntity arg0)
method_6015(class_1309 arg0)
setAttacker(LivingEntity arg0)
func_70604_c(LivingEntity arg0)
setLastDamager(EntityLiving arg0)
public void
a(anw arg0)
die(DamageSource arg0)
method_6078(class_1282 arg0)
onDeath(DamageSource arg0)
func_70645_a(DamageSource arg0)
die(DamageSource arg0)
private void
a(aom arg0)
tellWitnessesThatIWasMurdered(Entity arg0)
method_20690(class_1297 arg0)
notifyDeath(Entity killer)
func_223361_a(Entity arg0)
public void
a(awp<gc> arg0)
releasePoi(MemoryModuleType<GlobalPos> arg0)
method_19176(class_4140<class_4208> arg0)
releaseTicketFor(MemoryModuleType<GlobalPos> arg0)
func_213742_a(MemoryModuleType<GlobalPos> arg0)
public boolean
f()
canBreed()
method_19184()
isReadyToBreed()
func_213743_em()
canBreed()
private boolean
fq()
hungry()
method_20698()
lacksFood()
func_223344_ex()
private void
fr()
eatUntilFull()
method_19185()
consumeAvailableFood()
func_213765_en()
public int
g(bec arg0)
getPlayerReputation(Player arg0)
method_20594(class_1657 arg0)
getReputation(PlayerEntity player)
func_223107_f(PlayerEntity arg0)
private void
v(int arg0)
digestFood(int arg0)
method_19193(int arg0)
depleteFood(int amount)
func_213758_s(int arg0)
public void
ff()
eatAndDigestFood()
method_20697()
eatForBreeding()
func_223346_ep()
public void
b(bpa arg0)
setOffers(MerchantOffers arg0)
method_16917(class_1916 arg0)
setOffers(TraderOfferList offers)
func_213768_b(MerchantOffers arg0)
private boolean
fs()
shouldIncreaseLevel()
method_19188()
canLevelUp()
func_213741_eu()
private void
ft()
increaseMerchantCareer()
method_16918()
levelUp()
func_175554_cu()
populateTrades()
protected Component
bF()
getTypeName()
method_23315()
getDefaultName()
func_225513_by_()
public SpawnGroupData
a(bqc arg0, ane arg1, apb arg2, apo arg3, le arg4)
finalizeSpawn(LevelAccessor arg0, DifficultyInstance arg1, MobSpawnType arg2, SpawnGroupData arg3, CompoundTag arg4)
method_5943(class_1936 arg0, class_1266 arg1, class_3730 arg2, class_1315 arg3, class_2487 arg4)
initialize(WorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3, CompoundTag arg4)
func_213386_a(IWorld arg0, DifficultyInstance arg1, SpawnReason arg2, ILivingEntityData arg3, CompoundNBT arg4)
prepare(GeneratorAccess arg0, DifficultyDamageScaler arg1, EnumMobSpawn arg2, GroupDataEntity arg3, NBTTagCompound arg4)
public Villager
b(aok arg0)
getBreedOffspring(AgableMob arg0)
method_7225(class_1296 arg0)
createChild(PassiveEntity arg0)
func_90011_a(AgeableEntity arg0)
createChild(EntityAgeable arg0)
public void
a(aox arg0)
thunderHit(LightningBolt arg0)
method_5800(class_1538 arg0)
onStruckByLightning(LightningEntity arg0)
func_70077_a(LightningBoltEntity arg0)
onLightningStrike(EntityLightning arg0)
protected void
b(bbg arg0)
pickUpItem(ItemEntity arg0)
method_5949(class_1542 arg0)
loot(ItemEntity arg0)
func_175445_a(ItemEntity arg0)
public boolean
i(bki arg0)
wantsToPickUp(ItemStack arg0)
method_20820(class_1799 arg0)
canGather(ItemStack arg0)
func_230293_i_(ItemStack arg0)
public boolean
fg()
hasExcessFood()
method_7234()
wantsToStartBreeding()
func_175555_cq()
public boolean
fh()
wantsMoreFood()
method_7239()
canBreed()
func_175557_cr()
private int
fu()
countFoodPointsInInventory()
method_19189()
getAvailableFood()
func_213751_ew()
public boolean
fi()
hasFarmSeeds()
method_19623()
hasSeedToPlant()
func_175556_cs()
canPlant()
protected void
eW()
updateTrades()
method_7237()
fillRecipes()
func_213712_ef()
public void
a(bdp arg0, long arg1)
gossip(Villager arg0, long arg1)
method_19177(class_1646 arg0, long arg1)
talkWithVillager(VillagerEntity villager, long time)
func_213746_a(VillagerEntity arg0, long arg1)
private void
fv()
maybeDecayGossip()
method_20696()
decayGossip()
func_223343_eC()
public void
a(long arg0, int arg1)
spawnGolemIfNeeded(long arg0, int arg1)
method_20688(long arg0, int arg1)
summonGolem(long time, int requiredVillagerCount)
func_223358_a(long arg0, int arg1)
private void
b(long arg0)
sawGolem(long arg0)
method_20692(long arg0)
setGolemLastSeenTime(long time)
func_223347_b(long arg0)
private boolean
c(long arg0)
hasSeenGolemRecently(long arg0)
method_20694(long arg0)
hasSeenGolemRecently(long currentTime)
func_223354_c(long arg0)
public boolean
a(long arg0)
wantsToSpawnGolem(long arg0)
method_20687(long arg0)
canSummonGolem(long time)
func_223350_a(long arg0)
private IronGolem
fw()
trySpawnGolem()
method_19190()
spawnIronGolem()
func_213759_ey()
private BlockPos
a(fu arg0, double arg1, double arg2)
findSpawnPositionForGolemInColumn(BlockPos arg0, double arg1, double arg2)
method_30023(class_2338 arg0, double arg1, double arg2)
method_30023(BlockPos arg0, double arg1, double arg2)
func_241433_a_(BlockPos arg0, double arg1, double arg2)
public void
a(axw arg0, aom arg1)
onReputationEventFrom(ReputationEventType arg0, Entity arg1)
method_18870(class_4151 arg0, class_1297 arg1)
onInteractionWith(EntityInteraction arg0, Entity arg1)
func_213739_a(IReputationType arg0, Entity arg1)
public int
eM()
getVillagerXp()
method_19269()
getExperience()
func_213708_dV()
getExperience()
public void
u(int arg0)
setVillagerXp(int arg0)
method_19625(int arg0)
setExperience(int amount)
func_213761_t(int arg0)
setExperience(int arg0)
private void
fx()
resetNumberOfRestocks()
method_20821()
clearDailyRestockCount()
func_223718_eH()
public GossipContainer
fj()
getGossips()
method_21651()
getGossip()
func_223722_es()
public void
a(lu arg0)
setGossips(Tag arg0)
method_21650(class_2520 arg0)
setGossipDataFromTag(Tag arg0)
func_223716_a(INBT arg0)
protected void
M()
sendDebugPackets()
method_18409()
sendAiDebugData()
func_213387_K()
public void
b(fu arg0)
startSleeping(BlockPos arg0)
method_18403(class_2338 arg0)
sleep(BlockPos arg0)
func_213342_e(BlockPos arg0)
entitySleep(BlockPosition arg0)
public void
em()
stopSleeping()
method_18400()
wakeUp()
func_213366_dy()
entityWakeup()
private boolean
d(long arg0)
golemSpawnConditionsMet(long arg0)
method_20741(long arg0)
hasRecentlyWorkedAndSlept(long worldTime)
func_223352_d(long arg0)
public void
a(byte arg0)
handleEntityEvent(byte arg0)
method_5711(byte arg0)
handleStatus(byte arg0)
func_70103_a(byte arg0)