手冊: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