仅在 1.21.7 版本下测试过模组
如果您在 GitHub 上报告任何错误,我将不胜感激。
Shadow Items Mod 是一个向游戏中添加(更准确地说,是恢复)暗影物品的模组,这些物品自 1.21.1 起便无法获取。
暗影物品是指可以同时存在于两个位置的物品(例如,同时出现在两名不同玩家的物品栏中)。这并非复制,因为实际上只有一个堆叠(更改其中一个堆叠会立即触发对另一个暗影物品的更新)。
您可以通过尝试将物品移动到标记为“已链接”的漩涡中来“链接”物品。这将在视觉上创建两个物品,但实际上它们是暗影物品,因此一切正常。
有几种方法可以从物品上移除标签(即取消特定物品的链接):只需从槽位中取出一半数量的物品、从发射器中投掷它、将物品放入标记为“未链接”的漏斗中,或者自行丢弃该物品。
该模组拥有一个内部注册表,可确保所有物品栏中的物品同步。(它不仅扫描玩家物品栏,还扫描任何实体物品栏,包括实体方块。但模组不会扫描实体上的物品。如果您以某种方式丢弃了暗影物品,它将不会与其他物品同步。)
此注册表记录所有包含暗影物品的槽位,并根据内部 ID 正确链接物品(技术上来说,它会替换对 Java 对象的引用)。
暗影物品极其稳定。它们可以承受服务器重启或简单的区块加载。我的模组的唯一弱点在于嵌套容器。如果您携带一个装有暗影物品的潜影盒,暗影物品将会被断开链接,但一旦您将潜影盒放置在地面上,链接就会恢复。
MOD TESTED ONLY ON 1.21.7
I'd appreciate it if you report any bugs on my GitHub
Shadow Items Mod is a mod that adds (or more accurately, restores) shadow items to the game, which became unobtainable after 1.21.1.
Shadow items are items that can exist in two places at once (for example, in two different players' inventories). This isn't a duplication, as there's only one stack (changing one stack immediately triggers an update to the other shadow item).
You can "link" items by trying to move an item to the vortex labeled "Linked." This will visually create two items, but in reality, they'll be shadow items, so everything is fine.
There are several ways to remove a tag from an item (i.e., unlink a specific item): simply take half a stack from the slot, drop it from a dispenser, place the item in a hopper labeled "UnLinked," or drop the item yourself.
The mod has an internal registry that ensures item synchronization across all inventories.
(It scans not only player inventories, but also any entity inventory, including entity blocks. BUT the mod does not scan entity items. If you somehow drop a shadow item, it will not sync with other items.)
This registry records all slots with shadow items and, depending on the internal ID, correctly links the items (technically, it replaces references to Java objects).
Shadow items are extremely stable. They can withstand a server restart or a simple chunk upload. The only weakness of my mod is nested containers. If you take a shulker with a shadow item, the shadow item will be unlinked, but as soon as you place the shulker on the ground, the link will be restored.
评论 0
登录后参与评分
还没有评论,来抢沙发吧