Skip to content

Releases: HOMEFTW/AE2-IntelligentScheduling

v0.1.9.5 - View-status fix + restart aligned with AE2

Choose a tag to compare

@HOMEFTW HOMEFTW released this 30 Apr 15:35

v0.1.9.5 - View-status button fix + restart aligned with AE2 (G15)

Two-bug release.

Bug A: post-restart View Status button click did nothing

Root cause. After a restart the player would click "View Status",
the client would set the openSmartCraftStatusOnNextSync flag and
send RequestOrderStatusPacket, the server would reply with a LIST
sync packet... and the client's list-packet handler did nothing with
the flag. Only the single-order sync path (used when submitting a new
order) consumed the flag and opened the dedicated status GUI.

This bug has actually been there since v0.1.7 introduced the multi-
order list packet; pre-v0.1.9 it stayed hidden because players almost
always submit a new order before clicking View Status, which routes
through the single-order path. v0.1.9.3 persistence + v0.1.9.4 login-
sync removed that workaround for restart cases and exposed it.

Fix. ClientProxy.applySmartCraftOrderList mirrors the GUI-open
logic from openSmartCraftStatus: when the flag is set, open
GuiSmartCraftStatus using the overlay's currently-focused order
packet as the initial data.

Bug B: align restart behavior with AE2 vanilla

User-chosen direction: AE2 doesn't persist crafting jobs across
restarts; cluster state resets and intermediate items stay inside
each cluster's storage for the player to manually cancel. Smart-craft
orders should mirror that semantic: persist for history visibility
only
, no auto-resume.

Implementation.

  • New SmartCraftOrder.interruptedByRestart boolean field, NBT-
    persisted (true only; missing tag reads as false for backward
    compatibility).
  • SmartCraftOrderManager.resetForRestart folds non-terminal tasks
    to CANCELLED with a "Interrupted by server restart" banner and
    marks the order itself CANCELLED + interruptedByRestart=true.
    Already-terminal orders (PAUSED / COMPLETED / etc.) keep their
    status untouched.
  • SmartCraftOrderManager.retryFailedTasks returns empty on
    interrupted orders; the player must submit a fresh order.
  • New SmartCraftRuntimeCoordinator.removeOrder(orderId) API drops
    an order from the manager outright + cleans session/retry state.
  • RequestSmartCraftActionPacket CANCEL_ORDER: routes to
    removeOrder for interrupted orders ("Remove from List"
    semantic) and to cancel for normal active orders.
  • SyncSmartCraftOrderPacket carries the new flag, appended at
    the end of the wire format with a readableBytes guard so a
    v0.1.9.4 client receiving a v0.1.9.5 packet falls through with
    the default false.

GUI.

  • Retry button greys out on interrupted orders.
  • Cancel button stays enabled but its label flips to "Remove from
    List" so the player understands the click drops the historical
    entry, not a live cancellation.
  • Status line gets a red "Interrupted by server restart (history-
    only)" tag so historical orders are visually distinct.

Tests

  • 5 new tests covering the new semantics: fold-to-CANCELLED, all-
    terminal-no-marker, retry rejection, NBT round-trip true / false.
  • 125 tests total, all green.

Migration

No action needed. Drop the new jar in. Existing v0.1.9.3+ saves
load transparently. Orders that were active at the v0.1.9.5 first
boot will appear as historical entries with the new red banner;
click "Remove from List" to clean them up, then submit fresh orders
for any work you still want done.

Artefacts

Jar Purpose
ae2intelligentscheduling-0.1.9.5.jar Player drop-in (notch obfuscation)
ae2intelligentscheduling-0.1.9.5-dev.jar SRG mappings, for development
ae2intelligentscheduling-0.1.9.5-sources.jar Source jar

v0.1.9.2 - SmartCraft global submission cap

Choose a tag to compare

@HOMEFTW HOMEFTW released this 30 Apr 11:52

v0.1.9.2 — SmartCraft global submission cap (G13)

Throttles SmartCraft's parallel task dispatch so Programmable Hatches'
Auto CPU multiblock (TileCPU) can no longer be pushed into infinite
CraftingCPUCluster creation. Default cap = 50; set via
maxConcurrentSmartCraftSubmissions in
config/AE2-IntelligentScheduling.cfg (range 0-1024, 0 disables).

Why this exists

TileCPU.onPostTick mints a fresh CraftingCPUCluster every server
tick whenever every existing cluster is busy. SmartCraft's analyser
splits a single big order into hundreds of parallel tasks; each task
acquires a cluster and the Auto CPU just keeps allocating new ones
until the server tick is dominated by GC.

What the cap does

  • Counts SmartCraft tasks currently holding an AE2 craftingLink
    (i.e. occupying a cluster) across all orders and all players.
  • When the count would exceed the cap, excess tasks keep their
    cached AE2 plan
    but stay in WAITING_CPU with a
    Throttled: SmartCraft global submission cap reached (N) banner.
  • As soon as another task's link finishes, a slot frees up and a
    throttled task picks it up next tick — no plan recomputation cost.

What the cap does not affect

  • Player-initiated crafts. Manual crafts via the AE2 Crafting
    Confirm screen go through ContainerCraftConfirm → submitJob and
    never touch SmartCraftRuntimeCoordinator. The cap is structurally
    invisible to those.
  • Failed submits. When AE2's submitJob returns null (no link
    granted), the budget is not consumed — the existing
    SUBMIT_RETRY_MAX_ATTEMPTS backoff loop continues to work normally.

Stats logging

The periodic SmartCraft stats: line now includes
submissionsThrottledByCap=N activeSubmissions=X/cap=Y so admins can
spot whether the cap is the dominant throttle on a given server.

Tests

33 passing (added 2 cap-specific tests):

  • global_submission_cap_throttles_excess_tasks_v0192 — 4 tasks + 4
    idle CPUs + cap=2 → exactly 2 reach RUNNING, 2 carry the throttle
    banner, globalActiveSubmissions() == 2.
  • global_submission_cap_zero_disables_throttling_v0192 — cap=0
    sentinel lets every task reach RUNNING (verifies the disabled
    semantics).

Artefacts

Jar Purpose
ae2intelligentscheduling-0.1.9.2.jar Player drop-in (notch obfuscation)
ae2intelligentscheduling-0.1.9.2-dev.jar SRG mappings, for development
ae2intelligentscheduling-0.1.9.2-sources.jar Source jar

Drop the first one into your mods/ folder. Requires Minecraft 1.7.10
with GTNH 2.8.4 manifest dependencies (AE2 / Forge).

v0.1.9.1 - Smart Craft persistence + 4-layer retry

Choose a tag to compare

@HOMEFTW HOMEFTW released this 29 Apr 12:03

v0.1.9.1 — Smart Craft persistence + 4-layer retry rollup

This is the cumulative release covering all increments from v0.1.1 through
v0.1.9.1 since v0.1.0. Highlights below; see log.md for the per-version
design notes and ToDOLIST.md for the task lists.

User-visible features

  • Multi-order tabs UI — every active smart-craft order gets its own tab
    with the player who issued it, the final-product icon, and a per-tab status
    dot. Owner gating ensures only the issuer can cancel / retry.
  • 4-layer retry mechanism — automatic backoff on three transient failure
    modes (plan / submit / link-cancel) plus full server-restart recovery.
    • L1 plan retry (5 / 10 / 20 / 40 / 80 tick backoff)
    • L2 submit retry (20 / 60 / 200 / 600 / 1200 tick backoff)
    • L3 link-cancel retry (6000 / 18000 / 36000 tick backoff)
    • L4 server-restart recovery (NBT + WorldSavedData + on-demand session
      rebind via the player's open AE2 container)
  • Per-task failure count — detail panel and tooltip surface
    failed N times so players can spot tasks that are currently struggling
    through retries.
  • Final-product tab icon — tabs always show the order's root request
    ItemStack rather than whatever leaf raw material happened to be the first
    task in the layer list.

Internals

  • SmartCraftOrderBuilder height-from-leaves layering with merge thresholds
    (SmartCraftMergeThreshold).
  • SmartCraftRequestKeyRegistry keeps the model package free of AE2
    imports; AE2 integration registers itself in preInit.
  • ownerName propagated end-to-end through SmartCraftOrder / Layer /
    Task NBT so re-binding after restart never targets the wrong player.
  • attemptRebindSession is owner-gated and uses reflection (getTarget())
    so it works across AE2 forks.
  • 31 unit tests passing (RuntimeCoordinator, OrderBuilder, OrderManager,
    packet codec, GUI button layout).

Artefacts

Jar Purpose
ae2intelligentscheduling-0.1.9.1.jar Player drop-in (notch obfuscation)
ae2intelligentscheduling-0.1.9.1-dev.jar SRG mappings, for development environments
ae2intelligentscheduling-0.1.9.1-sources.jar Source jar

Drop the first one into your mods/ folder. Requires Minecraft 1.7.10 with
GTNH 2.8.4 manifest dependencies (AE2 / Forge).

v0.1.0 - AE2 智能合成调度首发

Choose a tag to compare

@HOMEFTW HOMEFTW released this 28 Apr 09:39

v0.1.0 AE2 智能合成调度首个发布

为 GTNH(Minecraft 1.7.10)的 Applied Energistics 2 提供分层智能合成调度,把一次大合成切分成 layer 顺序自动派发到空闲 CPU。

主要功能

  • 在 AE2 合成确认页注入 智能合成 按钮,一键生成调度订单
  • 多层任务规划:层内并行、层间顺序推进
  • 自动 CPU 调度:每个 server tick 检查空闲 CPU 并提交规划好的任务
  • 自定义状态界面(6x3 任务格 / 滚动条 / 状态色完全对齐 AE2 GuiCraftingCPU)
  • AE2 合成状态页注入 查看调度 按钮和补充 tooltip
  • 取消整单 / 重试失败任务,正确回收 AE2 link
  • 中英双语本地化

关键 bug 修复

  • SmartCraftRequesterBridge.injectCraftedItems 改为返回 items(拒收)以让 AE2 把产物路由进 ME 存储(之前返回 null 会让产物消失)
  • applyLayerStatus 在 [FAILED, WAITING_CPU] 组合下不再误判为 PAUSED,保证 retry 后能继续推进
  • reconcileTaskExecution 在 link.isDone() 时直接 DONE,去掉错位的 baseline-delta 验证(之前会让任务永远卡死 VERIFYING_OUTPUT)
  • OpenSmartCraftPreviewPacket A3 / A4 失败路径不再产生孤儿订单和无响应按钮

安装

  1. 下载下面的 ae2intelligentscheduling-0.1.0.jar
  2. 放到客户端 / 服务端的 mods/ 目录
  3. 启动游戏,无需额外配置

依赖

  • Minecraft 1.7.10
  • Forge 10.13.4.1614
  • AE2 Unofficial GTNH rv3-beta-695+

已知限制

  • 仅支持单玩家发起的合成上下文;自动机器(接口、子网)触发的合成走 AE2 原生流程
  • 订单不持久化到存档;服务器重启后未完成的智能合成订单会丢失,AE2 已下发的 link 由 AE2 自行处理
  • 仅在 AE2 GTNH 分支上测试过