9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 12:29:15 +00:00

修复networkhandler处理逻辑

This commit is contained in:
XiaoMoMi
2025-07-04 04:40:56 +08:00
parent d3db03b4b5
commit d54d9925f9
3 changed files with 5 additions and 1 deletions

View File

@@ -87,6 +87,8 @@ public final class LegacyNetworkItemHandler implements NetworkItemHandler<ItemSt
}
for (ItemDataModifier<ItemStack> modifier : customItem.clientBoundDataModifiers()) {
modifier.prepareNetworkItem(wrapped, context, tag);
}
for (ItemDataModifier<ItemStack> modifier : customItem.clientBoundDataModifiers()) {
modifier.apply(wrapped, context);
}
if (Config.interceptItem()) {

View File

@@ -90,6 +90,8 @@ public final class ModernNetworkItemHandler implements NetworkItemHandler<ItemSt
CompoundTag tag = new CompoundTag();
for (ItemDataModifier<ItemStack> modifier : customItem.clientBoundDataModifiers()) {
modifier.prepareNetworkItem(wrapped, context, tag);
}
for (ItemDataModifier<ItemStack> modifier : customItem.clientBoundDataModifiers()) {
modifier.apply(wrapped, context);
}
if (Config.interceptItem()) {