Package net.minecraft.world.entity.npc
Class WanderingTraderSpawner
java.lang.Object
net.minecraft.world.entity.npc.WanderingTraderSpawner
- All Implemented Interfaces:
CustomSpawner
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
private static int
private static int
private static int
private static int
private Random
private ServerLevelData
private static int
private static int
private int
private int
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate BlockPos
findSpawnPositionNear(LevelReader p_35929_, BlockPos p_35930_, int p_35931_)
private boolean
hasEnoughSpace(BlockGetter p_35926_, BlockPos p_35927_)
private boolean
spawn(ServerLevel p_35916_)
int
tick(ServerLevel p_35922_, boolean p_35923_, boolean p_35924_)
private void
tryToSpawnLlamaFor(ServerLevel p_35918_, WanderingTrader p_35919_, int p_35920_)
-
Field Details
-
DEFAULT_TICK_DELAY
private static final int DEFAULT_TICK_DELAY- See Also:
- Constant Field Values
-
DEFAULT_SPAWN_DELAY
public static final int DEFAULT_SPAWN_DELAY- See Also:
- Constant Field Values
-
MIN_SPAWN_CHANCE
private static final int MIN_SPAWN_CHANCE- See Also:
- Constant Field Values
-
MAX_SPAWN_CHANCE
private static final int MAX_SPAWN_CHANCE- See Also:
- Constant Field Values
-
SPAWN_CHANCE_INCREASE
private static final int SPAWN_CHANCE_INCREASE- See Also:
- Constant Field Values
-
SPAWN_ONE_IN_X_CHANCE
private static final int SPAWN_ONE_IN_X_CHANCE- See Also:
- Constant Field Values
-
NUMBER_OF_SPAWN_ATTEMPTS
private static final int NUMBER_OF_SPAWN_ATTEMPTS- See Also:
- Constant Field Values
-
random
-
serverLevelData
-
tickDelay
private int tickDelay -
spawnDelay
private int spawnDelay -
spawnChance
private int spawnChance
-
-
Constructor Details
-
WanderingTraderSpawner
-
-
Method Details
-
tick
- Specified by:
tick
in interfaceCustomSpawner
-
spawn
-
tryToSpawnLlamaFor
-
findSpawnPositionNear
@Nullable private BlockPos findSpawnPositionNear(LevelReader p_35929_, BlockPos p_35930_, int p_35931_) -
hasEnoughSpace
-