Created
March 15, 2018 17:25
-
-
Save kindlich/fdde1f8b83a31208894b06ffd48a2cbf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import crafttweaker.item.IIngredient; | |
import crafttweaker.recipes.IRecipeFunction; | |
val oreDict = <ore:myUniqueOreDict>; | |
//Simply So that I have an oreDict | |
oreDict.add(<minecraft:iron_ingot>, <minecraft:gold_ingot>, <minecraft:redstone>, <minecraft:grass>); | |
val recipeFunctionSingleItems as IRecipeFunction = function(out, ins, cInfo){ | |
var ingredient as IIngredient = null; | |
for item in cInfo.inventory.itemArray { | |
if (isNull(ingredient)) | |
ingredient = item; | |
else { | |
if (!isNull(item)){ | |
if (ingredient has item) | |
return null; | |
ingredient |= item; | |
} | |
} | |
} | |
return out; | |
}; | |
recipes.addShapeless(null, <minecraft:skull>, [oreDict, oreDict, oreDict], recipeFunctionSingleItems, null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment