手册:Item.setProperties

来自Minecraft基岩版开发Wiki

语法[编辑]

Item.setProperties(par1int, par2Object);

参数[编辑]

参数一

int类型 物品id

参数二

Object类型 属性 (同items.json中使用方法)

效果[编辑]

设定物品属性

参考[编辑]

Item.setProperties(1,{
	"use_animation": "eat",
	"use_duration": 32,
	"food": {
		"nutrition": 4,
		"saturation_modifier": "low",
		"is_meat": false
	    }
		}
	);

Template:ModPE