Package net.minecraft.world.entity.npc
Class WanderingTraderSpawner
java.lang.Object
net.minecraft.world.entity.npc.WanderingTraderSpawner
- All Implemented Interfaces:
- CustomSpawner
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intprivate static final intprivate static final intprivate static final intprivate static final intprivate final RandomSourceprivate final ServerLevelDataprivate static final intprivate static final intprivate intprivate intprivate int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate BlockPosfindSpawnPositionNear(LevelReader p_35929_, BlockPos p_35930_, int p_35931_) private booleanhasEnoughSpace(BlockGetter p_35926_, BlockPos p_35927_) private booleanspawn(ServerLevel p_35916_) inttick(ServerLevel p_35922_, boolean p_35923_, boolean p_35924_) private voidtryToSpawnLlamaFor(ServerLevel p_35918_, WanderingTrader p_35919_, int p_35920_) 
- 
Field Details- 
DEFAULT_TICK_DELAYprivate static final int DEFAULT_TICK_DELAY- See Also:
 
- 
DEFAULT_SPAWN_DELAYpublic static final int DEFAULT_SPAWN_DELAY- See Also:
 
- 
MIN_SPAWN_CHANCEprivate static final int MIN_SPAWN_CHANCE- See Also:
 
- 
MAX_SPAWN_CHANCEprivate static final int MAX_SPAWN_CHANCE- See Also:
 
- 
SPAWN_CHANCE_INCREASEprivate static final int SPAWN_CHANCE_INCREASE- See Also:
 
- 
SPAWN_ONE_IN_X_CHANCEprivate static final int SPAWN_ONE_IN_X_CHANCE- See Also:
 
- 
NUMBER_OF_SPAWN_ATTEMPTSprivate static final int NUMBER_OF_SPAWN_ATTEMPTS- See Also:
 
- 
random
- 
serverLevelData
- 
tickDelayprivate int tickDelay
- 
spawnDelayprivate int spawnDelay
- 
spawnChanceprivate int spawnChance
 
- 
- 
Constructor Details- 
WanderingTraderSpawner
 
- 
- 
Method Details- 
tick- Specified by:
- tickin interface- CustomSpawner
 
- 
spawn
- 
tryToSpawnLlamaFor
- 
findSpawnPositionNear@Nullable private BlockPos findSpawnPositionNear(LevelReader p_35929_, BlockPos p_35930_, int p_35931_) 
- 
hasEnoughSpace
 
-