fix: 修复合成监控界面跳转GT样板总成高亮对应样板退出不取消的问题。去掉部分日志
This commit is contained in:
parent
dec1edbca3
commit
afd39c4cd0
|
|
@ -19,8 +19,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.extendedae_plus.util.ExtendedAELogger.LOGGER;
|
||||
|
||||
@Pseudo
|
||||
@Mixin(value = MEPatternBufferPartMachine.class, remap = false)
|
||||
public class GTLCoreMEPatternBufferPartMachineMixin {
|
||||
|
|
@ -37,7 +35,6 @@ public class GTLCoreMEPatternBufferPartMachineMixin {
|
|||
IPatternDetails key = entry.getKey();
|
||||
if (key instanceof AEProcessingPattern proc && proc instanceof SmartDoublingAwarePattern aware) {
|
||||
aware.eap$setAllowScaling(true);
|
||||
LOGGER.info("设置true,{}", aware);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import static com.extendedae_plus.util.ExtendedAELogger.LOGGER;
|
||||
|
||||
@Pseudo
|
||||
@Mixin(value = MEPatternBufferPartMachine.class, remap = false)
|
||||
public class MEPatternBufferPartMachineMixin {
|
||||
|
|
@ -37,7 +35,6 @@ public class MEPatternBufferPartMachineMixin {
|
|||
IPatternDetails key = entry.getKey();
|
||||
if (key instanceof AEProcessingPattern proc && proc instanceof SmartDoublingAwarePattern aware) {
|
||||
aware.eap$setAllowScaling(true);
|
||||
LOGGER.info("设置true,{}", aware);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import com.extendedae_plus.network.CraftingMonitorOpenProviderC2SPacket;
|
|||
import com.extendedae_plus.network.ModNetwork;
|
||||
import com.extendedae_plus.util.GuiUtil;
|
||||
import com.glodblock.github.extendedae.client.gui.GuiExPatternProvider;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
|
@ -108,11 +107,6 @@ public abstract class AEBaseScreenMixin {
|
|||
if (key == null) {
|
||||
return;
|
||||
}
|
||||
// Debug: 标记一次发送
|
||||
try {
|
||||
LogUtils.getLogger().info("EAP: Send CraftingMonitorJumpC2SPacket: {}", key);
|
||||
} catch (Throwable ignored2) {
|
||||
}
|
||||
ModNetwork.CHANNEL.sendToServer(new CraftingMonitorJumpC2SPacket(key));
|
||||
cir.setReturnValue(true);
|
||||
} catch (Throwable ignored) {
|
||||
|
|
@ -143,11 +137,6 @@ public abstract class AEBaseScreenMixin {
|
|||
if (key == null) {
|
||||
return;
|
||||
}
|
||||
// Debug: 标记一次发送(打开供应器UI)
|
||||
try {
|
||||
LogUtils.getLogger().info("EAP: Send CraftingMonitorOpenProviderC2SPacket: {}", key);
|
||||
} catch (Throwable ignored2) {
|
||||
}
|
||||
ModNetwork.CHANNEL.sendToServer(new CraftingMonitorOpenProviderC2SPacket(key));
|
||||
cir.setReturnValue(true);
|
||||
} catch (Throwable ignored) {
|
||||
|
|
@ -315,10 +304,7 @@ public abstract class AEBaseScreenMixin {
|
|||
|
||||
|
||||
@Shadow
|
||||
protected void setTextContent(String id, Component content) {
|
||||
}
|
||||
|
||||
;
|
||||
protected void setTextContent(String id, Component content) {}
|
||||
|
||||
@Inject(method = "updateBeforeRender", at = @At("RETURN"), remap = false)
|
||||
private void onUpdateBeforeRender(CallbackInfo ci) {
|
||||
|
|
|
|||
|
|
@ -3,19 +3,13 @@ package com.extendedae_plus.mixin.ae2.client.gui;
|
|||
import appeng.client.gui.implementations.PatternProviderScreen;
|
||||
import com.extendedae_plus.content.ClientPatternHighlightStore;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
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 = AbstractContainerScreen.class, remap = false)
|
||||
@Mixin(value = AbstractContainerScreen.class)
|
||||
public class PatternProviderCloseMixin {
|
||||
|
||||
@Shadow
|
||||
protected AbstractContainerMenu menu;
|
||||
|
||||
@Inject(method = "removed", at = @At("HEAD"))
|
||||
private void onRemoved(CallbackInfo ci) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package com.extendedae_plus.mixin.gtceu;
|
||||
|
||||
import com.extendedae_plus.content.ClientPatternHighlightStore;
|
||||
import com.lowdragmc.lowdraglib.gui.modular.ModularUIContainer;
|
||||
import com.lowdragmc.lowdraglib.gui.modular.ModularUIGuiContainer;
|
||||
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;
|
||||
|
||||
@Mixin(value = ModularUIContainer.class, remap = false)
|
||||
public class ModularUIContainerCloseMixin {
|
||||
@Mixin(value = ModularUIGuiContainer.class)
|
||||
public class ModularUIGuiContainerCloseMixin {
|
||||
|
||||
@Inject(method = "removed", at = @At("HEAD"))
|
||||
private void onRemoved(CallbackInfo ci) {
|
||||
|
|
@ -113,9 +113,6 @@ public class CraftingMonitorOpenProviderC2SPacket {
|
|||
highlightWithMessage(pbe.getBlockPos(), null, Objects.requireNonNull(pbe.getLevel()).dimension(), 1.0, player);
|
||||
}
|
||||
|
||||
// 高亮打开的供应器位置并发送聊天提示
|
||||
|
||||
|
||||
// 先在该 provider 中定位 pattern 的槽位索引,以便计算页码(尽量早退出,按槽位逐个解码)
|
||||
int foundSlot = PatternProviderDataUtil.findSlotForPattern(ppl, pattern.getDefinition());
|
||||
if (foundSlot >= 0) {
|
||||
|
|
@ -151,6 +148,8 @@ public class CraftingMonitorOpenProviderC2SPacket {
|
|||
ModNetwork.CHANNEL.sendTo(new SetPatternHighlightS2CPacket(key, true), player.connection.connection, NetworkDirection.PLAY_TO_CLIENT);
|
||||
}
|
||||
|
||||
highlightWithMessage(pos, null, level.dimension(), 1.0, player);
|
||||
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
} else if (provider instanceof org.gtlcore.gtlcore.common.machine.multiblock.part.ae.MEPatternBufferPartMachine machine) {
|
||||
|
|
@ -168,6 +167,8 @@ public class CraftingMonitorOpenProviderC2SPacket {
|
|||
AEKey key = pattern.getOutputs()[0].what();
|
||||
ModNetwork.CHANNEL.sendTo(new SetPatternHighlightS2CPacket(key, true), player.connection.connection, NetworkDirection.PLAY_TO_CLIENT);
|
||||
}
|
||||
|
||||
highlightWithMessage(pos, null, level.dimension(), 1.0, player);
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
"ae2.client.gui.PatternEncodingTermScreenMixin",
|
||||
"ae2.client.gui.PatternProviderCloseMixin",
|
||||
"ae2.client.gui.PatternProviderScreenMixin",
|
||||
"ae2.client.gui.ScreenCloseMixin",
|
||||
"ae2.client.gui.SlotGridLayoutMixin",
|
||||
"extendedae.accessor.GuiExPatternTerminalAccessor",
|
||||
"extendedae.accessor.GuiExPatternTerminalSlotsRowAccessor",
|
||||
|
|
@ -24,6 +25,7 @@
|
|||
"extendedae.client.gui.GuiExPatternProviderMixin",
|
||||
"extendedae.client.gui.GuiExPatternTerminalMixin",
|
||||
"gtceu.AEPatternViewSlotWidgetMixin",
|
||||
"gtceu.ModularUIGuiContainerCloseMixin",
|
||||
"gtceu.SlotWidgetMixin",
|
||||
"hooks.ModelBakeryMixin",
|
||||
"jei.EncodePatternTransferHandlerMixin",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user