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

添加attribute-modifiers随机化支持

This commit is contained in:
XiaoMoMi
2025-07-30 20:54:33 +08:00
parent cd43273d4c
commit 0b57d08eca
4 changed files with 42 additions and 15 deletions

View File

@@ -606,6 +606,6 @@ public class ComponentItemFactory1_20_5 extends BukkitItemFactory<ComponentItemW
modifierTag.putString("operation", modifier.operation().id());
modifiers.add(modifierTag);
}
item.setNBTComponent(ComponentKeys.ATTRIBUTE_MODIFIERS, compoundTag);
item.setSparrowNBTComponent(ComponentKeys.ATTRIBUTE_MODIFIERS, compoundTag);
}
}

View File

@@ -151,6 +151,6 @@ public class ComponentItemFactory1_21_5 extends ComponentItemFactory1_21_4 {
}
modifiers.add(modifierTag);
}
item.setNBTComponent(ComponentKeys.ATTRIBUTE_MODIFIERS, modifiers);
item.setSparrowNBTComponent(ComponentKeys.ATTRIBUTE_MODIFIERS, modifiers);
}
}