mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Remove unused seed in CustomChunkGenerator
This commit is contained in:
parent
8a66d4c7ac
commit
d70084e53d
2 changed files with 3 additions and 7 deletions
|
@ -34,7 +34,7 @@
|
||||||
+ ChunkGenerator<?> chunkGenerator;
|
+ ChunkGenerator<?> chunkGenerator;
|
||||||
+
|
+
|
||||||
+ if (gen != null) {
|
+ if (gen != null) {
|
||||||
+ chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(world, world.getSeed(), gen);
|
+ chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(world, gen);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ chunkGenerator = worldprovider.getChunkGenerator();
|
+ chunkGenerator = worldprovider.getChunkGenerator();
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -41,8 +41,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin
|
||||||
private final net.minecraft.server.ChunkGenerator delegate;
|
private final net.minecraft.server.ChunkGenerator delegate;
|
||||||
private final ChunkGenerator generator;
|
private final ChunkGenerator generator;
|
||||||
private final WorldServer world;
|
private final WorldServer world;
|
||||||
private final long seed;
|
private final Random random = new Random();
|
||||||
private final Random random;
|
|
||||||
|
|
||||||
private class CustomBiomeGrid implements BiomeGrid {
|
private class CustomBiomeGrid implements BiomeGrid {
|
||||||
|
|
||||||
|
@ -75,7 +74,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CustomChunkGenerator(World world, long seed, ChunkGenerator generator) {
|
public CustomChunkGenerator(World world, ChunkGenerator generator) {
|
||||||
super(world, world.worldProvider.getChunkGenerator().getWorldChunkManager(), new GeneratorSettingsDefault());
|
super(world, world.worldProvider.getChunkGenerator().getWorldChunkManager(), new GeneratorSettingsDefault());
|
||||||
switch (world.getWorld().getEnvironment()) {
|
switch (world.getWorld().getEnvironment()) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
|
@ -93,9 +92,6 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin
|
||||||
|
|
||||||
this.world = (WorldServer) world;
|
this.world = (WorldServer) world;
|
||||||
this.generator = generator;
|
this.generator = generator;
|
||||||
this.seed = seed;
|
|
||||||
|
|
||||||
this.random = new Random(seed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue