Skip to content

Commit

Permalink
Readd dropped hunk for ender dragon fight data (#11975)
Browse files Browse the repository at this point in the history
Dragon fight data should be read from the now split world instead of the
main world level.dat.
Partial hunk was dropped during hardfork.
  • Loading branch information
lynxplay authored Jan 14, 2025
1 parent eeec611 commit 209e5f8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,17 @@
chunkGenerator,
this.chunkSource.randomState(),
this,
@@ -281,7 +_,7 @@
@@ -281,8 +_,8 @@
fixerUpper
);
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());
+ 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, seed, server.getWorldData().endDragonFightData());
+ this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
} else {
this.dragonFight = null;
}
@@ -292,7 +_,15 @@
this.randomSequences = Objects.requireNonNullElseGet(
randomSequences, () -> this.getDataStorage().computeIfAbsent(RandomSequences.factory(seed), "random_sequences")
Expand Down

0 comments on commit 209e5f8

Please sign in to comment.