aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hype/bbsentials/client
diff options
context:
space:
mode:
authorhackthetime <l4bg0jb7@duck.com>2023-09-15 13:34:45 +0200
committerhackthetime <l4bg0jb7@duck.com>2023-09-15 13:34:45 +0200
commit32b5cdf7b7628164a795258559a7ce9c63911295 (patch)
tree392ee50c7f66c70c92a46b85ae5ec788aaa05cf0 /src/main/java/de/hype/bbsentials/client
parent9616b434745f6a0f5bedc0c8145e9e7e214b3cf3 (diff)
downloadBBsentials-32b5cdf7b7628164a795258559a7ce9c63911295.tar.gz
BBsentials-32b5cdf7b7628164a795258559a7ce9c63911295.tar.bz2
BBsentials-32b5cdf7b7628164a795258559a7ce9c63911295.zip
started working on Mod Menu Config Screen.
Missing Configuration still atm. if its not running unset the entry point mod menue in the fabric.mod.json
Diffstat (limited to 'src/main/java/de/hype/bbsentials/client')
-rw-r--r--src/main/java/de/hype/bbsentials/client/BBsentialsConfigScreemFactory.java9
-rw-r--r--src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java2
-rw-r--r--src/main/java/de/hype/bbsentials/client/ModMenueScreen.java20
3 files changed, 30 insertions, 1 deletions
diff --git a/src/main/java/de/hype/bbsentials/client/BBsentialsConfigScreemFactory.java b/src/main/java/de/hype/bbsentials/client/BBsentialsConfigScreemFactory.java
new file mode 100644
index 0000000..82a5155
--- /dev/null
+++ b/src/main/java/de/hype/bbsentials/client/BBsentialsConfigScreemFactory.java
@@ -0,0 +1,9 @@
+package de.hype.bbsentials.client;
+
+import net.minecraft.client.gui.screen.Screen;
+
+public class BBsentialsConfigScreemFactory {
+ public static Screen create(Screen parent) {
+ return parent;
+ }
+}
diff --git a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java
index e1f3141..3cb139b 100644
--- a/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java
+++ b/src/main/java/de/hype/bbsentials/client/Commands/CommandsOLD.java
@@ -166,7 +166,7 @@ public class CommandsOLD {
int z = IntegerArgumentType.getInteger(context, "Z");
String contactWay = StringArgumentType.getString(context, "ContactWay");
- bbserver.sendPacket(new ChChestPackage("", ChChestItems.getItem(item.split(";")), x + "" + y + "" + z, contactWay, ""));
+ bbserver.sendPacket(new ChChestPacket("", ChChestItems.getItem(item.split(";")), x + "" + y + "" + z, contactWay, ""));
return 1;
}
)
diff --git a/src/main/java/de/hype/bbsentials/client/ModMenueScreen.java b/src/main/java/de/hype/bbsentials/client/ModMenueScreen.java
new file mode 100644
index 0000000..64de624
--- /dev/null
+++ b/src/main/java/de/hype/bbsentials/client/ModMenueScreen.java
@@ -0,0 +1,20 @@
+package de.hype.bbsentials.client;
+
+import com.terraformersmc.modmenu.api.ConfigScreenFactory;
+import com.terraformersmc.modmenu.api.ModMenuApi;
+import net.fabricmc.loader.api.FabricLoader;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.screen.NoticeScreen;
+import net.minecraft.text.Text;
+
+public class ModMenueScreen implements ModMenuApi {
+ public class CITResewnModMenu implements ModMenuApi {
+ @Override
+ public ConfigScreenFactory<?> getModConfigScreenFactory() {
+ if (FabricLoader.getInstance().isModLoaded("cloth-config2"))
+ return BBsentialsConfigScreemFactory::create;
+
+ return parent -> new NoticeScreen(() -> MinecraftClient.getInstance().setScreen(parent), Text.of("CIT Resewn"), Text.of("CIT Resewn requires Cloth Config to be able to show the config."));
+ }
+ }
+}