我的世界CrockPot Tweaker 用法

食物值

导包:

import mods.crockpot.CrTFoodValue;

构造函数:

CrTFoodValue();

方法:

put(category as string,value as float) as CrTFoodValue

category 支持的值:”meat”,”monster”,”fish”,”egg”,”fruit”,”veggie”,”dairy”,”sweetener”,”frozen”,”inedible”。

给物品添加食物值:

<recipetype:crockpot:food_values>.addRecipe(name as string,item as IIngredient,value as CrTFoodValue,boolean isTag);

例子:

  • 给铁锭添加1水果。

  • 给所有类型的钻石添加1.5蛋,1肉,2鱼。

<recipetype:crockpot:food_values>.addRecipe("iron",<item:minecraft:iron_ingot>,
new CrTFoodValue().put("fruit",1f),false);

<recipetype:crockpot:food_values>.addRecipe("diamond",<tag:items:forge:gems/diamond>,
new CrTFoodValue().put("egg",1.5f).put("meat",1f).put("fish",2f),false);

烹饪锅配方

需求

导包:

import mods.crockpot.CrTRequirement;

构造函数:

CrTRequirement()

方法:

方法 返回值
addCategoryMax(category as string,value as float) CrTRequirement
addCategoryMax(value as CrTFoodValue) CrTRequirement
addCategoryMin(Category as string,value as float) CrTRequirement
addCategoryMin(value as CrTFoodValue) CrTRequirement
addMustItem(item as IIngredient,amount as int) CrTRequirement
addMustItemLessThan(item as IIngredient,amount as int) CrTRequirement

配方

//默认值
weight = 10, time = 200, potlevel = 0
<recipetype:crockpot:crock_pot_cooking>.addRecipe(name as string,require as CrTRequirement,
output as IItemStack,priority as int);

<recipetype:crockpot:crock_pot_cooking>.addRecipe(name as string,require as CrTRequirement,
output as IItemStack,priority as int,weight as int,time as int,potlevel as int);

<recipetype:crockpot:crock_pot_cooking>.removeRecipe(output as IItemStack);

例子:

  • 添加下界之星的配方,需要最少0.5肉,最多1蛋,必须要有一个铁锭,钻石不能超过三个,优先级20;

  • 添加黑曜石的配方,需要最少2鱼,必须有一个钻石,生鳕鱼数量不能超过一个,优先级100,时间5秒,任意等级烹饪锅都能做。

  • 删除辣椒肉配方。

<recipetype:crockpot:crock_pot_cooking>.addRecipe("nether_star",
new CrTRequirement()
.addCategoryMin("meat",0.5f)
.addCategoryMax("egg",1f)
.addMustItem(<item:minecraft:iron_ingot>,1)
.addMustItemLessThan(<item:minecraft:diamond>,3),
<item:minecraft:nether_star>,20);

<recipetype:crockpot:crock_pot_cooking>.addRecipe("obsidian",
new CrTRequirement()
.addCategoryMin("fish",2f)
.addMustItem(<item:minecraft:diamond>,1)
.addMustItemLessThan(<item:minecraft:cod>,1),
<item:minecraft:obsidian>,100,100,100,0);

<recipetype:crockpot:crock_pot_cooking>.removeRecipe(<item:crockpot:hot_chili>);

爆炸配方

<recipetype:crockpot:explosion_crafting>.addRecipe(name as string,input as IIngredient,output as IItemStack,
lossRate as float,onlyBlock as boolean);
<recipetype:crockpot:explosion_crafting>.removeRecipe(output as IItemStack);

例子:

  • 添加钻石块爆炸产生9个钻石配方,有10%损失。

  • 添加金块爆炸产生9个金锭配方,无损失,只接受方块爆炸(不接受掉落物)。

<recipetype:crockpot:explosion_crafting>.addRecipe("diamond",<item:minecraft:diamond_block>,<item:minecraft:diamond>*9,0.1f,false);

<recipetype:crockpot:explosion_crafting>.addRecipe("gold",<item:minecraft:gold_block>,<item:minecraft:gold_ingot>*9,0f,true);

猪灵交易

物品需求

import mods.crockpot.CrTWeightItem;

构造函数:

CrTWeightItem(stack as IItemStack,min as int,max as int);
CrTWeightItem(stack as IItemStack,min as int,max as int,weight as int);

配方

<recipetype:crockpot:piglin_bartering>.addRecipe(name as string,item as IIngredient,outputs as CrTWeightItem[]);

例子:

猪灵捡起绿宝石交易,80%掉落1~9个煤炭,20%掉落1~2个煤炭块。

<recipetype:crockpot:piglin_bartering>.addRecipe("emerald_to_coal",<item:minecraft:emerald>,[
    new CrTWeightItem(<item:minecraft:coal>,1,9,4),
    new CrTWeightItem(<item:minecraft:coal_block>,1,2)
]);
Copyright © 2018-2023 PHP源码网 版权所有
PHP源码网 » 我的世界CrockPot Tweaker 用法

提供最优质的资源集合

立即查看 了解详情