Skip to content

Commit

Permalink
Update to 1.20.2 (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnokeesman authored Oct 19, 2023
1 parent a9a5b60 commit a36d441
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion src/main/java/com/github/fabricservertools/htm/Utility.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<Boolean> cir, BlockPos blockPos, PistonHandler pistonHandler, Map<BlockPos, BlockState> map, List<BlockPos> list, List<BlockState> list2, int i, BlockPos blockPos2, BlockState blockState) {
private void HTMPistonMoveCheck(World world, BlockPos pos, Direction dir, boolean retract, CallbackInfoReturnable<Boolean> cir, BlockPos blockPos, PistonHandler pistonHandler, Map<BlockPos, BlockState> map, List<BlockPos> list, List<BlockState> list2, Iterator var10, BlockPos blockPos2, BlockState blockState) {
if (world.isClient) return;

if (blockState.hasBlockEntity()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"depends": {
"fabricloader": ">=0.12.3",
"fabric": "*",
"minecraft": ">=1.20"
"minecraft": ">=1.20.2"
}
}

0 comments on commit a36d441

Please sign in to comment.