-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Added Legacy Title Screen client mixin option -Added Legacy4J Settings key mapping, with `Y` as default key -Now, multiline edit boxes will have a LE-style and allow using the keyboard -Now, the Add Album screen will allow description changes -Fixed Loading Overlay screen not rendering correctly in versions +1.21.2 -Fixed Firework with incorrect texture format in versions +1.21.2 -Fixed mixin crash in versions forge/neoforge <=1.20.4 -Fixed Sword blocking being applied to the shield, and to the bow in versions +1.21.4 -Fixed `render_enchanted_book` UI Element Type not having an initial opening animation
- Loading branch information
Wilyicaro
committed
Jan 14, 2025
1 parent
22c5499
commit 42b05a8
Showing
19 changed files
with
180 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/wily/legacy/mixin/base/AbstractScrollWidgetMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package wily.legacy.mixin.base; | ||
|
||
import net.minecraft.client.gui.GuiGraphics; | ||
//? if <1.21.4 { | ||
import net.minecraft.client.gui.components.AbstractScrollWidget; | ||
//?} else { | ||
/*import net.minecraft.client.gui.components.AbstractTextAreaWidget; | ||
*///?} | ||
import net.minecraft.client.gui.components.AbstractWidget; | ||
import net.minecraft.network.chat.Component; | ||
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 wily.factoryapi.base.client.FactoryGuiGraphics; | ||
import wily.legacy.util.LegacySprites; | ||
|
||
@Mixin(/*? if <1.21.4 {*/AbstractScrollWidget/*?} else {*//*AbstractTextAreaWidget*//*?}*/.class) | ||
public abstract class AbstractScrollWidgetMixin extends AbstractWidget { | ||
|
||
public AbstractScrollWidgetMixin(int i, int j, int k, int l, Component component) { | ||
super(i, j, k, l, component); | ||
} | ||
|
||
@Inject(method = "renderBorder", at = @At("HEAD"), cancellable = true) | ||
private void renderBorder(GuiGraphics guiGraphics, int i, int j, int k, int l, CallbackInfo ci){ | ||
FactoryGuiGraphics.of(guiGraphics).blitSprite(LegacySprites.TEXT_FIELD, i, j, k, l); | ||
if (isHoveredOrFocused()) | ||
FactoryGuiGraphics.of(guiGraphics).blitSprite(LegacySprites.HIGHLIGHTED_TEXT_FIELD, i - 1, j - 1, k + 2, l + 2); | ||
ci.cancel(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.