diff --git a/build.gradle b/build.gradle index fb24611..1741e0f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '0.11-SNAPSHOT' + id 'fabric-loom' version '1.5-SNAPSHOT' id 'maven-publish' } @@ -41,7 +41,6 @@ dependencies { include modImplementation("nl.enjarai:cicada-lib:${project.cicada_version}") { exclude group: "net.fabricmc.fabric-api" } - annotationProcessor("com.github.LlamaLad7.mixinextras:mixinextras-fabric:${project.mixin_extras_version}") } processResources { diff --git a/gradle.properties b/gradle.properties index 5526877..47fab84 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,10 +5,10 @@ org.gradle.jvmargs=-Xmx1G # check these on https://fabricmc.net/develop minecraft_version=1.20.2 yarn_mappings=1.20.2+build.1 -loader_version=0.14.22 +loader_version=0.15.3 # Mod Properties -mod_version = 2.2.3 +mod_version = 2.2.4 maven_group = nl.enjarai archives_base_name = omnihopper modid = omnihopper @@ -20,5 +20,4 @@ fabric_version=0.89.2+1.20.2 # https://maven.enjarai.dev/#/mirrors/net/gnomecraft/cooldown-coordinator cooldowncoordinator_version=0.6.2 # https://maven.enjarai.dev/#/releases/nl/enjarai/cicada-lib -cicada_version=0.4.4 -mixin_extras_version=0.2.0-beta.6 +cicada_version=0.5.2+1.20.2-plus diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb87..db9a6b8 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-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/nl/enjarai/omnihopper/OmniHopper.java b/src/main/java/nl/enjarai/omnihopper/OmniHopper.java index 6575d0c..0ec16ca 100644 --- a/src/main/java/nl/enjarai/omnihopper/OmniHopper.java +++ b/src/main/java/nl/enjarai/omnihopper/OmniHopper.java @@ -2,13 +2,16 @@ import net.fabricmc.api.ModInitializer; import net.minecraft.util.Identifier; +import nl.enjarai.cicada.api.conversation.ConversationManager; +import nl.enjarai.cicada.api.util.CicadaEntrypoint; +import nl.enjarai.cicada.api.util.JsonSource; import nl.enjarai.cicada.api.util.ProperLogger; import nl.enjarai.omnihopper.blocks.ModBlocks; import nl.enjarai.omnihopper.items.ModItems; import nl.enjarai.omnihopper.screen.ModScreenHandlers; import org.slf4j.Logger; -public class OmniHopper implements ModInitializer { +public class OmniHopper implements ModInitializer, CicadaEntrypoint { public static final String MODID = "omnihopper"; public static final Logger LOGGER = ProperLogger.getLogger(MODID); @@ -22,4 +25,13 @@ public void onInitialize() { public static Identifier id(String path) { return new Identifier(MODID, path); } + + @Override + public void registerConversations(ConversationManager conversationManager) { + conversationManager.registerSource( + JsonSource.fromUrl("https://raw.githubusercontent.com/enjarai/OmniHopper/1.20.2/dev/src/main/resources/cicada/omnihopper/conversations.json") + .or(JsonSource.fromResource("cicada/omnihopper/conversations.json")), + LOGGER::info + ); + } } diff --git a/src/main/resources/cicada/omnihopper/conversations.json b/src/main/resources/cicada/omnihopper/conversations.json new file mode 100644 index 0000000..7177646 --- /dev/null +++ b/src/main/resources/cicada/omnihopper/conversations.json @@ -0,0 +1,55 @@ +{ + "mod_id": "omnihopper", + + "conversations": { + "cicada:greetings": { + "lines": [ + { + "order": 50, + "text": "Hey there peeps!" + }, + { + "condition": { + "type": "cicada:mod_participates", + "mod_id": "projectv" + }, + "order": 61, + "text": "First time?" + }, + { + "condition": { + "type": "cicada:mod_participates", + "mod_id": "projectv" + }, + "order": 63, + "text": "Yea pretty much, have you *seen* how many blockstates a hopper has?" + } + ] + }, + "cicada:good_old_days": { + "lines": [ + { + "order": 20, + "text": "I mean we could..." + } + ] + }, + + "cicada:christmas": { + "lines": [ + { + "order": 20, + "text": "Merry christmas everyone!" + } + ] + }, + "cicada:new_year": { + "lines": [ + { + "order": 20, + "text": "Happy new year people!" + } + ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 797a3d4..bb11deb 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -26,6 +26,9 @@ ], "fabric-datagen": [ "nl.enjarai.omnihopper.datagen.ModDatagen" + ], + "cicada": [ + "nl.enjarai.omnihopper.OmniHopper" ] }, "mixins": [ @@ -36,6 +39,7 @@ "cooldown-coordinator": "^0.4.3", "cicada": "*", "fabric": "*", + "fabricloader": ">=0.15", "minecraft": ">=1.20.2- <1.20.3-", "java": ">=17" },