From e899b67a682f0bcccccbfb68b2a68e27e54eb823 Mon Sep 17 00:00:00 2001 From: modmuss50 Date: Tue, 16 Nov 2021 13:01:16 +0000 Subject: [PATCH] Update mappings. --- .../fabric/test/structure/StructureTest.java | 18 +++++++++--------- .../structure/mixin/ChunkSerializerMixin.java | 4 ++-- gradle.properties | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/StructureTest.java b/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/StructureTest.java index b62972bcb..1628b94ef 100644 --- a/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/StructureTest.java +++ b/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/StructureTest.java @@ -39,8 +39,8 @@ import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.ConfiguredStructureFeature; import net.minecraft.world.gen.feature.DefaultFeatureConfig; import net.minecraft.world.gen.feature.StructureFeature; -import net.minecraft.class_6622; -import net.minecraft.class_6626; +import net.minecraft.structure.StructurePiecesGenerator; +import net.minecraft.structure.StructurePiecesCollector; import net.fabricmc.fabric.api.structure.v1.FabricStructureBuilder; @@ -49,7 +49,7 @@ public class StructureTest { public static final StructureFeature STRUCTURE = new TestStructureFeature(DefaultFeatureConfig.CODEC); public static final ConfiguredStructureFeature> CONFIGURED_STRUCTURE = STRUCTURE.configure(new DefaultFeatureConfig()); - public static final StructurePieceType.class_6615 PIECE = TestStructureGenerator::new; + public static final StructurePieceType.Simple PIECE = TestStructureGenerator::new; static { LOGGER.info("Registering test structure"); @@ -67,13 +67,13 @@ public class StructureTest { super(codec, TestStructureFeature::generate); } - private static void generate(class_6626 arg, DefaultFeatureConfig defaultFeatureConfig, class_6622.class_6623 arg2) { - int blockX = arg2.chunkPos().getStartX(); - int blockZ = arg2.chunkPos().getStartZ(); - int blockY = arg2.chunkGenerator().getHeight(blockX, blockZ, Heightmap.Type.WORLD_SURFACE_WG, arg2.heightAccessor()); + private static void generate(StructurePiecesCollector structurePiecesCollector, DefaultFeatureConfig defaultFeatureConfig, StructurePiecesGenerator.Context context) { + int blockX = context.chunkPos().getStartX(); + int blockZ = context.chunkPos().getStartZ(); + int blockY = context.chunkGenerator().getHeight(blockX, blockZ, Heightmap.Type.WORLD_SURFACE_WG, context.world()); - TestStructureGenerator generator = new TestStructureGenerator(arg2.random(), blockX, blockY, blockZ); - arg.addPiece(generator); + TestStructureGenerator generator = new TestStructureGenerator(context.random(), blockX, blockY, blockZ); + structurePiecesCollector.addPiece(generator); } } diff --git a/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/mixin/ChunkSerializerMixin.java b/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/mixin/ChunkSerializerMixin.java index f1117631a..5ea9c07ff 100644 --- a/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/mixin/ChunkSerializerMixin.java +++ b/fabric-structure-api-v1/src/testmod/java/net/fabricmc/fabric/test/structure/mixin/ChunkSerializerMixin.java @@ -21,7 +21,7 @@ import org.spongepowered.asm.mixin.injection.Constant; import org.spongepowered.asm.mixin.injection.ModifyConstant; import net.minecraft.nbt.NbtCompound; -import net.minecraft.class_6625; +import net.minecraft.structure.StructureContext; import net.minecraft.world.ChunkSerializer; @Mixin(ChunkSerializer.class) @@ -30,7 +30,7 @@ abstract class ChunkSerializerMixin { * @reason Changes the logging message for the `unknown structure start` to describe which chunk the missing structure is located in for debugging purposes. */ @ModifyConstant(method = "readStructureStarts", constant = @Constant(stringValue = "Unknown structure start: {}")) - private static String modifyErrorMessage(String original, class_6625 class_6625, NbtCompound tag, long worldSeed) { + private static String modifyErrorMessage(String original, StructureContext structureContext, NbtCompound tag, long worldSeed) { // Use coordinates in tag to determine the position of the chunk final int xPos = tag.getInt("xPos"); final int zPos = tag.getInt("zPos"); diff --git a/gradle.properties b/gradle.properties index 69a465a38..f8e4831db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2560M version=0.42.2 minecraft_version=1.18-pre1 -yarn_version=+build.2 +yarn_version=+build.12 loader_version=0.12.5 prerelease=true