函数
基本格式
public function 函数名(参数表) as 返回类型名 {
[代码]
return 函数返回值;
}参数默认值
例子
将删合成与加合成打包起来
public function tweakRecipeShapeless(out as IItemStack, shapeless as IIngredient[]) as void {
craftingTable.removeRecipe(out);
craftingTable.addShapeless(out.registryName, out, shapeless);
// registryName 为 IItemStack 的一个 Getter,返回物品的注册名,用于指定配方名
}另一个加法
默认参数
最后更新于