net.minecraft.world.entity.npc

public abstract class AbstractVillager

extends AgeableMob implements InventoryCarrier, Npc, Merchant

All mapped superinterfaces:

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

coe
net.minecraft.world.entity.npc.AbstractVillager
net.minecraft.class_3988
net.minecraft.entity.passive.MerchantEntity
net.minecraft.world.entity.npc.EntityVillagerAbstract

Field summary

Modifier and TypeField
private static final EntityDataAccessor<Integer>
ca
DATA_UNHAPPY_COUNTER
field_19295
HEAD_ROLLING_TIME_LEFT
private static final org.slf4j.Logger
cb
LOGGER
field_48833
LOGGER
public static final int
bY
VILLAGER_SLOT_OFFSET
field_30599
field_30599
private static final int
cc
VILLAGER_INVENTORY_SIZE
field_30600
INVENTORY_SIZE
private Player
cd
tradingPlayer
field_17722
customer
protected MerchantOffers
bZ
offers
field_17721
offers
private final SimpleContainer
ce
inventory
field_17723
inventory

Constructor summary

ModifierConstructor
public (EntityType<? extends AbstractVillager> arg0, Level arg1)

Method summary

Modifier and TypeMethod
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 int
p()
getUnhappyCounter()
method_20506()
getHeadRollingTimeLeft()
public void
r(int arg0)
setUnhappyCounter(int arg0)
method_20507(int arg0)
setHeadRollingTimeLeft(int ticks)
public int
x()
getVillagerXp()
method_19269()
getExperience()
protected void
a(akc$a arg0)
defineSynchedData(SynchedEntityData$Builder arg0)
method_5693(class_2945$class_9222 arg0)
initDataTracker(DataTracker$Builder arg0)
public void
a(coy arg0)
setTradingPlayer(Player arg0)
method_8259(class_1657 arg0)
setCustomer(PlayerEntity arg0)
public Player
gs()
getTradingPlayer()
method_8257()
getCustomer()
public boolean
gt()
isTrading()
method_18009()
hasCustomer()
public MerchantOffers
gu()
getOffers()
method_8264()
getOffers()
public void
a(dfh arg0)
overrideOffers(MerchantOffers arg0)
method_8261(class_1916 arg0)
setOffersFromServer(TradeOfferList arg0)
public void
s(int arg0)
overrideXp(int arg0)
method_19271(int arg0)
setExperienceFromServer(int arg0)
public void
a(dfg arg0)
notifyTrade(MerchantOffer arg0)
method_8262(class_1914 arg0)
trade(TradeOffer arg0)
protected abstract void
b(dfg arg0)
rewardTradeXp(MerchantOffer arg0)
method_18008(class_1914 arg0)
afterUsing(TradeOffer offer)
public boolean
gv()
showProgressBar()
method_19270()
isLeveledMerchant()
public void
i(cwq arg0)
notifyTradeUpdated(ItemStack arg0)
method_8258(class_1799 arg0)
onSellingItem(ItemStack arg0)
public SoundEvent
gw()
getNotifyTradeSound()
method_18010()
getYesSound()
protected SoundEvent
x(boolean arg0)
getTradeUpdatedSound(boolean arg0)
method_18012(boolean arg0)
getTradingSound(boolean sold)
public void
gx()
playCelebrateSound()
method_20010()
playCelebrateSound()
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 Entity
b(eua arg0)
teleport(TeleportTransition arg0)
method_5731(class_5454 arg0)
teleportTo(TeleportTarget arg0)
protected void
gy()
stopTrading()
method_19181()
resetCustomer()
public void
a(btc arg0)
die(DamageSource arg0)
method_6078(class_1282 arg0)
onDeath(DamageSource arg0)
protected void
a(lr arg0)
addParticlesAroundSelf(ParticleOptions arg0)
method_18007(class_2394 arg0)
produceParticles(ParticleEffect parameters)
public boolean
y()
canBeLeashed()
method_5931()
canBeLeashed()
public SimpleContainer
t()
getInventory()
method_35199()
getInventory()
public SlotAccess
a_(int arg0)
getSlot(int arg0)
method_32318(int arg0)
getStackReference(int arg0)
protected abstract void
gz()
updateTrades()
method_7237()
fillRecipes()
protected void
a(dfh arg0, coo$g[] arg1, int arg2)
addOffersFromItemListings(MerchantOffers arg0, VillagerTrades$ItemListing[] arg1, int arg2)
method_19170(class_1916 arg0, class_3853$class_1652[] arg1, int arg2)
fillRecipesFromPool(TradeOfferList recipeList, TradeOffers$Factory[] pool, int count)
public Vec3
u(float arg0)
getRopeHoldPosition(float arg0)
method_30951(float arg0)
getLeashPos(float arg0)
public boolean
gA()
isClientSide()
method_38069()
isClient()
public boolean
f(coy arg0)
stillValid(Player arg0)
method_65125(class_1657 arg0)
canInteract(PlayerEntity arg0)