From 4b57e26fc6590a30c434e882ae57c407846a40b2 Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Thu, 30 May 2024 12:00:17 +0800 Subject: [PATCH] 1.21-pre1 --- .../StructureBlockBlockEntityMixin.java | 10 ++++++++++ .../StructurePlacementDataAccessor.java | 1 + .../StructurePlacementDataAccessor.java | 10 ++++++++++ versions/1.21/gradle.properties | 8 ++++---- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 versions/1.17.1/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java diff --git a/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructureBlockBlockEntityMixin.java b/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructureBlockBlockEntityMixin.java index 7ccfbc3ac..50ab140a8 100644 --- a/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructureBlockBlockEntityMixin.java +++ b/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructureBlockBlockEntityMixin.java @@ -27,6 +27,10 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArg; +//#if MC >= 12100 +//$$ import net.minecraft.structure.StructureLiquidSettings; +//#endif + @Mixin(StructureBlockBlockEntity.class) public abstract class StructureBlockBlockEntityMixin { @@ -55,7 +59,13 @@ private StructurePlacementData structureBlockDoNotPreserveFluid_setPlaceFluids(S { if (CarpetTISAdditionSettings.structureBlockDoNotPreserveFluid) { + //#if MC >= 12100 + //$$ structurePlacementData.setLiquidSettings(StructureLiquidSettings.IGNORE_WATERLOGGING); + //#elseif MC >= 11700 + //$$ structurePlacementData.setPlaceFluids(false); + //#else ((StructurePlacementDataAccessor)structurePlacementData).setPlaceFluids(false); + //#endif } return structurePlacementData; } diff --git a/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java b/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java index c054c9a5f..780673ea8 100644 --- a/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java +++ b/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java @@ -24,6 +24,7 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; +// mc <1.17 only @Mixin(StructurePlacementData.class) public interface StructurePlacementDataAccessor { diff --git a/versions/1.17.1/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java b/versions/1.17.1/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java new file mode 100644 index 000000000..0ebe17d1e --- /dev/null +++ b/versions/1.17.1/src/main/java/carpettisaddition/mixins/rule/structureBlockDoNotPreserveFluid/StructurePlacementDataAccessor.java @@ -0,0 +1,10 @@ +package carpettisaddition.mixins.rule.structureBlockDoNotPreserveFluid; + +import carpettisaddition.utils.compat.DummyClass; +import org.spongepowered.asm.mixin.Mixin; + +@Mixin(DummyClass.class) +public class StructurePlacementDataAccessor +{ + // used in mc < 1.17 +} diff --git a/versions/1.21/gradle.properties b/versions/1.21/gradle.properties index 6cd8295cc..7a82cb9ea 100644 --- a/versions/1.21/gradle.properties +++ b/versions/1.21/gradle.properties @@ -1,7 +1,7 @@ # Fabric Properties # check these on https://fallen-breath.github.io/fabric-versions/ - minecraft_version=24w21b - yarn_mappings=24w21b+build.3 + minecraft_version=1.21-pre1 + yarn_mappings=1.21-pre1+build.3 # Fabric Mod Metadata carpet_dependency=>=1.4.142 @@ -10,11 +10,11 @@ # Build Information # The target mc versions for the mod during mod publishing, separated with \n - game_versions=24w21a\n24w21b + game_versions=1.21-pre1 # Mod Dependency # check available versions on maven for the given minecraft version you are using # https://masa.dy.fi/maven/carpet/fabric-carpet/ - carpet_core_version=24w21a-1.4.144+v240522 + carpet_core_version=1.21-pre1-1.4.145+v240529 lithium_dependency=com.github.CaffeineMC:lithium-fabric:mc1.20.6-0.12.3