feat(curios): 整合 Curios 兼容性并优化沙漏激活逻辑
- 移除 CuriosCompat 类,直接在 FantasyTools 中处理 Curios 兼容
- 重构 ClientTickEvents,优化沙漏激活条件判断
- 重写 ServerPayloadHandlers 中的沙漏处理逻辑,提高代码可读性和维护性
- 新增 HourglassUtils 工具类,用于查找和处理沙漏物品- 更新数据包结构和处理流程,确保安全性和准确性
fix(fantasytools): 优化副产物逻辑和传送嬗变配方- 在 ByproductsBinding 中添加了对无效参数的检查和异常抛出
- 调整了 PortalTransformRecipeSchema 中的代码格式
- 更新了隐形兽毛皮的中文翻译
Refactor(recipe): Overhaul byproduct logic
- Convert byproduct list from
List
toOptional<List>
for null-safe representation - Streamlined code architecture with enhanced null handling
- Implemented flexible serialization/deserialization protocols
Feat(kubejs): Portal Transmutation Upgrade
- Restructured codebase with dedicated
byproduct
package - Introduced
ByproductComponent
factory pattern - Integrated
CountRange
for dynamic quantity randomization - Updated
PortalTransformRecipeSchema
with byproduct support
Plain English:
Now you can add portal recipes with random bonus drops using KubeJS! The new system lets you:
- Set chance rates (0.1 = 10% probability)
- Define quantity ranges (1-2 items)
- Chain multiple bonus items per recipe
// KubeJS Usage Example
ServerEvents.recipes((event) => {
event.recipes.fantasytools.portal_transform(
'minecraft:paper',
'minecraft:iron_ingot',
'the_nether',
'overworld',
[
Byproducts.of('minecraft:redstone', 0.9, 1, 3)
]
).id("paper_to_iron");
})