Skip to content

Commit

Permalink
1.21-pre1
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed May 30, 2024
1 parent 968a0cb commit 4b57e26
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
8 changes: 4 additions & 4 deletions versions/1.21/gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 4b57e26

Please sign in to comment.