mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 02:35:49 +01:00
SPIGOT-6741: shouldGenerateStructures isn't implemented
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
parent
50d4716e9f
commit
65625f410c
1 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,7 @@ import java.util.concurrent.CompletableFuture;
|
|||
import java.util.concurrent.Executor;
|
||||
import net.minecraft.core.BlockPosition;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.core.IRegistryCustom;
|
||||
import net.minecraft.server.level.RegionLimitedWorldAccess;
|
||||
import net.minecraft.server.level.WorldServer;
|
||||
import net.minecraft.util.random.WeightedRandomList;
|
||||
|
@ -28,6 +29,7 @@ import net.minecraft.world.level.chunk.ProtoChunk;
|
|||
import net.minecraft.world.level.levelgen.HeightMap;
|
||||
import net.minecraft.world.level.levelgen.SeededRandom;
|
||||
import net.minecraft.world.level.levelgen.WorldGenStage;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureManager;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.craftbukkit.CraftHeightMap;
|
||||
import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
|
@ -100,6 +102,13 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||
return delegate.getSeaLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createStructures(IRegistryCustom iregistrycustom, StructureManager structuremanager, IChunkAccess ichunkaccess, DefinedStructureManager definedstructuremanager, long i) {
|
||||
if (generator.shouldGenerateStructures()) {
|
||||
super.createStructures(iregistrycustom, structuremanager, ichunkaccess, definedstructuremanager, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void buildBase(RegionLimitedWorldAccess regionlimitedworldaccess, IChunkAccess ichunkaccess) {
|
||||
if (generator.shouldGenerateSurface()) {
|
||||
|
|
Loading…
Reference in a new issue