Tags
Creators
Details
4.7.0
Compatibility
Required content
Changes
Added
- Public API
StrengthenTransferOutcomeandStrengthenTransferCompletedEvent, fired once a star transfer completes, carrying the source, target, target recipe id, source star and decay rate. - Public API
catalog().successRate(),catalog().recipes(),catalog().recipe(String),operations().transfer(),operations().refreshItem(),operations().refreshPlayer()andoperations().openGui().
Changed
- Actions use a new syntax, and you do not have to rewrite anything yourself. On first startup CoreLib rewrites the config files of every Emaki plugin under
plugins/, once only. Each edited file keeps the original beside it with a.legacy-backupsuffix. A line that cannot be converted leaves your config untouched and goes into a separate.v2-failedfile, with the file and line listed in the console. - The six strengthen actions are yours to rename by hand; automatic rewriting does not cover them. Drop the
emakistrengthenprefix forstrengthen:emakistrengthen_set_star→strengthen_set_staremakistrengthen_add_star→strengthen_add_staremakistrengthen_remove_star→strengthen_remove_staremakistrengthen_reset_star→strengthen_reset_staremakistrengthen_clear_layer→strengthen_clear_layeremakistrengthen_rerender→strengthen_rerender
- Strengthen variables inside a recipe's
actions:block need avar.prefix, also by hand. What used to be%star%is now%var.star%. Available names:star,temper,was_star,dropped,protected,operation_id,strengthen_star,strengthen_temper,strengthen_recipe,strengthen_recipe_id,strengthen_max_star,strengthen_success_rate,strengthen_show_item,strengthen_result_slot,strengthen_operation_id. The old%show_item%is gone; use%var.strengthen_show_item%. - Placeholders elsewhere in a recipe are unchanged:
%star%,%temper%,%max_temper%and%temper_color%inlore_actionsandname_actions, and%base_cost%and%star%incost_formula. Only action lines take the prefix, and adding it elsewhere breaks them. - The preview, temper and confirm slots are supplied through placeholders. If you keep your old
gui/strengthen_gui.yml, setcustom_nameofpreview_displayto%preview_title%and itsloreto a single%preview_lines%; set theloreoftemper_displayto a single%temper_lines%, keeping your own title; setcustom_nameofconfirmto%confirm_title%and itsloreto a single%confirm_lines%. Each placeholder expands one entry per line, so no extra lines are needed. The wording lives undergui.preview.*,gui.temper.*andgui.confirm.*in the lang files. - "Forge mark" and "crack" are both called temper now, renamed from
CracktoTemperin English, across GUI titles, the messages and help text of/emakistrengthen clearcrack, the failure messages, and the sample recipe comments and lore. Theclearcrackcommand name, the permissions, the config keys (max_temper,temper_chance_bonus_per_level,temper_boost) and the placeholder names are unchanged; only player-facing wording moved. - Config check lines in the console are coloured by severity, yellow for warnings and red for errors.
- A star transfer attempted without ownership of the target player's thread fails outright instead of skipping
StrengthenTransferEventand completing anyway, which used to bypass third-party listeners. - For developers:
EmakiStrengthenApi.available()is replaced bystatus(), returningApiStatus.canStrengthen(),readState(),preview(),attempt()andrebuild()move behindcatalog()for read-only queries andoperations()for state changes. Every fallible call returnsEmakiResult<T>, and an absent plugin yieldsEmakiResult.unavailable()instead of throwing or returning a fabricated empty object.EmakiStrengthenApi.Bridgeis now@ApiStatus.NonExtendable, andinstall()/uninstall()are@ApiStatus.Internal. - For developers: the model classes move from
emaki.jiuwu.craft.strengthen.modeltoemaki.jiuwu.craft.strengthen.api.model(AttemptContext,AttemptResult,AttemptPreview,AttemptCost,AttemptMaterial,AttemptOutcome,StrengthenState,StrengthenRecipeand the rest). Contract types such asEmakiResult,ApiStatusandItemSourceRefcome fromemaki.jiuwu.craft.corelib.api, so the build base needs CoreLib's API artifact too.
Fixed
- The preview, temper status and confirm slots in the strengthen GUI showing nothing but fixed text, with no success rate, cost, failure penalty, material checklist or current temper. Those three slots configure their own name and lore in
gui/strengthen_gui.yml, and that config overwrote everything the plugin had worked out, so players only ever saw the two hint lines from the file. Content is fed into placeholders now: your config owns the layout, the plugin supplies the live values. The material checklist is not new work either, it was always being worked out and simply swallowed; this is the first time you get to see it, listing every material the current star needs one per line, counted as "amount placed in the GUI / amount required", green when satisfied and red when short, with any other materials already in the GUI in their own section. - The confirm button keeping its anvil icon while requirements were unmet, which made it look clickable. It switches to
BARRIERwith a "cannot strengthen" title as intended. gui_templatein a recipe being ignored. The key was always accepted but never read, so every item openedstrengthen_guiregardless. The GUI now follows the recipe matched by the item in hand and falls back tostrengthen_guiwhen the named template does not exist.- A broken config being half applied.
/emakistrengthen reloadcould leave the language file swapped while the recipes had failed to load, stranding the server between old and new. Everything is checked as a set first, and a failure keeps the whole previous config active, with the offending file and line named in the console.
Removed
- JS scripting, including strengthen chance rules (
registerChanceRule) and result hooks (onResult). There is no automatic conversion, so use a recipe'sconditionandactionsfor the same effect. The bundledscripts/examples/strengthen_success.jssample is gone as well. EmakiStrengthenApiProvider; call the static methods onEmakiStrengthenApidirectly.EmakiStrengthenApi.canStrengthen(), with no direct replacement. Decide it yourself fromcatalog().readState().
Notes
- Update EmakiCoreLib to
4.7.0first. - Back up your whole
plugins/EmakiStrengthen/folder before upgrading, especiallygui/strengthen_gui.ymlandrecipes/. - Four things need doing by hand: renaming the six
emakistrengthen_*actions, prefixing strengthen variables in recipe action lines withvar., rewriting JS chance rules and result hooks as recipe conditions and actions, and converting the three display slots in an oldgui/strengthen_gui.ymlto the placeholder form. Everything else is rewritten for you. - Strengthen layers, stars and temper already on player equipment are unaffected and need no migration. The recipe structure itself has not changed; only the writing inside
actions:needs adjusting. - After updating, run
/emakistrengthen reloadand open the strengthen GUI to confirm the success rate, cost and material checklist all show up.
Emaki Strengthen v4.6.0
MineBBS 更新日志
破坏性变更与必要迁移
- 【破坏性】GUI 槽位物品结构改为嵌套组件:原
item: "<MATERIAL>"搭配display_name、lore、hidden_components: [tooltip],现改为item.source搭配item.components.custom_name、item.components.lore、item.components.tooltip_display.hide_tooltip。自定义gui/strengthen_gui.yml必须迁移。 - 【破坏性】插件描述文件迁移到
paper-plugin.yml,其中的commands:段已移除,必须使用 Paper 系服务端。 - 【破坏性】
AttemptContext与AttemptResult从 Java record 改为 final 类:访问器方法名保持不变,但 record 模式解构不再可用,依赖 record 语义的反射或序列化使用方需要调整。 - 【移除】浏览器端 Web Console 层整体移除:
web-console.yml、web-extensions/、对应的 CSS 资源以及web-console/前端项目。 - 【移除】强化路线预览能力整体移除。它此前只有浏览器端入口,没有游戏内命令或 GUI,因此影响范围仅限 Web Console 用户。
新增功能
- 新增配置项
release_default_data(默认true);设为false后不再释放自带的示例强化配方与脚本示例。 - 新增六个可配置手持物品动作:
emakistrengthen_set_star、emakistrengthen_add_star、emakistrengthen_remove_star、emakistrengthen_reset_star、emakistrengthen_clear_layer、emakistrengthen_rerender。 - 配置预检文本可本地化,加载类型名称可翻译。
- 公开 API 新增
AttemptOutcome枚举(NOT_COMMITTED、COMMITTED_SUCCESS、COMMITTED_FAILURE、COMPENSATION_PENDING),把「判定成功」与「事务已提交」区分开。 - 公开 API 新增幂等键
operationId,通过AttemptContext、AttemptResult(operationId()、outcome()、committed()、compensationPending())以及强化尝试相关事件暴露。 - 新增对 EmakiItem 的可选软依赖;未安装该插件时,EmakiAttribute 对接会降级运行,不再直接失败。
API 行为调整
StrengthenPreAttemptEvent.getTargetItem()改为返回防御性副本,修改它不再影响真正的强化输入;成功率会被限制在 0–100,非有限数值按 0 处理。AttemptContext.materialInputs现在保留 null 占位,使列表下标可以继续作为稳定的 GUI 槽位标识。此前假设「列表长度等于材料数量」的调用方会受影响。- API 不再修改通过
AttemptContext传入的物品堆:调用方需要自己应用AttemptResult.resultItem(),并自行处理外部背包中的材料消耗。
结算与会话可靠性
- 经济扣费失败的处理从直接退款改为「回滚加待补偿」:物品与货币分别回滚,未完成的回滚会被报告为待补偿,而不是当作已退款。
- 结算后返还剩余材料时会同时清理对应的会话槽位状态,关闭 GUI 只会关闭当前会话。
- 消息前缀更换为新的品牌渐变配色。
修复
- 强化结果消息路径存在空指针,导致该情况下玩家收不到结果反馈;现已补上缺失的空值检查。
/emakistrengthen reload的回复改为在发送者自身的执行域上送达,这是 Folia 上的正确行为所必需的。
运行环境与兼容性
api-version由1.21提升到1.21.8;构建基座由 spigot-api 改为 paper-api,使用本插件 API 的开发者需要同步切换编译基座。- Java 目标版本仍为 25,
folia-supported: true保持不变,权限集与子命令集保持不变(inspect/refresh/setstar/clearstate/clearcrack/givecatalyst)。
升级说明
- 需要 EmakiCoreLib
4.6.0。 - 升级前请备份
gui/strengthen_gui.yml并按上述结构迁移;如不希望再释放示例数据,可将release_default_data设为false。 - 升级后建议执行一次
/emakistrengthen reload,并验证强化流程、材料返还与结果提示是否正常。
SpigotMC Update Log
[CENTER][SIZE=6][B]◆ Emaki Strengthen v4.6.0 Release ◆[/B][/SIZE][/CENTER] [CENTER]Outcome and idempotency additions to the API, rollback with pending compensation, a new GUI item structure, and a Paper-only 1.21.8+ baseline.[/CENTER] [CENTER][B]━━━━━━━━━━━━━━━━━━━━[/B][/CENTER] [LIST] []Added the config key release_default_data (default true); set it to false to stop writing the bundled sample strengthen recipes and script examples. []Added six configurable held-item actions: emakistrengthen_set_star, emakistrengthen_add_star, emakistrengthen_remove_star, emakistrengthen_reset_star, emakistrengthen_clear_layer, emakistrengthen_rerender. []Config precheck text is localizable and load type names are translatable. []The public API adds an AttemptOutcome enum (NOT_COMMITTED, COMMITTED_SUCCESS, COMMITTED_FAILURE, COMPENSATION_PENDING), separating "the roll succeeded" from "the transaction committed". []The public API adds an idempotency key operationId, exposed through AttemptContext, AttemptResult (operationId(), outcome(), committed(), compensationPending()) and the attempt events. []Added an optional soft dependency on EmakiItem; the EmakiAttribute integration now degrades gracefully when that plugin is absent. []Economy charge failure changed from a direct refund to rollback plus pending compensation: items and currency roll back separately and an incomplete rollback is reported as pending instead of being treated as refunded. []StrengthenPreAttemptEvent.getTargetItem() now returns a defensive copy, so mutating it no longer affects the real strengthen input; success rate is clamped to 0-100 and non-finite values become zero. []AttemptContext.materialInputs now keeps null placeholders so list indexes remain stable GUI slot identifiers. Callers that assumed "list length equals material count" are affected. []The API no longer mutates the item stacks passed in through AttemptContext; callers apply AttemptResult.resultItem() themselves and handle external inventory material consumption themselves. []Returning leftover materials after settlement now also clears the corresponding session slot state, and closing the GUI only closes the current session. []Fixed a null-pointer in the strengthen result message path that left players with no result feedback in that case. []Fixed /emakistrengthen reload replies so they are delivered on the sender's execution domain, which is required for correctness on Folia. []Breaking: AttemptContext and AttemptResult changed from Java records to final classes. Accessor method names are preserved, but record pattern destructuring no longer works and reflection or serialization consumers relying on record semantics must adjust. []Breaking: GUI slot items move to nested components - item.source plus item.components.custom_name, item.components.lore, and item.components.tooltip_display.hide_tooltip. Custom gui/strengthen_gui.yml must be migrated. []Breaking: the descriptor moved to paper-plugin.yml and its commands section is gone; Paper is required. []Removed: the browser-based Web Console layer (web-console.yml, web-extensions/, the CSS asset, the web-console/ frontend project). []Removed: the strengthen route preview capability. It only ever had a browser-side entry point, with no in-game command or GUI, so the impact is limited to Web Console users. []api-version raised from 1.21 to 1.21.8 and the build base moved from spigot-api to paper-api. Java target stays 25, folia-supported stays true, and the permission and subcommand sets are unchanged. []Requires EmakiCoreLib 4.6.0. Back up gui/strengthen_gui.yml before updating. [/LIST]
Modrinth Changelog
Added
- Config key
release_default_data(defaulttrue); setfalseto stop writing the bundled sample strengthen recipes and script examples. - Six configurable held-item actions:
emakistrengthen_set_star,emakistrengthen_add_star,emakistrengthen_remove_star,emakistrengthen_reset_star,emakistrengthen_clear_layer,emakistrengthen_rerender. - Localizable config precheck text and translatable load type names.
- Public API
AttemptOutcomeenum (NOT_COMMITTED,COMMITTED_SUCCESS,COMMITTED_FAILURE,COMPENSATION_PENDING), separating "the roll succeeded" from "the transaction committed". - Public API idempotency key
operationId, exposed throughAttemptContext,AttemptResult(operationId(),outcome(),committed(),compensationPending()) and the attempt events. - Optional soft dependency on EmakiItem, so the EmakiAttribute integration degrades gracefully when that plugin is absent.
Changed
- Economy charge failure changed from a direct refund to "rollback plus pending compensation": items and currency roll back separately and an incomplete rollback is reported as pending instead of being treated as refunded.
StrengthenPreAttemptEvent.getTargetItem()now returns a defensive copy, so mutating it no longer affects the real strengthen input; success rate is clamped to 0-100 and non-finite values become zero.AttemptContext.materialInputsnow keeps null placeholders so list indexes remain stable GUI slot identifiers. Callers that assumed "list length equals material count" are affected.- The API no longer mutates the item stacks passed in through
AttemptContext; callers applyAttemptResult.resultItem()themselves and handle external inventory material consumption themselves. - Returning leftover materials after settlement now also clears the corresponding session slot state, and closing the GUI only closes the current session.
- Message prefix switched to a new brand gradient.
api-versionraised from1.21to1.21.8; the build base moved from spigot-api to paper-api. Java target stays 25,folia-supported: trueand the permission and subcommand sets (inspect/refresh/setstar/clearstate/clearcrack/givecatalyst) are unchanged.
Fixed
- A null-pointer in the strengthen result message path meant players received no result feedback in that case; the missing null check is added.
/emakistrengthen reloadreplies are delivered on the sender's execution domain, which is required for correctness on Folia.
Removed
- The browser-based Web Console layer (
web-console.yml,web-extensions/, the CSS asset, theweb-console/frontend project). - The strengthen route preview capability, entirely. It only ever had a browser-side entry point (no in-game command or GUI), so the impact is limited to Web Console users.
- Record semantics for
AttemptContextandAttemptResult, which changed from Java records to final classes. Accessor method names are preserved, but record pattern destructuring no longer works and reflection or serialization consumers relying on record semantics must adjust. - The flat GUI slot item structure:
item: "<MATERIAL>"withdisplay_name,loreandhidden_components: [tooltip]becomesitem.sourcewithitem.components.custom_name,item.components.loreanditem.components.tooltip_display.hide_tooltip. Customgui/strengthen_gui.ymlmust be migrated. - The
commands:section, as the descriptor moved topaper-plugin.yml. Paper is required.
Notes
- Requires EmakiCoreLib 4.6.0.
- Back up
gui/strengthen_gui.ymland migrate it to the structure above; setrelease_default_datatofalseif you no longer want the bundled sample data written. - After updating, run
/emakistrengthen reloadand verify the strengthen flow, material returns and result messages.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:SH4PlNS2:Y1e90CGh"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:SH4PlNS2:Y1e90CGh"
}


