-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blazingly fast bordered text renderer ⚡ #347
base: develop-v0
Are you sure you want to change the base?
Conversation
@RedthMC i think this might already be a feature in polyui. if not maybe we should port it over somehow, because merging this would be silly only for it to get superseded in 5 seconds by twoconfig |
@pauliesnug but people are complaining that chatting and polynametag's full shadow are broken |
it’s not… |
this seems to be a complete rewrite of the font renderer which will break any mod that mixins into it, meaning this is not great for compatibility.
|
@nextdayy |
okay so edit: |
as i said, this should be rewritten as a series of mixins into the functions, not a complete rewrite. |
additionally, this is incompatible with minecraft 1.17+. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if this works with patcher optimized font renderer and SBA's chroma text
@Inject(method = "drawString(Ljava/lang/String;FFIZ)I", at = @At(value = "HEAD"), cancellable = true) | ||
private void cachedShadow(String text, float x, float y, int color, boolean dropShadow, CallbackInfoReturnable<Integer> cir) { | ||
if (Preferences.optimizedFontRenderer && dropShadow) { | ||
cir.setReturnValue((int) BorderedTextRenderer.INSTANCE.drawString(text, x, y, color, TextRenderer.TextType.SHADOW)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not overwrite this whole method
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(value = FontRenderer.class) | ||
public class FontRendererMixin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transfer all of this to a patcher font renderer mixin as well
it doesnt work with pathcer optimized font renderer |
Description
blazingly fast bordered text renderer ⚡ by using cache
( only forge 1.8.9 and 1.12.2 yet )