Skip to content

Commit

Permalink
This is a surprise tool that will help us later
Browse files Browse the repository at this point in the history
  • Loading branch information
enjarai committed Jan 20, 2024
1 parent 5cef2da commit 4fcb699
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 8 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'fabric-loom' version '1.5-SNAPSHOT'
id 'maven-publish'
}

Expand Down Expand Up @@ -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 {
Expand Down
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
14 changes: 13 additions & 1 deletion src/main/java/nl/enjarai/omnihopper/OmniHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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
);
}
}
55 changes: 55 additions & 0 deletions src/main/resources/cicada/omnihopper/conversations.json
Original file line number Diff line number Diff line change
@@ -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!"
}
]
}
}
}
4 changes: 4 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
],
"fabric-datagen": [
"nl.enjarai.omnihopper.datagen.ModDatagen"
],
"cicada": [
"nl.enjarai.omnihopper.OmniHopper"
]
},
"mixins": [
Expand All @@ -36,6 +39,7 @@
"cooldown-coordinator": "^0.4.3",
"cicada": "*",
"fabric": "*",
"fabricloader": ">=0.15",
"minecraft": ">=1.20.2- <1.20.3-",
"java": ">=17"
},
Expand Down

0 comments on commit 4fcb699

Please sign in to comment.