Skip to content

Commit 65f84b1

Browse files
committed
Resolving Merge Conflict on "origin/master"
2 parents 469a4ba + 071c879 commit 65f84b1

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

build.gradle.kts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repositories {
1212
}
1313

1414
dependencies {
15-
implementation("com.github.Weave-MC:Weave-Loader:6015cdb81f")
15+
implementation("com.github.Weave-MC:Weave-Loader:4c45210e52")
1616
}
1717

1818
minecraft {
@@ -28,4 +28,9 @@ tasks.jar {
2828
manifest.attributes(
2929
"Weave-Entry" to "com.example.mod.ExampleMod"
3030
)
31+
}
32+
33+
minecraft {
34+
version = "1.8.9"
35+
mappings = "stable_22"
3136
}

settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ rootProject.name = "ExampleMod"
22

33
pluginManagement {
44
repositories {
5-
mavenCentral()
6-
maven(url = "https://jitpack.io")
5+
gradlePluginPortal()
6+
maven("https://jitpack.io")
77
}
88
}

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
package com.example.mod;
22

3-
import club.maxstats.weave.loader.api.HookManager;
43
import club.maxstats.weave.loader.api.ModInitializer;
4+
import club.maxstats.weave.loader.api.HookManager;
55
import club.maxstats.weave.loader.api.event.EventBus;
6-
import club.maxstats.weave.loader.api.event.annotation.SubscribeEvent;
7-
import club.maxstats.weave.loader.api.event.impl.InputEvent;
6+
import club.maxstats.weave.loader.api.event.InputEvent;
7+
import club.maxstats.weave.loader.api.event.SubscribeEvent;
8+
import club.maxstats.weave.loader.util.ExtensionsKt;
9+
import kotlin.Unit;
10+
import net.minecraft.client.Minecraft;
11+
import net.minecraft.util.ChatComponentText;
812
import org.jetbrains.annotations.NotNull;
13+
import org.lwjgl.input.Keyboard;
914
import org.objectweb.asm.Opcodes;
1015
import org.objectweb.asm.Type;
1116
import org.objectweb.asm.tree.MethodInsnNode;
@@ -27,15 +32,13 @@ public void preinit(@NotNull HookManager hookManager) {
2732
);
2833
});
2934

30-
EventBus.INSTANCE.subscribe(this);
31-
}
32-
33-
@SubscribeEvent
34-
public void onInput(InputEvent e) {
35-
System.out.println("Pressed: " + e.getKeycode());
35+
EventBus.INSTANCE.subscribe(InputEvent.class, e -> {
36+
Minecraft.getMinecraft().thePlayer.addChatMessage(
37+
new ChatComponentText("Pressed: " + Keyboard.getKeyName(e.getKeyCode()))
38+
);
39+
});
3640
}
37-
3841
public static void onStart() {
3942
System.out.println("Hello World from Minecraft#startGame");
4043
}
41-
}
44+
}

0 commit comments

Comments
 (0)