From acfb447deec68d549ac18ba6198a80f0bfbef2da Mon Sep 17 00:00:00 2001 From: zhenlige Date: Thu, 28 Nov 2024 14:26:03 +0800 Subject: [PATCH] fix: auto reducing fractions --- gradle.properties | 18 ------------------ .../github/zhenlige/xennote/XennoteClient.java | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/gradle.properties b/gradle.properties index 512e3cc..aaa189c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,16 +4,8 @@ org.gradle.parallel=true # Fabric Properties # check these on https://fabricmc.net/develop - -# 1.21.3 minecraft_version=1.21.3 yarn_mappings=1.21.3+build.2 - -# 1.21.1 -#minecraft_version=1.21.1 -#yarn_mappings=1.21.1+build.3 - -# shared loader_version=0.16.9 # Mod Properties @@ -22,20 +14,10 @@ maven_group=com.github.zhenlige.xennote archives_base_name=xennote # Dependencies - -# 1.21.3 fabric_version=0.107.0+1.21.3 cloth_version=16.0.141 modmenu_version=12.0.0-beta.1 -# 1.21.1 -#fabric_version=0.106.0+1.21.1 -#cloth_version=15.0.140 -#modmenu_version=11.0.3 - -# shared -conditional_mixin_version=0.6.3 - #loom_libraries_base=https://bmclapi2.bangbang93.com/maven/ #loom_resources_base=https://bmclapi2.bangbang93.com/assets/ #loom_version_manifests=https://bmclapi2.bangbang93.com/mc/game/version_manifest.json diff --git a/src/client/java/com/github/zhenlige/xennote/XennoteClient.java b/src/client/java/com/github/zhenlige/xennote/XennoteClient.java index 9a80c57..e632074 100644 --- a/src/client/java/com/github/zhenlige/xennote/XennoteClient.java +++ b/src/client/java/com/github/zhenlige/xennote/XennoteClient.java @@ -55,7 +55,7 @@ private static void blockConfig(BlockTuningPayload payload, ClientPlayNetworking var entryRef = new EntryManager.SingleTuningRef(payload.tuningRef()); cat.addEntry(entryRef.createEntry(entryBuilder)); builder.setSavingRunnable(() -> { - Fraction f = Fraction.getFraction(entryP.getValue(), entryQ.getValue()); + Fraction f = Fraction.getReducedFraction(entryP.getValue(), entryQ.getValue()); int p = pOf(f), q = qOf(f); ClientPlayNetworking.send(new BlockTuningPayload(payload.pos(), p, q, entryRef.getTuningRef())); });