Skip to content

Instantly share code, notes, and snippets.

@kindlich
Created December 6, 2018 18:29
Show Gist options
  • Save kindlich/1359e61b4efa17397f8c36994bad3541 to your computer and use it in GitHub Desktop.
Save kindlich/1359e61b4efa17397f8c36994bad3541 to your computer and use it in GitHub Desktop.
static T5_locations as int[][] = [
[ 9, 13, 21, 14, 10],
[15, 0, 1, 2, 16],
[22, 3, 4, 5, 23],
[17, 6, 7, 8, 18],
[11, 19, 24, 20, 12]];
function addBaseAltarRecipe(recipeLocation as string, output as IItemStack, inputs as IIngredient[][], starlight as int, craftingTickTime as int, additionalInputs as IIngredient[], constellation as string) as void {
var inputArray = [] as IIngredient[];
//Prefill the array with nulls
for i in 0 .. 25 inputArray += null;
for i, row in T5_locations
for j, place in T5_locations
if(inputs.length > i && inputs[i].length > j)
inputArray[place] = inputs[i][j];
if(!isNull(additionalInputs))
for item in additionalInputs
inputArray += item;
mods.astralsorcery.Altar.addTraitAltarRecipe(recipeLocation, output, starlight, craftingTickTime, inputArray, constellation);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment