Some notes on the fix for #7:
This fixes situations like §mTest, §6Test1 §r§mTest2 already works.
The reason this is necessary is because FontRenderer#renderString sets the color based on the passed color, then calls FontRenderer#renderStringAtPos (which patcher hooks). However patcher does not update the lastColor/Alpha of a CachedString until a color code or reset code is hit. This means that the strikethrough in the first case above does render, but with alpha 0 (completely transparent). By initializing the lastColor/Alpha we resolve this issue.
Some notes on the fix for #7: This fixes situations like
§mTest
,§6Test1 §r§mTest2
already works. The reason this is necessary is becauseFontRenderer#renderString
sets the color based on the passed color, then callsFontRenderer#renderStringAtPos
(which patcher hooks). However patcher does not update the lastColor/Alpha of aCachedString
until a color code or reset code is hit. This means that the strikethrough in the first case above does render, but with alpha 0 (completely transparent). By initializing the lastColor/Alpha we resolve this issue.