Skip to content

Commit 54317e7

Browse files
committed
Fix wrong initialization of PrimaryLevelData in ServerLevel
1 parent 7bb9f1f commit 54317e7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

arclight-common/src/main/java/io/izzel/arclight/common/mixin/core/server/level/ServerLevelMixin.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,11 @@ public ResourceKey<LevelStem> getTypeKey() {
166166
@Decorate(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/dimension/LevelStem;generator()Lnet/minecraft/world/level/chunk/ChunkGenerator;"))
167167
private ChunkGenerator arclight$initChunkGenerator(LevelStem instance, @Local(ordinal = -1) MinecraftServer server, @Local(ordinal = -1) ServerLevelData worldInfo) throws Throwable {
168168
// Pulling up world info init since level info is used when selecting ChunkGenerator.
169-
if (arclight$isActual()) {
170-
if (worldInfo instanceof PrimaryLevelData primary) {
171-
this.K = primary;
172-
} else {
173-
// damn spigot again
174-
this.K = DelegateWorldInfo.wrap(worldInfo);
175-
}
169+
if (arclight$isActual() && worldInfo instanceof PrimaryLevelData primary) {
170+
this.K = primary;
176171
} else {
177-
this.K = null;
172+
// damn spigot again
173+
this.K = DelegateWorldInfo.wrap(worldInfo);
178174
}
179175

180176
if (arclight$isActual()) {

0 commit comments

Comments
 (0)