Skip to content

Commit 3dfc542

Browse files
committed
Updated to the newest version of Weave-Loader.
Removed preInit Added hook classpath array to 'weave.mod.json'
1 parent c8c038f commit 3dfc542

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
}
1515

1616
dependencies {
17-
compileOnly("com.github.weave-mc:weave-loader:2e22997d5b")
17+
compileOnly("com.github.weave-mc:weave-loader:71eb5ec6f2")
1818

1919
compileOnly("org.spongepowered:mixin:0.8.5")
2020
}

src/main/java/com/example/mod/ExampleMod.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
package com.example.mod;
22

33
import club.maxstats.weave.loader.api.ModInitializer;
4-
import club.maxstats.weave.loader.api.HookManager;
54
import club.maxstats.weave.loader.api.command.CommandBus;
65
import club.maxstats.weave.loader.api.event.*;
76
import com.example.mod.command.TestCommand;
8-
import com.example.mod.hook.MinecraftHook;
97
import com.example.mod.listener.RenderGameOverlayListener;
108
import net.minecraft.client.Minecraft;
119
import net.minecraft.util.ChatComponentText;
1210
import org.lwjgl.input.Keyboard;
1311

1412
public class ExampleMod implements ModInitializer {
1513
@Override
16-
public void preInit(HookManager hookManager) {
14+
public void init() {
1715
System.out.println("Initializing ExampleMod!");
1816

19-
hookManager.register(new MinecraftHook());
2017
CommandBus.register(new TestCommand());
2118

2219
EventBus.subscribe(KeyboardEvent.class, e -> {

src/main/resources/weave.mod.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
],
55
"entrypoints": [
66
"com.example.mod.ExampleMod"
7+
],
8+
"hooks": [
9+
"com.example.mod.hook.MinecraftHook"
710
]
811
}

0 commit comments

Comments
 (0)