隐藏原版主副切换按钮

This commit is contained in:
GaLi 2026-03-28 14:20:05 +08:00
parent 87291b32cd
commit 7abfdd4807
7 changed files with 46 additions and 13 deletions

View File

@ -60,9 +60,13 @@ public abstract class PatternEncodingTermScaleButtonsMixin {
this.eap$div3Button = eap$createScaleButton(16, 16, "/3", ScaleEncodingPatternC2SPacket.Operation.DIV3);
this.eap$div5Button = eap$createScaleButton(32, 16, "/5", ScaleEncodingPatternC2SPacket.Operation.DIV5);
this.eap$swapOutputsButton = eap$createStandaloneButton(
EAP$SWAP_OUTPUT_TEXTURE, "主副切换", ScaleEncodingPatternC2SPacket.Operation.SWAP_OUTPUTS);
EAP$SWAP_OUTPUT_TEXTURE,
Component.translatable("extendedae_plus.tooltip.swap_processing_outputs"),
ScaleEncodingPatternC2SPacket.Operation.SWAP_OUTPUTS);
this.eap$restoreRatioButton = eap$createStandaloneButton(
EAP$RESTORE_RATIO_TEXTURE, "恢复比例", ScaleEncodingPatternC2SPacket.Operation.RESTORE_RATIO);
EAP$RESTORE_RATIO_TEXTURE,
Component.translatable("extendedae_plus.tooltip.restore_processing_ratio"),
ScaleEncodingPatternC2SPacket.Operation.RESTORE_RATIO);
}
eap$ensureAdded(this.eap$mul2Button);
@ -128,14 +132,14 @@ public abstract class PatternEncodingTermScaleButtonsMixin {
srcY,
16,
16,
0.375f,
0.5f,
Component.literal(tooltipText),
btn -> ModNetwork.CHANNEL.sendToServer(new ScaleEncodingPatternC2SPacket(op))
);
}
@Unique
private ScaledTextureButton eap$createStandaloneButton(ResourceLocation texture, String tooltipText,
private ScaledTextureButton eap$createStandaloneButton(ResourceLocation texture, Component tooltipText,
ScaleEncodingPatternC2SPacket.Operation op) {
return new ScaledTextureButton(
texture,
@ -145,8 +149,8 @@ public abstract class PatternEncodingTermScaleButtonsMixin {
0,
16,
16,
0.375f,
Component.literal(tooltipText),
0.5f,
tooltipText,
btn -> ModNetwork.CHANNEL.sendToServer(new ScaleEncodingPatternC2SPacket(op))
);
}

View File

@ -0,0 +1,22 @@
package com.extendedae_plus.mixin.ae2.client.gui;
import appeng.client.gui.me.items.ProcessingEncodingPanel;
import appeng.client.gui.widgets.ActionButton;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
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.callback.CallbackInfo;
@Mixin(value = ProcessingEncodingPanel.class, remap = false)
public abstract class ProcessingEncodingPanelMixin {
@Shadow
@Final
private ActionButton cycleOutputBtn;
@Inject(method = "setVisible", at = @At("TAIL"), remap = false)
private void eap$hideVanillaCycleOutputButton(boolean visible, CallbackInfo ci) {
this.cycleOutputBtn.setVisibility(false);
}
}

View File

@ -6,7 +6,7 @@
"bottom": 159
},
"huan_yuan_mo_ren": {
"left": 103,
"left": 101,
"bottom": 159
},
"cheng_2": {
@ -22,15 +22,15 @@
"bottom": 127
},
"chu_2": {
"left": 103,
"left": 101,
"bottom": 149
},
"chu_3": {
"left": 103,
"left": 101,
"bottom": 138
},
"chu_5": {
"left": 103,
"left": 101,
"bottom": 127
}
}

View File

@ -53,6 +53,8 @@
"tooltip.extendedae_plus.infinity_biginteger_cell": "§7—§bThe tangible projection of absolute storage§r, §ewhere '§6The Finite§e' §chas been deemed illegal§r\n§bIts very existence§r §bis the ultimate negation of §dentropy§r",
"tooltip.extendedae_plus.entity_speed_card.multiplier": "Multiplier: %s",
"tooltip.extendedae_plus.entity_speed_card.max": "Max effective: %s x",
"extendedae_plus.tooltip.swap_processing_outputs": "Swap Primary/Secondary Outputs",
"extendedae_plus.tooltip.restore_processing_ratio": "Restore Simplified Ratio",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip": "Assembler Matrix Upload Core",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip.upload": "Upload to Assembler Matrix",

View File

@ -51,6 +51,8 @@
"tooltip.extendedae_plus.infinity_biginteger_cell": "§7——§b绝对存储的现实投影§e\"有限\"§6已被定义为§c非法\n§b其存在本身即是对§d熵增§b的终极否定",
"tooltip.extendedae_plus.entity_speed_card.multiplier": "乘数: %s",
"tooltip.extendedae_plus.entity_speed_card.max": "最大生效: %s 倍",
"extendedae_plus.tooltip.swap_processing_outputs": "主副切换",
"extendedae_plus.tooltip.restore_processing_ratio": "恢复比例",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip": "装配矩阵上传核心",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip.upload": "上传到装配矩阵",

View File

@ -50,9 +50,11 @@
"tooltip.extendedae_plus.basic_core.ready_to_craft": "核心構建完成,等待最終合成",
"tooltip.extendedae_plus.infinity_biginteger_cell": "§7——§b絕對儲存的現實投影§e\"有限\"§6已被定義為§c非法\n§b其存在本身即是對§d熵增§b的終極否定",
"tooltip.extendedae_plus.entity_speed_card.multiplier": "乘數: %s",
"tooltip.extendedae_plus.entity_speed_card.max": "最大生效: %s 倍",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip": "裝配矩陣上傳核心",
"tooltip.extendedae_plus.entity_speed_card.max": "最大生效: %s 倍",
"extendedae_plus.tooltip.swap_processing_outputs": "主副切換",
"extendedae_plus.tooltip.restore_processing_ratio": "恢復比例",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip": "裝配矩陣上傳核心",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip.upload": "上傳到裝配矩陣",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip.upload_success": "樣板已上傳到裝配矩陣",
"block.extendedae_plus.assembler_matrix_upload_core.tooltip.upload_fail_not_crafting": "僅支援上傳合成樣板,處理樣板將被忽略",

View File

@ -13,6 +13,7 @@
"ae2.client.gui.AEBaseScreenMixin",
"ae2.client.gui.CraftConfirmScreenMixin",
"ae2.client.gui.InterfaceScreenMixin",
"ae2.client.gui.ProcessingEncodingPanelMixin",
"ae2.client.gui.PatternEncodingTermScreenMixin",
"ae2.client.gui.PatternEncodingTermScaleButtonsMixin",
"ae2.client.gui.SlotGridLayoutMixin",