Mixin time
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
package chickenmanfy.scify.mixin.client;
|
||||||
|
|
||||||
|
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.hud.InGameHud;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
|
|
||||||
|
@Mixin(InGameHud.class)
|
||||||
|
public class ActionBarMixin {
|
||||||
|
|
||||||
|
@Inject(at = @At("HEAD"), method = "setOverlayMessage(Lnet/minecraft/text/Text;Z)V")
|
||||||
|
private void sendMessage(Text message, boolean tinted, CallbackInfo info) {
|
||||||
|
System.out.println(message.getString());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"package": "chickenmanfy.scify.mixin.client",
|
"package": "chickenmanfy.scify.mixin.client",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"client": [
|
"client": [
|
||||||
"ExampleClientMixin"
|
"ActionBarMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|||||||
Reference in New Issue
Block a user