Correctly construct StructureManager

This commit is contained in:
Bjarne Koll
2025-01-14 19:21:52 +01:00
parent 209e5f8580
commit 8e80d4e158

View File

@@ -204,12 +204,14 @@
chunkGenerator,
this.chunkSource.randomState(),
this,
@@ -281,8 +_,8 @@
@@ -280,9 +_,9 @@
seed,
fixerUpper
);
this.structureManager = new StructureManager(this, server.getWorldData().worldGenOptions(), this.structureCheck);
- this.structureManager = new StructureManager(this, server.getWorldData().worldGenOptions(), this.structureCheck);
- if (this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) {
- this.dragonFight = new EndDragonFight(this, seed, server.getWorldData().endDragonFightData());
+ this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), this.structureCheck); // CraftBukkit
+ if (this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
+ this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
} else {