13
0
geforkt von Mirrors/Paper

SPIGOT-6220: Structures in the world with custom generator not work

By: DerFrZocker <derrieple@gmail.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2021-08-01 08:26:30 +10:00
Ursprung fa9a064a7d
Commit aab97ffee0

Datei anzeigen

@ -10,6 +10,8 @@ import net.minecraft.core.IRegistry;
import net.minecraft.core.IRegistryCustom; import net.minecraft.core.IRegistryCustom;
import net.minecraft.server.level.RegionLimitedWorldAccess; import net.minecraft.server.level.RegionLimitedWorldAccess;
import net.minecraft.server.level.WorldServer; import net.minecraft.server.level.WorldServer;
import net.minecraft.util.random.WeightedRandomList;
import net.minecraft.world.entity.EnumCreatureType;
import net.minecraft.world.level.BlockColumn; import net.minecraft.world.level.BlockColumn;
import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.GeneratorAccess;
import net.minecraft.world.level.GeneratorAccessSeed; import net.minecraft.world.level.GeneratorAccessSeed;
@ -18,6 +20,7 @@ import net.minecraft.world.level.LevelHeightAccessor;
import net.minecraft.world.level.StructureManager; import net.minecraft.world.level.StructureManager;
import net.minecraft.world.level.biome.BiomeBase; import net.minecraft.world.level.biome.BiomeBase;
import net.minecraft.world.level.biome.BiomeManager; import net.minecraft.world.level.biome.BiomeManager;
import net.minecraft.world.level.biome.BiomeSettingsMobs;
import net.minecraft.world.level.biome.WorldChunkManager; import net.minecraft.world.level.biome.WorldChunkManager;
import net.minecraft.world.level.block.ITileEntity; import net.minecraft.world.level.block.ITileEntity;
import net.minecraft.world.level.block.entity.TileEntity; import net.minecraft.world.level.block.entity.TileEntity;
@ -194,6 +197,11 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
return delegate.getBaseHeight(i, j, heightmap_type, levelheightaccessor); return delegate.getBaseHeight(i, j, heightmap_type, levelheightaccessor);
} }
@Override
public WeightedRandomList<BiomeSettingsMobs.c> getMobsFor(BiomeBase biomebase, StructureManager structuremanager, EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
return delegate.getMobsFor(biomebase, structuremanager, enumcreaturetype, blockposition);
}
@Override @Override
public void addDecorations(RegionLimitedWorldAccess regionlimitedworldaccess, StructureManager structuremanager) { public void addDecorations(RegionLimitedWorldAccess regionlimitedworldaccess, StructureManager structuremanager) {
if (generator.shouldGenerateDecorations()) { if (generator.shouldGenerateDecorations()) {