Skip to content

Commit

Permalink
Update GuiMixin.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Stereowalker committed Mar 20, 2024
1 parent bd9988e commit 06f7147
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/main/java/com/stereowalker/controllermod/mixin/GuiMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;

import com.mojang.blaze3d.platform.Window;
import com.stereowalker.controllermod.ControllerMod;
import com.stereowalker.controllermod.client.PaperDollOptions;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.world.entity.player.Player;
Expand All @@ -29,12 +25,6 @@ public class GuiMixin {
@Shadow @Final private Minecraft minecraft;
@Shadow private void renderSlot(GuiGraphics guiGraphics, int x, int y, float partialTick, Player player, ItemStack stack, int seed) {}


@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;lerp(FFF)F", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD)
public void render2(GuiGraphics guiGraphics, float arg1, CallbackInfo ci, Window w, Font font) {
PaperDollOptions.renderPlayerDoll(guiGraphics);
}

@Redirect(method = "render", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/Window;getGuiScaledWidth()I"))
public int render_reditect_width(Window window) {
return window.getGuiScaledWidth() - (ControllerMod.getSafeArea()*2);
Expand Down

0 comments on commit 06f7147

Please sign in to comment.