How to draw a string on title screen? #1626
Answered
by
warjort
legoraft
asked this question in
Mod Dev Support
-
I'm currently trying to draw a string on the minecraft title screen, just like the copyright text, but I get alot of errors when trying to run my code. Code (This is a mixin at the TitleScreen.class): @Inject(at = @At("RETURN"), method = "render")
private void titleText(CallbackInfo ci, MatrixStack matrices, String string) {
drawStringWithShadow(matrices, this.textRenderer, "Some text", 2, this.height - 10, 16777215);
} |
Beta Was this translation helpful? Give feedback.
Answered by
warjort
Aug 11, 2021
Replies: 1 comment 1 reply
-
The old "it does not work" report. Anyway, here's some working code with comments.
NOTE: This mixin should be configured in the "client" part of the mixin config, unless you want crashes on dedicated servers. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
legoraft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The old "it does not work" report.
You don't think actually posting those errors, or the full mixin class, or the mixin config would be useful?
Anyway, here's some working code with comments.