Package net.minecraft.world.spawner
Class WanderingTraderSpawner
- java.lang.Object
-
- net.minecraft.world.spawner.WanderingTraderSpawner
-
- All Implemented Interfaces:
ISpecialSpawner
public class WanderingTraderSpawner extends java.lang.Object implements ISpecialSpawner
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Random
random
private IServerWorldInfo
serverLevelData
private int
spawnChance
private int
spawnDelay
private int
tickDelay
-
Constructor Summary
Constructors Constructor Description WanderingTraderSpawner(IServerWorldInfo p_i231576_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private BlockPos
findSpawnPositionNear(IWorldReader p_234561_1_, BlockPos p_234561_2_, int p_234561_3_)
private boolean
hasEnoughSpace(IBlockReader p_234560_1_, BlockPos p_234560_2_)
private boolean
spawn(ServerWorld p_234562_1_)
int
tick(ServerWorld p_230253_1_, boolean p_230253_2_, boolean p_230253_3_)
private void
tryToSpawnLlamaFor(ServerWorld p_242373_1_, WanderingTraderEntity p_242373_2_, int p_242373_3_)
-
-
-
Field Detail
-
random
private final java.util.Random random
-
serverLevelData
private final IServerWorldInfo serverLevelData
-
tickDelay
private int tickDelay
-
spawnDelay
private int spawnDelay
-
spawnChance
private int spawnChance
-
-
Constructor Detail
-
WanderingTraderSpawner
public WanderingTraderSpawner(IServerWorldInfo p_i231576_1_)
-
-
Method Detail
-
tick
public int tick(ServerWorld p_230253_1_, boolean p_230253_2_, boolean p_230253_3_)
- Specified by:
tick
in interfaceISpecialSpawner
-
spawn
private boolean spawn(ServerWorld p_234562_1_)
-
tryToSpawnLlamaFor
private void tryToSpawnLlamaFor(ServerWorld p_242373_1_, WanderingTraderEntity p_242373_2_, int p_242373_3_)
-
findSpawnPositionNear
@Nullable private BlockPos findSpawnPositionNear(IWorldReader p_234561_1_, BlockPos p_234561_2_, int p_234561_3_)
-
hasEnoughSpace
private boolean hasEnoughSpace(IBlockReader p_234560_1_, BlockPos p_234560_2_)
-
-