fancy new java feature
This commit is contained in:
parent
b416f98ef6
commit
9cbad193e2
|
@ -26,8 +26,7 @@ public class MixinHandledScreen {
|
|||
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;enableDepthTest()V")
|
||||
)
|
||||
private void drawSlotUnderlay(MatrixStack matrixStack, Slot slot, CallbackInfo ci) {
|
||||
if ((Object)this instanceof AbstractTerminalScreen) {
|
||||
AbstractTerminalScreen<?, ?> self = (AbstractTerminalScreen<?, ?>)(Object)this;
|
||||
if ((Object)this instanceof AbstractTerminalScreen<?, ?> self) {
|
||||
self.drawSlotUnderlay(matrixStack, slot);
|
||||
}
|
||||
}
|
||||
|
@ -37,8 +36,7 @@ public class MixinHandledScreen {
|
|||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/item/ItemRenderer;renderGuiItemOverlay(Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/item/ItemStack;IILjava/lang/String;)V")
|
||||
)
|
||||
private void drawSlotAmount(ItemRenderer itemRenderer, TextRenderer textRenderer, ItemStack stack, int x, int y, @Nullable String countLabel, MatrixStack matrixStack, Slot slot) {
|
||||
if ((Object)this instanceof AbstractTerminalScreen) {
|
||||
AbstractTerminalScreen<?, ?> self = (AbstractTerminalScreen<?, ?>)(Object)this;
|
||||
if ((Object)this instanceof AbstractTerminalScreen<?, ?> self) {
|
||||
AbstractTerminalScreenHandler<?> handler = self.getScreenHandler();
|
||||
if (slot.id < handler.getNetworkSlotsEnd() && stack.getCount() > 1) {
|
||||
self.drawNetworkSlotAmount(stack, x, y);
|
||||
|
|
|
@ -20,8 +20,8 @@ public class MixinMinecraftClient {
|
|||
at = @At(value = "FIELD", target = "Lnet/minecraft/client/MinecraftClient;currentScreen:Lnet/minecraft/client/gui/screen/Screen;", opcode = Opcodes.PUTFIELD, shift = At.Shift.AFTER)
|
||||
)
|
||||
private void setScreen(Screen screen, CallbackInfo ci) {
|
||||
if (screen instanceof AbstractCacaoScreen) {
|
||||
((AbstractCacaoScreen)screen).screenWillAppear();
|
||||
if (screen instanceof AbstractCacaoScreen cacaoScreen) {
|
||||
cacaoScreen.screenWillAppear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue