tModLoader v2025.01
A mod to make and play Terraria mods
Recipe.IngredientQuantityRules Class Reference

Static Public Attributes

static IngredientQuantityCallback Alchemy
 Gives 1/3 chance for every ingredient to not be consumed, if used at an alchemy table. (!) This behaviour is already automatically given to all items that can be made at a placed bottle tile. More...
 

Member Data Documentation

◆ Alchemy

IngredientQuantityCallback Recipe.IngredientQuantityRules.Alchemy
static
Initial value:
= (Recipe recipe, int type, ref int amount, bool isDecrafting) => {
if (!Main.LocalPlayer.alchemyTable && !isDecrafting)
return;
for (int i = amount; i > 0; i--) {
if (Main.rand.NextBool(3))
amount--;
}
}
Definition: Main.cs:103
static Player LocalPlayer
Retrieves the Player object for the local user. Shorthand for player[myPlayer]. Many gameplay elemen...
Definition: Main.cs:2677
A Recipe is a collection of ingredients, tiles, and a resulting Item. This is how players can craft i...
Definition: Recipe.cs:14

Gives 1/3 chance for every ingredient to not be consumed, if used at an alchemy table. (!) This behaviour is already automatically given to all items that can be made at a placed bottle tile.