From ee6147b67f44cb83472a50892b79a4eeaee40584 Mon Sep 17 00:00:00 2001 From: imreallybadatnames Date: Wed, 27 Aug 2025 23:03:38 +1100 Subject: [PATCH] reintroduce compat --- build.gradle | 16 ++++++++-------- examples/revelationary_demo_datapack.zip | Bin 1620 -> 1573 bytes gradle.properties | 11 ++++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- .../compat/rei/RevelationaryREIPlugin.java | 3 +-- .../wthit/CloakedBlockComponentProvider.java | 8 +++++--- .../wthit/RevelationaryWthitPlugin.java | 16 +++++++++------- src/main/resources/fabric.mod.json | 3 +++ src/main/resources/wthit_plugins.json | 5 ++++- 9 files changed, 37 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index 6160e2d..e65ce36 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,8 @@ plugins { - id 'fabric-loom' version '1.10-SNAPSHOT' + id 'fabric-loom' version "${loom_version}" id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_21 -targetCompatibility = JavaVersion.VERSION_21 - -archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -29,14 +25,14 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api_version}" // mod compat + modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}" modCompileOnly "maven.modrinth:jade:${project.jade_version}" // https://maven4.bai.lol/mcp/mobius/waila/ + modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${project.wthit_version}" // not yet updated // modImplementation("mezz.jei:jei-${minecraft_version}-fabric-api:${jei_version}") // modRuntimeOnly("mezz.jei:jei-${minecraft_version}-fabric:${jei_version}") - //modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${project.wthit_version}" - //modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}" } processResources { @@ -67,6 +63,10 @@ java { withSourcesJar() } +base { + archivesName = project.archives_base_name +} + jar { from("LICENSE.md") { rename { "${it}_${project.archivesBaseName}"} @@ -94,4 +94,4 @@ publishing { } } } -} \ No newline at end of file +} diff --git a/examples/revelationary_demo_datapack.zip b/examples/revelationary_demo_datapack.zip index ef27c2e9de30122974fcea74b72431295616e529..37cda097de98d58057d0cc81373a9cb3186a4bce 100644 GIT binary patch delta 215 zcmcb@vy^AUf2R7~Yo()gFD%&>z`(#z48+_(T#%TYt(Tjen_7~%`q|SU2BxJ=N1o)U zYPV)_i0g^WpB6u5b_CNDL-Q++le|53{q#=hXq-HAp81p}>(XgUpQ$uebh=LE(p$On zXXQ~<*968^h6yJH)^6Ps@fK>vC aC5>O1P+S(^&B_LnWCOy5K&d=t5Dx&Xh(KKc delta 251 zcmZ3=bA@Naf2R5s0ka~@3||LEGcYg|12H!c7bGTU>*Xfrrj{i7_E>W@7znuhc6cWc zbo)j`L^Z=lrcFmgo1Pt3<50SHx3|l}$N2LM%OwFivIli`h35ZRRmk^5!8r5PtK(`u zZ8>MmD$=SB@P=z}W`xV`dJw#9cR+1r-LmB(Z@2@z8JX-i7c*xtg>Bw;4f7kwJhrD;tQ<282g}+AEnsJOH5GNSpuw diff --git a/gradle.properties b/gradle.properties index 39f419d..4a3e447 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,17 +4,18 @@ org.gradle.jvmargs = -Xmx2G # Fabric Properties minecraft_version=1.21.5 yarn_mappings=1.21.5+build.1 -loader_version=0.16.12 +loader_version=0.17.2 +loom_version=1.11-SNAPSHOT # Mod Properties -mod_version=1.5.0+1.21.5 +mod_version=1.5.1+1.21.5 maven_group=de.dafuqs archives_base_name = revelationary # https://fabricmc.net/develop/ -fabric_api_version=0.119.9+1.21.5 +fabric_api_version=0.128.2+1.21.5 jade_version=18.1.0+fabric -wthit_version=14.0.1 -rei_version=18.0.796 +wthit_version=15.0.2 +rei_version=19.0.809 # jei_version=19.21.0.247 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 348fbf3..d4c12f2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/src/main/java/de/dafuqs/revelationary/compat/rei/RevelationaryREIPlugin.java b/src/main/java/de/dafuqs/revelationary/compat/rei/RevelationaryREIPlugin.java index f5c0d65..93be5f2 100644 --- a/src/main/java/de/dafuqs/revelationary/compat/rei/RevelationaryREIPlugin.java +++ b/src/main/java/de/dafuqs/revelationary/compat/rei/RevelationaryREIPlugin.java @@ -1,4 +1,4 @@ -/*package de.dafuqs.revelationary.compat.rei; +package de.dafuqs.revelationary.compat.rei; import de.dafuqs.revelationary.api.revelations.CloakSetChanged; import de.dafuqs.revelationary.config.RevelationaryConfig; @@ -37,4 +37,3 @@ public void registerBasicEntryFiltering(@SuppressWarnings("UnstableApiUsage") Ba ); } } -*/ \ No newline at end of file diff --git a/src/main/java/de/dafuqs/revelationary/compat/wthit/CloakedBlockComponentProvider.java b/src/main/java/de/dafuqs/revelationary/compat/wthit/CloakedBlockComponentProvider.java index 23a3b43..8ff572b 100644 --- a/src/main/java/de/dafuqs/revelationary/compat/wthit/CloakedBlockComponentProvider.java +++ b/src/main/java/de/dafuqs/revelationary/compat/wthit/CloakedBlockComponentProvider.java @@ -1,13 +1,16 @@ -/*package de.dafuqs.revelationary.compat.wthit; +package de.dafuqs.revelationary.compat.wthit; import de.dafuqs.revelationary.api.revelations.RevelationAware; import mcp.mobius.waila.api.IBlockAccessor; import mcp.mobius.waila.api.IBlockComponentProvider; import mcp.mobius.waila.api.IPluginConfig; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; import org.jetbrains.annotations.Nullable; +@Environment(EnvType.CLIENT) public class CloakedBlockComponentProvider implements IBlockComponentProvider { @Override public @Nullable BlockState getOverride(IBlockAccessor accessor, IPluginConfig config) { @@ -20,5 +23,4 @@ public class CloakedBlockComponentProvider implements IBlockComponentProvider { return accessor.getBlockState(); } -} -*/ \ No newline at end of file +} \ No newline at end of file diff --git a/src/main/java/de/dafuqs/revelationary/compat/wthit/RevelationaryWthitPlugin.java b/src/main/java/de/dafuqs/revelationary/compat/wthit/RevelationaryWthitPlugin.java index e793cd0..8b46be5 100644 --- a/src/main/java/de/dafuqs/revelationary/compat/wthit/RevelationaryWthitPlugin.java +++ b/src/main/java/de/dafuqs/revelationary/compat/wthit/RevelationaryWthitPlugin.java @@ -1,13 +1,15 @@ -/*package de.dafuqs.revelationary.compat.wthit; +package de.dafuqs.revelationary.compat.wthit; import de.dafuqs.revelationary.api.revelations.RevelationAware; -import mcp.mobius.waila.api.IRegistrar; -import mcp.mobius.waila.api.IWailaPlugin; +import mcp.mobius.waila.api.IClientRegistrar; +import mcp.mobius.waila.api.IWailaClientPlugin; +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; -public class RevelationaryWthitPlugin implements IWailaPlugin { +@Environment(EnvType.CLIENT) +public class RevelationaryWthitPlugin implements IWailaClientPlugin { @Override - public void register(IRegistrar registrar) { - registrar.addOverride(new CloakedBlockComponentProvider(), RevelationAware.class); + public void register(IClientRegistrar registrar) { + registrar.override(new CloakedBlockComponentProvider(), RevelationAware.class); } } -*/ \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a182a2b..561794c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -24,6 +24,9 @@ ], "jade": [ "de.dafuqs.revelationary.compat.jade.RevelationaryJadePlugin" + ], + "rei_client": [ + "de.dafuqs.revelationary.compat.rei.RevelationaryREIPlugin" ] }, "mixins": [ diff --git a/src/main/resources/wthit_plugins.json b/src/main/resources/wthit_plugins.json index 408db1a..3dd2766 100644 --- a/src/main/resources/wthit_plugins.json +++ b/src/main/resources/wthit_plugins.json @@ -1,5 +1,8 @@ { "revelationary:plugin": { - "initializer": "de.dafuqs.revelationary.compat.wthit.RevelationaryWthitPlugin" + "entrypoints": { + "client": "de.dafuqs.revelationary.compat.wthit.RevelationaryWthitPlugin" + }, + "side": "client" } } \ No newline at end of file