舍弃按钮,改用点击编码按键自动上传
This commit is contained in:
parent
48bd05576c
commit
687652daf8
|
|
@ -103,8 +103,15 @@ public abstract class ContainerPatternEncodingTermMenuMixin implements IActionHo
|
|||
if (!PatternDetailsHelper.isEncodedPattern(stack)) {
|
||||
return; // 不是编码样板
|
||||
}
|
||||
// 为兼容整合包中可能出现的延后写槽位/同步,增加多次重试(共 5 次,每次间隔 1 tick)
|
||||
epp$scheduleUploadWithRetry(sp, menu, 5);
|
||||
// 为避免与 AE2 后续同步竞争,切到下一 tick 执行
|
||||
sp.server.execute(() -> {
|
||||
try {
|
||||
ExtendedAEPatternUploadUtil.uploadFromEncodingMenuToMatrix(sp, menu);
|
||||
} catch (Throwable t) {
|
||||
System.out.println("[EAE+][Server] Auto-upload after encode failed: " + t);
|
||||
t.printStackTrace();
|
||||
}
|
||||
});
|
||||
} catch (Throwable t) {
|
||||
System.out.println("[EAE+][Server] epp$serverUploadAfterEncode error: " + t);
|
||||
t.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
package com.extendedae_plus.mixin;
|
||||
|
||||
import appeng.client.gui.me.items.PatternEncodingTermScreen;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
// 保留空的 Mixin 外壳,不再注入任何“上传到矩阵”相关逻辑或按钮
|
||||
@Mixin(PatternEncodingTermScreen.class)
|
||||
public abstract class GuiPatternEncodingTermMixin {
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
package com.extendedae_plus.mixin.accessor;
|
||||
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
import appeng.client.gui.AEBaseScreen;
|
||||
|
||||
@Mixin(AEBaseScreen.class)
|
||||
public interface AEBaseScreenAccessor {
|
||||
@Invoker(value = "addToLeftToolbar", remap = false)
|
||||
<B extends Button> B epp$addToLeftToolbar(B button);
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package com.extendedae_plus.mixin.accessor;
|
||||
|
||||
/**
|
||||
* 客户端在点击“编写样板”时记录一个待上传标记,
|
||||
* 当客户端检测到已编码样板槽位被服务器回传填充后,再发送上传请求。
|
||||
*/
|
||||
public interface IClientEncodeUploadMarker {
|
||||
boolean epp$getClientUploadAfterEncode();
|
||||
void epp$setClientUploadAfterEncode(boolean v);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package com.extendedae_plus.mixin.accessor;
|
||||
|
||||
import net.minecraft.client.gui.components.events.GuiEventListener;
|
||||
import net.minecraft.client.gui.narration.NarratableEntry;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.components.Renderable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||
|
||||
@Mixin(Screen.class)
|
||||
public interface ScreenAccessor {
|
||||
@Invoker("addRenderableWidget")
|
||||
<T extends GuiEventListener & Renderable & NarratableEntry> T epp$invokeAddRenderableWidget(T widget);
|
||||
}
|
||||
|
|
@ -7,10 +7,7 @@
|
|||
"GuiExPatternProviderMixin",
|
||||
"SlotGridLayoutMixin",
|
||||
"GuiExPatternTerminalMixin",
|
||||
"HighlightButtonMixin",
|
||||
"GuiPatternEncodingTermMixin",
|
||||
"accessor.AEBaseScreenAccessor",
|
||||
"accessor.ScreenAccessor"
|
||||
"HighlightButtonMixin"
|
||||
],
|
||||
"mixins": [
|
||||
"ContainerExPatternProviderMixin",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user