net.minecraft.world.entity.npc

public class Villager

extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder

All mapped superinterfaces:

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

coj
net.minecraft.world.entity.npc.Villager
net.minecraft.class_1646
net.minecraft.entity.passive.VillagerEntity
net.minecraft.world.entity.npc.EntityVillager

Field summary

Modifier and TypeField
private static final org.slf4j.Logger
ce
LOGGER
field_36335
LOGGER
private static final EntityDataAccessor<VillagerData>
cf
DATA_VILLAGER_DATA
field_7445
VILLAGER_DATA
public static final int
ca
BREEDING_FOOD_THRESHOLD
field_30602
field_30602
public static final Map<Item, Integer>
cb
FOOD_POINTS
field_18526
ITEM_FOOD_VALUES
private static final int
cg
TRADES_PER_LEVEL
field_30604
field_30604
private static final int
ch
MAX_GOSSIP_TOPICS
field_30605
field_30605
private static final int
ci
GOSSIP_COOLDOWN
field_30606
field_30606
private static final int
cj
GOSSIP_DECAY_INTERVAL
field_30607
field_30607
private static final int
ck
HOW_FAR_AWAY_TO_TALK_TO_OTHER_VILLAGERS_ABOUT_GOLEMS
field_30609
field_30609
private static final int
cl
HOW_MANY_VILLAGERS_NEED_TO_AGREE_TO_SPAWN_A_GOLEM
field_30610
field_30610
private static final long
cm
TIME_SINCE_SLEEPING_FOR_GOLEM_SPAWNING
field_30611
field_30611
public static final float
cc
SPEED_MODIFIER
field_30603
field_30603
private int
cn
updateMerchantTimer
field_18528
levelUpTimer
private boolean
co
increaseProfessionLevelOnUpdate
field_18529
levelingUp
private Player
cp
lastTradedPlayer
field_18530
lastCustomer
private boolean
cq
chasing
field_30612
field_30612
private int
cr
foodLevel
field_18533
foodLevel
private final GossipContainer
cs
gossips
field_18534
gossip
private long
ct
lastGossipTime
field_18535
gossipStartTime
private long
cu
lastGossipDecayTime
field_19357
lastGossipDecayTime
private int
cv
villagerXp
field_18536
experience
private long
cw
lastRestockGameTime
field_18537
lastRestockTime
private int
cx
numberOfRestocksToday
field_19427
restocksToday
private long
cy
lastRestockCheckDayTime
field_20332
lastRestockCheckTime
private boolean
cz
assignProfessionWhenSpawned
field_25167
natural
private static final com.google.common.collect.ImmutableList<MemoryModuleType<?>>
cC
MEMORY_TYPES
field_18538
MEMORY_MODULES
private static final com.google.common.collect.ImmutableList<SensorType<? extends Sensor<? super Villager>>>
cD
SENSOR_TYPES
field_18539
SENSORS
public static final Map<MemoryModuleType<GlobalPos>, BiPredicate<Villager, Holder<PoiType>>>
cd
POI_MEMORIES
field_18851
POINTS_OF_INTEREST

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>
eb()
getBrain()
method_18868()
getBrain()
protected Brain$Provider<Villager>
ec()
brainProvider()
method_28306()
createBrainProfile()
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)
public void
g(ard arg0)
refreshBrain(ServerLevel arg0)
method_19179(class_3218 arg0)
reinitializeBrain(ServerWorld world)
private void
a(bwk<coj> arg0)
registerBrainGoals(Brain<Villager> arg0)
method_19174(class_4095<class_1646> arg0)
initBrain(Brain<VillagerEntity> brain)
protected void
i()
ageBoundaryReached()
method_5619()
onGrowUp()
public static AttributeSupplier$Builder
gB()
createAttributes()
method_26955()
createVillagerAttributes()
public boolean
gD()
assignProfessionWhenSpawned()
method_29279()
isNatural()
protected void
a(ard arg0)
customServerAiStep(ServerLevel arg0)
method_5958(class_3218 arg0)
mobTick(ServerWorld arg0)
public void
h()
tick()
method_5773()
tick()
public InteractionResult
b(coy arg0, bsk arg1)
mobInteract(Player arg0, InteractionHand arg1)
method_5992(class_1657 arg0, class_1268 arg1)
interactMob(PlayerEntity arg0, Hand arg1)
private void
gN()
setUnhappy()
method_20264()
sayNo()
private void
h(coy arg0)
startTrading(Player arg0)
method_19191(class_1657 arg0)
beginTradeWith(PlayerEntity customer)
public void
a(coy arg0)
setTradingPlayer(Player arg0)
method_8259(class_1657 arg0)
setCustomer(PlayerEntity arg0)
protected void
gy()
stopTrading()
method_19181()
resetCustomer()
private void
gO()
resetSpecialPrices()
method_19187()
clearSpecialPrices()
public boolean
gE()
canRestock()
method_20708()
canRefreshTrades()
public void
gF()
restock()
method_19182()
restock()
private void
gP()
resendOffersToTradingPlayer()
method_49695()
sendOffersToCustomer()
private boolean
gQ()
needsToRestock()
method_20823()
needsRestock()
private boolean
gR()
allowedToRestock()
method_20824()
canRestock()
public boolean
gG()
shouldRestock()
method_20822()
shouldRestock()
private void
gS()
catchUpDemand()
method_21723()
restockAndUpdateDemandBonus()
private void
gT()
updateDemand()
method_21724()
updateDemandBonus()
private void
i(coy arg0)
updateSpecialPrices(Player arg0)
method_19192(class_1657 arg0)
prepareOffersFor(PlayerEntity player)
protected void
a(akc$a arg0)
defineSynchedData(SynchedEntityData$Builder arg0)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
public void
b(tq arg0)
addAdditionalSaveData(CompoundTag arg0)
method_5652(class_2487 arg0)
writeCustomDataToNbt(NbtCompound arg0)
public void
a(tq arg0)
readAdditionalSaveData(CompoundTag arg0)
method_5749(class_2487 arg0)
readCustomDataFromNbt(NbtCompound arg0)
public boolean
h(double arg0)
removeWhenFarAway(double arg0)
method_5974(double arg0)
canImmediatelyDespawn(double arg0)
protected SoundEvent
u()
getAmbientSound()
method_5994()
getAmbientSound()
protected SoundEvent
e(btc arg0)
getHurtSound(DamageSource arg0)
method_6011(class_1282 arg0)
getHurtSound(DamageSource arg0)
protected SoundEvent
o_()
getDeathSound()
method_6002()
getDeathSound()
public void
gH()
playWorkSound()
method_19183()
playWorkSound()
public void
a(cok arg0)
setVillagerData(VillagerData arg0)
method_7195(class_3850 arg0)
setVillagerData(VillagerData arg0)
public VillagerData
gC()
getVillagerData()
method_7231()
getVillagerData()
protected void
b(dfg arg0)
rewardTradeXp(MerchantOffer arg0)
method_18008(class_1914 arg0)
afterUsing(TradeOffer arg0)
public void
a(bvi arg0)
setLastHurtByMob(LivingEntity arg0)
method_6015(class_1309 arg0)
setAttacker(LivingEntity arg0)
public void
a(btc arg0)
die(DamageSource arg0)
method_6078(class_1282 arg0)
onDeath(DamageSource arg0)
private void
gU()
releaseAllPois()
method_30958()
releaseAllTickets()
private void
b(bum arg0)
tellWitnessesThatIWasMurdered(Entity arg0)
method_20690(class_1297 arg0)
notifyDeath(Entity killer)
public void
a(cem<jq> arg0)
releasePoi(MemoryModuleType<GlobalPos> arg0)
method_19176(class_4140<class_4208> arg0)
releaseTicketFor(MemoryModuleType<GlobalPos> pos)
public boolean
X_()
canBreed()
method_19184()
isReadyToBreed()
private boolean
gV()
hungry()
method_20698()
lacksFood()
private void
gW()
eatUntilFull()
method_19185()
consumeAvailableFood()
public int
g(coy arg0)
getPlayerReputation(Player arg0)
method_20594(class_1657 arg0)
getReputation(PlayerEntity player)
private void
u(int arg0)
digestFood(int arg0)
method_19193(int arg0)
depleteFood(int amount)
public void
gI()
eatAndDigestFood()
method_20697()
eatForBreeding()
public void
b(dfh arg0)
setOffers(MerchantOffers arg0)
method_16917(class_1916 arg0)
setOffers(TradeOfferList offers)
private boolean
gX()
shouldIncreaseLevel()
method_19188()
canLevelUp()
private void
gY()
increaseMerchantCareer()
method_16918()
levelUp()
protected Component
cz()
getTypeName()
method_23315()
getDefaultName()
public void
b(byte arg0)
handleEntityEvent(byte arg0)
method_5711(byte arg0)
handleStatus(byte arg0)
public SpawnGroupData
a(dha arg0, bsj arg1, bus arg2, bwb arg3)
finalizeSpawn(ServerLevelAccessor arg0, DifficultyInstance arg1, EntitySpawnReason arg2, SpawnGroupData arg3)
method_5943(class_5425 arg0, class_1266 arg1, class_3730 arg2, class_1315 arg3)
initialize(ServerWorldAccess arg0, LocalDifficulty arg1, SpawnReason arg2, EntityData arg3)
public Villager
b(ard arg0, bud arg1)
getBreedOffspring(ServerLevel arg0, AgeableMob arg1)
method_7225(class_3218 arg0, class_1296 arg1)
createChild(ServerWorld arg0, PassiveEntity arg1)
public void
a(ard arg0, bvh arg1)
thunderHit(ServerLevel arg0, LightningBolt arg1)
method_5800(class_3218 arg0, class_1538 arg1)
onStruckByLightning(ServerWorld arg0, LightningEntity arg1)
protected void
a(ard arg0, cld arg1)
pickUpItem(ServerLevel arg0, ItemEntity arg1)
method_5949(class_3218 arg0, class_1542 arg1)
loot(ServerWorld arg0, ItemEntity arg1)
public boolean
c(ard arg0, cwq arg1)
wantsToPickUp(ServerLevel arg0, ItemStack arg1)
method_20820(class_3218 arg0, class_1799 arg1)
canGather(ServerWorld arg0, ItemStack arg1)
public boolean
gJ()
hasExcessFood()
method_7234()
wantsToStartBreeding()
public boolean
gK()
wantsMoreFood()
method_7239()
canBreed()
private int
gZ()
countFoodPointsInInventory()
method_19189()
getAvailableFood()
public boolean
gL()
hasFarmSeeds()
method_19623()
hasSeedToPlant()
protected void
gz()
updateTrades()
method_7237()
fillRecipes()
public void
a(ard arg0, coj arg1, long arg2)
gossip(ServerLevel arg0, Villager arg1, long arg2)
method_19177(class_3218 arg0, class_1646 arg1, long arg2)
talkWithVillager(ServerWorld world, VillagerEntity villager, long time)
private void
ha()
maybeDecayGossip()
method_20696()
decayGossip()
public void
a(ard arg0, long arg1, int arg2)
spawnGolemIfNeeded(ServerLevel arg0, long arg1, int arg2)
method_20688(class_3218 arg0, long arg1, int arg2)
summonGolem(ServerWorld world, long time, int requiredCount)
public boolean
a(long arg0)
wantsToSpawnGolem(long arg0)
method_20687(long arg0)
canSummonGolem(long time)
public void
a(cgj arg0, bum arg1)
onReputationEventFrom(ReputationEventType arg0, Entity arg1)
method_18870(class_4151 arg0, class_1297 arg1)
onInteractionWith(EntityInteraction arg0, Entity arg1)
public int
x()
getVillagerXp()
method_19269()
getExperience()
public void
t(int arg0)
setVillagerXp(int arg0)
method_19625(int arg0)
setExperience(int experience)
private void
hb()
resetNumberOfRestocks()
method_20821()
clearDailyRestockCount()
public GossipContainer
gM()
getGossips()
method_21651()
getGossip()
public void
a(un arg0)
setGossips(Tag arg0)
method_21650(class_2520 arg0)
readGossipDataNbt(NbtElement nbt)
protected void
ac()
sendDebugPackets()
method_18409()
sendAiDebugData()
public void
b(ji arg0)
startSleeping(BlockPos arg0)
method_18403(class_2338 arg0)
sleep(BlockPos arg0)
public void
fS()
stopSleeping()
method_18400()
wakeUp()
private boolean
b(long arg0)
golemSpawnConditionsMet(long arg0)
method_20741(long arg0)
hasRecentlySlept(long worldTime)