mirror of
https://github.com/AutismDevelopment/Autism-Client.git
synced 2026-10-28 20:49:48 +00:00
Initial release
This commit is contained in:
commit
e2f3f4759d
679 changed files with 156544 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
package com.example.minimal;
|
||||
|
||||
import autismclient.api.ApiVersion;
|
||||
import autismclient.api.SimpleAddon;
|
||||
import autismclient.api.macro.MacroActionEntry;
|
||||
import autismclient.api.module.SimpleModule;
|
||||
import autismclient.util.AutismClientMessaging;
|
||||
|
||||
public final class MinimalAddon extends SimpleAddon {
|
||||
public static final String ID = "autism-minimal-addon-template";
|
||||
|
||||
public MinimalAddon() {
|
||||
super(ApiVersion.CURRENT, "com.example.minimal");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
SimpleModule module = new SimpleModule("hello-module", "Hello Module", "Tiny example addon module.")
|
||||
.addBool("greet", "Greet On Enable", true)
|
||||
.addText("message", "Message", "Hello from my addon")
|
||||
.onEnabled(self -> {
|
||||
if (self.getBool("greet")) {
|
||||
AutismClientMessaging.sendPrefixed("\u00a7a" + self.getText("message"));
|
||||
}
|
||||
});
|
||||
registerModule(module);
|
||||
|
||||
registerAction(simpleAction("say-hello", "Say Hello", "Send a short addon message.", "S", mc ->
|
||||
AutismClientMessaging.sendPrefixed("\u00a7aHello from the minimal addon!")));
|
||||
|
||||
MacroActionEntry condition = simpleCondition("wait-player", "Wait Player", "Wait until the local player exists.",
|
||||
"Waiting for player", "P", mc -> mc.player != null);
|
||||
registerAction(condition);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.example.minimal;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
|
||||
public final class MinimalInit implements ClientModInitializer {
|
||||
@Override
|
||||
public void onInitializeClient() {}
|
||||
}
|
||||
34
addon-templates/minimal/src/main/resources/fabric.mod.json
Normal file
34
addon-templates/minimal/src/main/resources/fabric.mod.json
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "autism-minimal-addon-template",
|
||||
"version": "${version}",
|
||||
"name": "AUTISM Minimal Addon Template",
|
||||
"description": "Small AUTISM Client addon example: one module, one macro action, and one macro condition.",
|
||||
"authors": [
|
||||
"You"
|
||||
],
|
||||
"custom": {
|
||||
"autism:color": "80,220,120",
|
||||
"modmenu": {
|
||||
"parent": {
|
||||
"id": "autism"
|
||||
}
|
||||
}
|
||||
},
|
||||
"environment": "client",
|
||||
"entrypoints": {
|
||||
"client": [
|
||||
"com.example.minimal.MinimalInit"
|
||||
],
|
||||
"autism": [
|
||||
"com.example.minimal.MinimalAddon"
|
||||
]
|
||||
},
|
||||
"depends": {
|
||||
"java": ">=25",
|
||||
"minecraft": "${mc_compat}",
|
||||
"fabricloader": ">=0.18.4",
|
||||
"fabric-api": "*",
|
||||
"autism": ">=2.3"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue