删除debug信息

This commit is contained in:
GaLicn 2025-09-23 19:14:32 +08:00
parent 039fdc3f90
commit bb6bb61001
6 changed files with 6 additions and 37 deletions

View File

@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
loom.platform = forge loom.platform = forge
# Mod properties # Mod properties
mod_version = 1.4.2-fix mod_version = 1.4.3
maven_group = com.extendedae_plus maven_group = com.extendedae_plus
archives_name = extendedae_plus archives_name = extendedae_plus

View File

@ -94,7 +94,6 @@ public class AdvPatternProviderLogicAdvancedMixin implements AdvancedBlockingHol
@Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL")) @Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL"))
private void onExportSettings(CompoundTag output, CallbackInfo ci) { private void onExportSettings(CompoundTag output, CallbackInfo ci) {
System.out.println(this.eap$advancedBlocking);
output.putBoolean(EAP_ADV_BLOCKING_KEY, this.eap$advancedBlocking); output.putBoolean(EAP_ADV_BLOCKING_KEY, this.eap$advancedBlocking);
} }

View File

@ -76,7 +76,6 @@ public class AdvPatternProviderLogicDoublingMixin implements SmartDoublingHolder
@Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL")) @Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL"))
private void onExportSettings(CompoundTag output, CallbackInfo ci) { private void onExportSettings(CompoundTag output, CallbackInfo ci) {
System.out.println(this.eap$smartDoubling);
output.putBoolean(EAP_SMART_DOUBLING_KEY, this.eap$smartDoubling); output.putBoolean(EAP_SMART_DOUBLING_KEY, this.eap$smartDoubling);
} }

View File

@ -41,60 +41,33 @@ public class InterfaceLogicUpgradesMixin {
) )
private void expandInterfaceUpgrades(IManagedGridNode gridNode, InterfaceLogicHost host, Item is, int slots, CallbackInfo ci) { private void expandInterfaceUpgrades(IManagedGridNode gridNode, InterfaceLogicHost host, Item is, int slots, CallbackInfo ci) {
try { try {
// 添加更多的安全检查 // 安全检查
if (this.upgrades == null) { if (this.upgrades == null || gridNode == null || host == null || is == null) {
System.err.println("[ExtendedAE_Plus] InterfaceLogic upgrades为null跳过升级槽扩展");
return; return;
} }
if (gridNode == null || host == null || is == null) {
System.err.println("[ExtendedAE_Plus] InterfaceLogic构造参数为null跳过升级槽扩展");
return;
}
System.out.println("[ExtendedAE_Plus] InterfaceLogic升级槽扩展开始");
int currentSlots = this.upgrades.size(); int currentSlots = this.upgrades.size();
System.out.println("[ExtendedAE_Plus] 当前升级槽数量: " + currentSlots);
// 检查Applied Flux是否已经修改了升级槽 // 检查Applied Flux是否已经修改了升级槽
if (UpgradeSlotCompat.isAppfluxPresent()) { if (UpgradeSlotCompat.isAppfluxPresent()) {
System.out.println("[ExtendedAE_Plus] 检测到Applied Flux存在");
if (currentSlots >= 3) { if (currentSlots >= 3) {
// Applied Flux已经增加了升级槽到3个或更多我们不需要再修改 // Applied Flux已经增加了足够的升级槽跳过修改
System.out.println("[ExtendedAE_Plus] Applied Flux已经增加了足够的升级槽跳过修改");
return; return;
} else if (currentSlots == 2) { } else if (currentSlots == 2) {
// Applied Flux增加到2个我们再增加1个到3个 // Applied Flux增加到2个我们再增加1个到3个
System.out.println("[ExtendedAE_Plus] Applied Flux增加到2个槽我们再增加到3个");
this.upgrades = UpgradeInventories.forMachine(is, 3, this::onUpgradesChanged); this.upgrades = UpgradeInventories.forMachine(is, 3, this::onUpgradesChanged);
} else if (currentSlots == 1) { } else if (currentSlots == 1) {
// Applied Flux可能还没有生效我们直接增加到3个 // Applied Flux存在但未生效直接增加到3个
System.out.println("[ExtendedAE_Plus] Applied Flux存在但未生效直接增加到3个槽");
this.upgrades = UpgradeInventories.forMachine(is, 3, this::onUpgradesChanged); this.upgrades = UpgradeInventories.forMachine(is, 3, this::onUpgradesChanged);
} else {
System.out.println("[ExtendedAE_Plus] Applied Flux存在当前槽数异常: " + currentSlots + ",跳过修改");
return;
} }
} else { } else {
System.out.println("[ExtendedAE_Plus] Applied Flux不存在");
if (currentSlots == 1) { if (currentSlots == 1) {
// Applied Flux不存在我们将升级槽从1个增加到2个 // Applied Flux不存在将升级槽从1个增加到2个
System.out.println("[ExtendedAE_Plus] 将升级槽从1个增加到2个");
this.upgrades = UpgradeInventories.forMachine(is, 2, this::onUpgradesChanged); this.upgrades = UpgradeInventories.forMachine(is, 2, this::onUpgradesChanged);
} else {
System.out.println("[ExtendedAE_Plus] Applied Flux不存在当前槽数异常: " + currentSlots + ",跳过修改");
return;
} }
} }
System.out.println("[ExtendedAE_Plus] InterfaceLogic升级槽扩展完成最终槽数: " + this.upgrades.size());
} catch (Exception e) { } catch (Exception e) {
// 发生异常时不修改升级槽确保不会崩溃 // 发生异常时不修改升级槽确保不会崩溃
System.err.println("[ExtendedAE_Plus] Failed to expand interface upgrades: " + e.getMessage());
e.printStackTrace();
} }
} }
} }

View File

@ -94,7 +94,6 @@ public class PatternProviderLogicAdvancedMixin implements AdvancedBlockingHolder
@Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL")) @Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL"))
private void onExportSettings(CompoundTag output, CallbackInfo ci) { private void onExportSettings(CompoundTag output, CallbackInfo ci) {
System.out.println(this.eap$advancedBlocking);
output.putBoolean(EAP_ADV_BLOCKING_KEY, this.eap$advancedBlocking); output.putBoolean(EAP_ADV_BLOCKING_KEY, this.eap$advancedBlocking);
} }

View File

@ -76,7 +76,6 @@ public class PatternProviderLogicDoublingMixin implements SmartDoublingHolder {
@Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL")) @Inject(method = "exportSettings(Lnet/minecraft/nbt/CompoundTag;)V", at = @At("TAIL"))
private void onExportSettings(CompoundTag output, CallbackInfo ci) { private void onExportSettings(CompoundTag output, CallbackInfo ci) {
System.out.println(this.eap$smartDoubling);
output.putBoolean(EAP_SMART_DOUBLING_KEY, this.eap$smartDoubling); output.putBoolean(EAP_SMART_DOUBLING_KEY, this.eap$smartDoubling);
} }