52 lines
2 KiB
Java
52 lines
2 KiB
Java
package b;
|
|
|
|
import defpackage.*;
|
|
import net.minecraft.client.gui.GuiGraphicsExtractor;
|
|
import net.minecraft.client.gui.screens.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.At.Shift;
|
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|
|
|
@Mixin(Screen.class)
|
|
public abstract class bl {
|
|
@Inject(method = "extractBackground", at = @At("RETURN"))
|
|
private void evo$scaleContainerBackground(GuiGraphicsExtractor context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
|
if (this instanceof aqd screen) {
|
|
screen.evo$pushGuiScale(context);
|
|
}
|
|
}
|
|
|
|
@Inject(
|
|
method = "extractRenderStateWithTooltipAndSubtitles",
|
|
at = @At(
|
|
value = "INVOKE",
|
|
target = "Lnet/minecraft/client/gui/screens/Screen;extractBackground(Lnet/minecraft/client/gui/GuiGraphicsExtractor;IIF)V",
|
|
shift = Shift.AFTER
|
|
)
|
|
)
|
|
private void evo$unscaleContainerBackground(GuiGraphicsExtractor context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
|
if (this instanceof aqd screen) {
|
|
screen.evo$popGuiScale(context);
|
|
}
|
|
}
|
|
|
|
@Inject(
|
|
method = "extractRenderStateWithTooltipAndSubtitles",
|
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;extractRenderState(Lnet/minecraft/client/gui/GuiGraphicsExtractor;IIF)V")
|
|
)
|
|
private void evo$scaleContainerContents(GuiGraphicsExtractor context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
|
if (this instanceof aqd screen) {
|
|
screen.evo$pushGuiScale(context);
|
|
}
|
|
}
|
|
|
|
@Inject(method = "extractRenderStateWithTooltipAndSubtitles", at = @At("RETURN"))
|
|
private void evo$unscaleContainerContents(GuiGraphicsExtractor context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
|
if (this instanceof aqd screen) {
|
|
screen.evo$popGuiScale(context);
|
|
screen.evo$finishClosing();
|
|
}
|
|
}
|
|
}
|