package net.shadowfacts.phycon.mixin.client; import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.screen.slot.Slot; import net.shadowfacts.phycon.block.terminal.TerminalScreen; 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; /** * @author shadowfacts */ @Mixin(HandledScreen.class) public class MixinHandledScreen { @Inject(method = "drawSlot(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/screen/slot/Slot;)V", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;enableDepthTest()V")) private void drawSlot(MatrixStack matrixStack, Slot slot, CallbackInfo ci) { if ((Object)this instanceof TerminalScreen) { TerminalScreen self = (TerminalScreen)(Object)this; self.drawSlotUnderlay(matrixStack, slot); } } }