forked from maruohon/itemscroller
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nearly fixed Recipe View, but there remains some offset issue. Spent …
…hours on this shit.
- Loading branch information
1 parent
b3ed4be
commit ec7a0c3
Showing
6 changed files
with
84 additions
and
77 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
24 changes: 17 additions & 7 deletions
24
src/main/java/fi/dy/masa/itemscroller/mixin/MixinScreen.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 |
---|---|---|
@@ -1,22 +1,32 @@ | ||
package fi.dy.masa.itemscroller.mixin; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.gui.screen.Screen; | ||
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 net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.gui.screen.Screen; | ||
|
||
import fi.dy.masa.itemscroller.event.RenderEventHandler; | ||
|
||
@Mixin(Screen.class) | ||
public abstract class MixinScreen | ||
{ | ||
@Inject(method = "renderWithTooltip", at = @At(value = "RETURN")) | ||
private void onDrawScreenPost(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) | ||
/* | ||
@Inject(method = "renderWithTooltip", | ||
at = @At(value = "INVOKE", | ||
target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/gui/DrawContext;IIF)V", | ||
shift = At.Shift.AFTER)) | ||
private void itemscroller_inDrawScreenPre(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) | ||
{ | ||
RenderEventHandler.instance().onDrawCraftingScreenBackground(MinecraftClient.getInstance(), context, mouseX, mouseY); | ||
} | ||
*/ | ||
|
||
@Inject(method = "renderWithTooltip", at = @At(value = "TAIL")) | ||
private void itemscroller_onDrawScreenPost(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) | ||
{ | ||
RenderEventHandler.instance().onDrawScreenPost(MinecraftClient.getInstance(), context); | ||
RenderEventHandler.instance().onDrawScreenPost(MinecraftClient.getInstance(), context, mouseX, mouseY); | ||
} | ||
} |
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