diff --git a/gradle.properties b/gradle.properties index 5323ddc..60761be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,14 +2,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20 -yarn_mappings=1.20+build.1 -loader_version=0.14.21 +minecraft_version=1.20.2 +yarn_mappings=1.20.2+build.4 +loader_version=0.14.23 # Mod Properties -mod_version=1.1.9 +mod_version=1.1.10 maven_group=us.potatoboy archives_base_name=htm # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.83.0+1.20 -translation_version=2.0.0-beta.2+1.19.4-pre2 +fabric_version=0.90.0+1.20.2 +translation_version=2.1.0+1.20.2-rc2 diff --git a/src/main/java/com/github/fabricservertools/htm/Utility.java b/src/main/java/com/github/fabricservertools/htm/Utility.java index cf8e3e7..66517ee 100644 --- a/src/main/java/com/github/fabricservertools/htm/Utility.java +++ b/src/main/java/com/github/fabricservertools/htm/Utility.java @@ -3,9 +3,11 @@ import com.github.fabricservertools.htm.interactions.InteractionManager; import com.github.fabricservertools.htm.world.data.GlobalTrustState; import com.mojang.authlib.GameProfile; +import net.minecraft.datafixer.DataFixTypes; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.server.MinecraftServer; import net.minecraft.text.Text; +import net.minecraft.world.PersistentState; import java.util.Optional; import java.util.UUID; @@ -18,7 +20,9 @@ public static String getNameFromUUID (UUID uuid, MinecraftServer server) { } public static GlobalTrustState getGlobalTrustState(MinecraftServer server) { - return server.getOverworld().getPersistentStateManager().getOrCreate(GlobalTrustState::fromNbt, GlobalTrustState::new, "globalTrust"); + return server.getOverworld().getPersistentStateManager().getOrCreate( + new PersistentState.Type<>(GlobalTrustState::new, GlobalTrustState::fromNbt, DataFixTypes.LEVEL), + "globalTrust"); } public static void sendMessage(PlayerEntity player, Text message) { diff --git a/src/main/java/com/github/fabricservertools/htm/mixin/PistonBlockMixin.java b/src/main/java/com/github/fabricservertools/htm/mixin/PistonBlockMixin.java index fa23208..11e5db2 100644 --- a/src/main/java/com/github/fabricservertools/htm/mixin/PistonBlockMixin.java +++ b/src/main/java/com/github/fabricservertools/htm/mixin/PistonBlockMixin.java @@ -15,6 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; +import java.util.Iterator; import java.util.List; import java.util.Map; @@ -29,7 +30,7 @@ public abstract class PistonBlockMixin { ), locals = LocalCapture.CAPTURE_FAILEXCEPTION, cancellable = true) - private void HTMPistonMoveCheck(World world, BlockPos pos, Direction dir, boolean retract, CallbackInfoReturnable cir, BlockPos blockPos, PistonHandler pistonHandler, Map map, List list, List list2, int i, BlockPos blockPos2, BlockState blockState) { + private void HTMPistonMoveCheck(World world, BlockPos pos, Direction dir, boolean retract, CallbackInfoReturnable cir, BlockPos blockPos, PistonHandler pistonHandler, Map map, List list, List list2, Iterator var10, BlockPos blockPos2, BlockState blockState) { if (world.isClient) return; if (blockState.hasBlockEntity()) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f6b71a7..6e65b56 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -25,6 +25,6 @@ "depends": { "fabricloader": ">=0.12.3", "fabric": "*", - "minecraft": ">=1.20" + "minecraft": ">=1.20.2" } }