cookingkruto.blogg.se

How to tmodloader for terraria
How to tmodloader for terraria




how to tmodloader for terraria

Recipe.AddIngredient(ItemID.DirtBlock, 10) Our second recipe, the same as above, but this time 10 times as fast Our first recipe, transforming a dirtblock to a gold coin while near any workbench. Make sure Autoload is true, it saves a lot of code in the Load() hook The sixth line deducts the amount of removed recipes from the total amount of available recipes.

how to tmodloader for terraria

The fifth line resizes the array, as I said: arrays a fixed size. The fourth line sets Main.recipe to our altered (converted) recipe list which is recreated to an array.

how to tmodloader for terraria

The third line adds one to this variable per recipe that creates the specified item. The second line creates a variable that will hold the total amount of removed recipes that will then later be deducted from the total amount of recipes. The first line transforms the main recipe array to a list, which is more 'dynamic' than an array, as an array has a fixed size whereas a list does not. Recipe.numRecipes -= numberRecipesRemoved NumberRecipesRemoved += rec.RemoveAll(x => x.createItem.type = ItemID.AlphabetStatueT) Īrray.Resize(ref Main.recipe, Recipe.maxRecipes)






How to tmodloader for terraria