类 WanderingTraderSpawner
java.lang.Object
net.minecraft.world.entity.npc.WanderingTraderSpawner
- 所有已实现的接口:
CustomSpawner
-
字段概要
字段修饰符和类型字段说明static final int
private static final int
private static final int
private static final int
private static final int
private final RandomSource
private final ServerLevelData
private static final int
private static final int
private int
private int
private int
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private BlockPos
findSpawnPositionNear
(LevelReader pLevel, BlockPos pPos, int pMaxDistance) private boolean
hasEnoughSpace
(BlockGetter pLevel, BlockPos pPos) private boolean
spawn
(ServerLevel pServerLevel) int
tick
(ServerLevel pLevel, boolean pSpawnHostiles, boolean pSpawnPassives) private void
tryToSpawnLlamaFor
(ServerLevel pServerLevel, WanderingTrader pTrader, int pMaxDistance)
-
字段详细资料
-
DEFAULT_TICK_DELAY
private static final int DEFAULT_TICK_DELAY- 另请参阅:
-
DEFAULT_SPAWN_DELAY
public static final int DEFAULT_SPAWN_DELAY- 另请参阅:
-
MIN_SPAWN_CHANCE
private static final int MIN_SPAWN_CHANCE- 另请参阅:
-
MAX_SPAWN_CHANCE
private static final int MAX_SPAWN_CHANCE- 另请参阅:
-
SPAWN_CHANCE_INCREASE
private static final int SPAWN_CHANCE_INCREASE- 另请参阅:
-
SPAWN_ONE_IN_X_CHANCE
private static final int SPAWN_ONE_IN_X_CHANCE- 另请参阅:
-
NUMBER_OF_SPAWN_ATTEMPTS
private static final int NUMBER_OF_SPAWN_ATTEMPTS- 另请参阅:
-
random
-
serverLevelData
-
tickDelay
private int tickDelay -
spawnDelay
private int spawnDelay -
spawnChance
private int spawnChance
-
-
构造器详细资料
-
WanderingTraderSpawner
-
-
方法详细资料
-
tick
- 指定者:
tick
在接口中CustomSpawner
-
spawn
-
tryToSpawnLlamaFor
private void tryToSpawnLlamaFor(ServerLevel pServerLevel, WanderingTrader pTrader, int pMaxDistance) -
findSpawnPositionNear
@Nullable private BlockPos findSpawnPositionNear(LevelReader pLevel, BlockPos pPos, int pMaxDistance) -
hasEnoughSpace
-