Skip to content

feat: port Fuream to Spigot / Purpur (supporting MC 1.7-26.2) - #2

Open
az7627 wants to merge 14 commits into
mainfrom
develop-az7627
Open

feat: port Fuream to Spigot / Purpur (supporting MC 1.7-26.2)#2
az7627 wants to merge 14 commits into
mainfrom
develop-az7627

Conversation

@az7627

@az7627 az7627 commented Aug 27, 2026

Copy link
Copy Markdown
Member

概述 / Summary

将 Fuream(熔炉格子扩容 & 经验累积 & 配方冲突解决)从 Fabric 模组移植至 Spigot / Purpur 服务端插件,支持从 Minecraft 1.7 至 26.2 全版本,并与原 Fabric 1.20.1 存档保持 100% 双向 NBT 结构互通。

主要内容 / Features

1. 核心功能 1:1 移植

  • 多槽位扩容:支持输入、燃料、输出区域的多格扩容与多页 GUI 翻页交互。
  • 经验累积与提取:精确累积熔炼经验值并支持通过 GUI 按钮提取。
  • 配方冲突解决:多配方匹配时支持界面选择与输入槽配方锁定持久化。
  • 自动化支持:漏斗与漏斗矿车输入/输出抽取行为与 Fabric 版一致。
  • 红石比较器兼容:基于 Fabric 三槽遮罩视图精确计算输出信号强度并更新邻居。

2. 跨版本兼容架构(1.7 – 26.2)

  • 采用 Java 8 核心适配层,按服务端运行版本动态装载适配器(1.7–1.12、1.13–1.16.5、1.17–1.20.4、1.20.5–26.2)。
  • 打包输出 3 个版本专属变体 Jar:
    • fuream-legacy-1.7-1.12.jar (1.7–1.12)
    • fuream-flattening-1.13-1.20.4.jar (1.13–1.20.4)
    • fuream-components-1.20.5-26.2.jar (1.20.5–26.2)

3. 原生根 NBT 持久化

  • 完全内建原生反射 NBT 驱动。
  • 使用 ByteBuddy 动态 Agent 拦截熔炉方块实体的序列化/反序列化,将 FureamData 写入真实根 NBT,与 Fabric 模组存档完全无缝互通。

4. 熔炉生命周期与多世界配置

  • 被动模式投影(Passive Mode):在禁用 Fuream 的世界或熔炉中,将首个有效物品投影至原生三槽由原版逻辑运行;重新启用时无损回收,避免物品丢失或复制。
  • 独立多会话 GUI:多玩家同时打开同一个熔炉时独立维护页面和状态,互不干扰。
  • 世界配置继承:支持 fuream.json 配置加载,当下界或末地文件夹不存在配置文件时,自动继承主世界配置。

az7627 and others added 12 commits August 25, 2026 22:41
…and remove NBTAPI dependency

- Support MC 1.7 to 26.2 across three variant jars (legacy 1.7-1.12, flattening 1.13-1.20.4, components 1.20.5-26.2)
- Remove external NBTAPI dependency; direct native NBT serialization via ByteBuddy and reflection
- Add compat layer for blocks, items, recipes, events, and masked 3-slot comparator signal
- Implement passive mode projection for disabled furnaces, preserving extra slots in NBT
- Isolate GUI sessions per player to support concurrent multi-player furnace interaction
- Add explosion handling, wet sponge bucket conversion, and multi-slot output distribution
- Support dimension config inheritance from overworld and complete config roundtrip serialization
- Add comprehensive unit tests covering version detection, adapters, config, and engine logic
Merge main into develop-az7627
…or disabled furnaces

- Introduce PassiveLaneProjection to stream virtual items to vanilla slots when Fuream is disabled
- Support preferred fuel selection with fallback to first present stack
- Handle seamless refilling as vanilla furnace consumes items during passive mode
- Accurately restore projected items back to their original virtual slots upon re-enabling
- Add unit tests verifying zero duplication, preferred fuel switching, and lane exhaustion
@az7627 az7627 changed the title feat(spigot): implement Spigot/Purpur multi-version support (1.7-26.2) with Fabric-compatible native NBT feat: port Fuream to Spigot / Purpur (supporting MC 1.7-26.2) Aug 27, 2026
az7627 added 2 commits August 28, 2026 23:31
…d continuous item pulling

- Retain FureamData NBT compound with PassiveProjected marker when virtual lanes are empty during passive mode
- Restrict passive projection to at most one stack on disable, avoiding unintended continuous pulling from hidden slots
- Sync only furnace burn and cook times during passive mode instead of actively altering virtual lanes
- Add unit tests for passive projection NBT tag retention
…haul

- Replace brute-force hopper scanning with native slot projection and VanillaFurnaceGuardListener
- Add FurnaceStateTransaction for atomic snapshot-based timing and inventory commits
- Add dynamic RecipeIndex and RecipeIndexListener for O(1) recipe resolution on hot tick paths
- Introduce NbtSelfTest and FurnaceNbtRuntime for fail-fast NBT verification and robust codec handling
- Refactor FureamWorldConfigImpl with table-driven parsing, slot bounds checks, and corruption protection
- Optimize GUI differential slot rendering and adopt standard Java collections
- Align wet sponge bucket conversion and special furnace fuel durations with Fabric semantics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant