Skip to content

Commit

Permalink
Fix #19: use ChunkRegion random source instead of global World (not s…
Browse files Browse the repository at this point in the history
…afe from off-thread)
  • Loading branch information
Gegy committed Jun 8, 2024
1 parent d219158 commit 6f8622d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PiglinGen implements MapGen {
public void generate(ServerWorldAccess world, BlockPos pos, Random random) {
PiglinEntity piglin = new PiglinEntity(EntityType.PIGLIN, world.toServerWorld());
piglin.refreshPositionAndAngles(pos.getX(), pos.getY(), pos.getZ(), 0, 0);
piglin.initialize(world.toServerWorld(), world.getLocalDifficulty(pos), SpawnReason.CHUNK_GENERATION, null, null);
piglin.initialize(world, world.getLocalDifficulty(pos), SpawnReason.CHUNK_GENERATION, null, null);
world.spawnEntity(piglin);
}
}

0 comments on commit 6f8622d

Please sign in to comment.