diff --git a/common/src/main/java/com/gmail/picono435/randomtp/data/ServerState.java b/common/src/main/java/com/gmail/picono435/randomtp/data/ServerState.java index e15911b..45b50b8 100644 --- a/common/src/main/java/com/gmail/picono435/randomtp/data/ServerState.java +++ b/common/src/main/java/com/gmail/picono435/randomtp/data/ServerState.java @@ -3,10 +3,13 @@ import com.gmail.picono435.randomtp.RandomTPMod; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.MinecraftServer; +import net.minecraft.util.datafix.DataFixTypes; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.level.ForcedChunksSavedData; import net.minecraft.world.level.Level; import net.minecraft.world.level.saveddata.SavedData; import net.minecraft.world.level.storage.DimensionDataStorage; +import org.apache.logging.log4j.core.jmx.Server; import java.util.HashMap; import java.util.UUID; @@ -50,8 +53,7 @@ public static ServerState getServerState(MinecraftServer server) { .getLevel(Level.OVERWORLD).getDataStorage(); ServerState serverState = persistentStateManager.computeIfAbsent( - ServerState::createFromNbt, - ServerState::new, + new SavedData.Factory<>(ServerState::new, ServerState::createFromNbt, null), RandomTPMod.MOD_ID); serverState.setDirty(); diff --git a/gradle.properties b/gradle.properties index a7b476e..36fb531 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,13 @@ org.gradle.jvmargs=-Xmx6G org.gradle.daemon=false -minecraft_version=1.20 +minecraft_version=1.20.2 archives_base_name=randomtp -mod_version=8.0.0+1.20 +mod_version=8.0.1+1.20 maven_group=com.gmail.picono435 -fabric_loader_version=0.14.21 -fabric_api_version=0.83.0+1.20 +fabric_loader_version=0.14.22 +fabric_api_version=0.89.2+1.20.2 -forge_version=46.0.1 \ No newline at end of file +forge_version=48.0.13 \ No newline at end of file