我的世界GDTweaker 使用方法
1.12.2
首先导包:
import mods.GDTweaker.GDTweaker;
添加配方:
GDTweaker.addPurifyRecipe(input as IItemStack, output1 as IItemStack, output2 as IItemStack, xp as float);
GDTweaker.addGlitterRecipe(input as IItemStack, output1 as IItemStack, output2 as IItemStack, xp as float);
删除配方(根据输入物品来删除配方):
GDTweaker.removePurifyRecipe(input as IItemStack);
GDTweaker.removeGlitterRecipe(input as IItemStack);
例子:
-
添加一个钻石 Purifier 石头和泥土的配方,产出1经验。
-
添加一个钻石块 Restructurer 为下界之星和铁锭的配方,产出1经验。
-
删除 Corrupt Grass 的 Purifier 配方。
-
删除 Green Opal 的 Restructurer 配方。
GDTweaker.addPurifyRecipe(<minecraft:diamond>,<minecraft:stone>,<minecraft:dirt>,1);
GDTweaker.addGlitterRecipe(<minecraft:diamond_block>,<minecraft:nether_star>,<minecraft:iron_ingot>,1);
GDTweaker.removePurifyRecipe(<gaiadimension:corrupt_grass>);
GDTweaker.removeGlitterRecipe(<gaiadimension:green_opal>);
1.16.5
添加配方:
<recipetype:gaiadimension:purifying>.addRecipe(name as string, input as IIngredient, output1 as IItemStack,
output2 as IItemStack, xp as float, time as int);
<recipetype:gaiadimension:restructuring>.addRecipe(name as string, input as IIngredient, output1 as IItemStack,
output2 as IItemStack, xp as float, time as int);
删除配方:
因为在1.16版本支持了 IIngredient 的输入,因此仅限通过配方id来删除配方。
<recipetype:gaiadimension:purifying>.removeRecipeByName(name as string);
<recipetype:gaiadimension:restructuring>.removeRecipeByName(name as string);
例子:
-
添加一个钻石 Purifier 煤炭和木炭的配方,产出1经验。
-
删除 Pink Agate Wood 的 Purifier 配方。
-
添加一个附魔金苹果 Restructurer 为金苹果和金锭的配方,产出1经验。
-
删除 Proustite 的 Restructurer 配方。
<recipetype:gaiadimension:purifying>.addRecipe("test",<item:minecraft:diamond>,<item:minecraft:coal>,
<item:minecraft:charcoal>,1f,10);
<recipetype:gaiadimension:purifying>.removeRecipeByName("gaiadimension:purifying/pink_agate_wood");
<recipetype:gaiadimension:restructuring>.addRecipe("test1",<item:minecraft:enchanted_golden_apple>,
<item:minecraft:gold_ingot>,<item:minecraft:golden_apple>,1f,10);
<recipetype:gaiadimension:restructuring>.removeRecipeByName("gaiadimension:restructuring/proustite");