2022-02-25 17:46:35 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Fri, 25 Feb 2022 07:14:48 -0800
|
2022-03-01 04:25:13 +01:00
|
|
|
Subject: [PATCH] CB fixes
|
2022-02-25 17:46:35 +01:00
|
|
|
|
2022-03-01 04:25:13 +01:00
|
|
|
* Missing Level -> LevelStem generic in StructureCheck
|
|
|
|
Need to use the right for injectDatafixingContext
|
2022-02-25 17:46:35 +01:00
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
|
|
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
|
|
|
|
|
|
long l = minecraftserver.getWorldData().worldGenSettings().seed();
|
|
|
|
|
|
|
|
- this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), minecraftserver.getStructureManager(), resourcekey, chunkgenerator, this, chunkgenerator.getBiomeSource(), l, datafixer);
|
|
|
|
+ this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), minecraftserver.getStructureManager(), this.getTypeKey(), chunkgenerator, this, chunkgenerator.getBiomeSource(), l, datafixer); // Paper - Fix missing CB diff
|
|
|
|
this.structureFeatureManager = new StructureFeatureManager(this, this.serverLevelData.worldGenSettings(), this.structureCheck); // CraftBukkit
|
|
|
|
if (this.dimensionType().createDragonFight()) {
|
|
|
|
this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenSettings().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java
|
|
|
|
@@ -0,0 +0,0 @@ public class StructureCheck {
|
|
|
|
private final Registry<Biome> biomes;
|
2022-03-01 06:43:03 +01:00
|
|
|
private final Registry<ConfiguredStructureFeature<?, ?>> structureConfigs;
|
2022-02-25 17:46:35 +01:00
|
|
|
private final StructureManager structureManager;
|
|
|
|
- private final ResourceKey<Level> dimension;
|
|
|
|
+ private final ResourceKey<net.minecraft.world.level.dimension.LevelStem> dimension; // Paper - fix missing CB diff
|
|
|
|
private final ChunkGenerator chunkGenerator;
|
|
|
|
private final LevelHeightAccessor heightAccessor;
|
|
|
|
private final BiomeSource biomeSource;
|
|
|
|
@@ -0,0 +0,0 @@ public class StructureCheck {
|
2022-03-01 06:43:03 +01:00
|
|
|
private final Long2ObjectMap<Object2IntMap<ConfiguredStructureFeature<?, ?>>> loadedChunks = new Long2ObjectOpenHashMap<>();
|
|
|
|
private final Map<ConfiguredStructureFeature<?, ?>, Long2BooleanMap> featureChecks = new HashMap<>();
|
2022-02-25 17:46:35 +01:00
|
|
|
|
|
|
|
- public StructureCheck(ChunkScanAccess chunkIoWorker, RegistryAccess registryManager, StructureManager structureManager, ResourceKey<Level> worldKey, ChunkGenerator chunkGenerator, LevelHeightAccessor world, BiomeSource biomeSource, long seed, DataFixer dataFixer) {
|
|
|
|
+ public StructureCheck(ChunkScanAccess chunkIoWorker, RegistryAccess registryManager, StructureManager structureManager, ResourceKey<net.minecraft.world.level.dimension.LevelStem> worldKey, ChunkGenerator chunkGenerator, LevelHeightAccessor world, BiomeSource biomeSource, long seed, DataFixer dataFixer) { // Paper - fix missing CB diff
|
|
|
|
this.storageAccess = chunkIoWorker;
|
|
|
|
this.registryAccess = registryManager;
|
|
|
|
this.structureManager = structureManager;
|