generated from Turnip-Labs/bta-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add hint text, dump+fill, refactors
- Loading branch information
1 parent
e89cd73
commit 1b5cbc9
Showing
5 changed files
with
146 additions
and
88 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
23 changes: 23 additions & 0 deletions
23
src/main/java/rootenginear/sortchest/mixin/GuiChestMixin.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,23 @@ | ||
package rootenginear.sortchest.mixin; | ||
|
||
import net.minecraft.client.gui.GuiChest; | ||
import net.minecraft.client.gui.GuiContainer; | ||
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 rootenginear.sortchest.mixin.accessor.GuiScreenAccessor; | ||
|
||
@Mixin(value = {GuiChest.class}, remap = false) | ||
public class GuiChestMixin { | ||
@Inject(method = "drawGuiContainerForegroundLayer", at = @At("TAIL")) | ||
private void writeInstruction(CallbackInfo ci) { | ||
GuiScreenAccessor screenThis = (GuiScreenAccessor) this; | ||
GuiContainer containerThis = (GuiContainer) (Object) this; | ||
screenThis.getFontRenderer().drawString("S: Sort ⇵, F: Fill ⊼", containerThis.xSize - 8 - 88 + 2, 6, 0x404040); | ||
screenThis.getFontRenderer().drawString("D: Dump ⊻", containerThis.xSize - 8 - 48 + 2, containerThis.ySize - 96 + 2, 0x404040); | ||
// screenThis.getFontRenderer().drawStringWithShadow("S: Sort ⇵", containerThis.xSize + 4, 6, 0xffffff); | ||
// screenThis.getFontRenderer().drawStringWithShadow("F: Fill ⊼", containerThis.xSize + 4, 6 + 12, 0xffffff); | ||
// screenThis.getFontRenderer().drawStringWithShadow("D: Dump ⊻", containerThis.xSize + 4, containerThis.ySize - 96 + 2, 0xffffff); | ||
} | ||
} |
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