mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 23:58:02 -05:00
Update mappings.
This commit is contained in:
parent
713ff39cb4
commit
e899b67a68
3 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue