Update mappings.

This commit is contained in:
modmuss50 2021-11-16 13:01:16 +00:00
parent 713ff39cb4
commit e899b67a68
3 changed files with 12 additions and 12 deletions

View file

@ -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<DefaultFeatureConfig> STRUCTURE = new TestStructureFeature(DefaultFeatureConfig.CODEC);
public static final ConfiguredStructureFeature<DefaultFeatureConfig, ? extends StructureFeature<DefaultFeatureConfig>> 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);
}
}

View file

@ -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");

View file

@ -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