mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 18:09:27 +00:00
fix(item): 修复 Java组件设置中的潜在类型转换问题
This commit is contained in:
@@ -92,7 +92,8 @@ public class ComponentItemWrapper implements ItemWrapper<ItemStack> {
|
||||
}
|
||||
|
||||
public void setJavaComponent(Object type, Object value) {
|
||||
setComponentInternal(type, MRegistryOps.JAVA, value);
|
||||
setSparrowNBTComponent(type, MRegistryOps.JAVA.convertTo(MRegistryOps.SPARROW_NBT, value));
|
||||
// setComponentInternal(type, MRegistryOps.JAVA, value); // 这里可能出现潜在的Integer和Boolean不区分问题
|
||||
}
|
||||
|
||||
public void setJsonComponent(Object type, JsonElement value) {
|
||||
|
||||
Reference in New Issue
Block a user