tModLoader v2024.08
A mod to make and play Terraria mods
Recipe.ConsumptionRules Class Reference

Static Public Attributes

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

Member Data Documentation

◆ Alchemy

ConsumeItemCallback Recipe.ConsumptionRules.Alchemy
static
Initial value:
= (Recipe recipe, int type, ref int amount) => {
if (!Main.LocalPlayer.alchemyTable) return;
int amountUsed = 0;
for (int i = 0; i < amount; i++) {
if (!Main.rand.NextBool(3))
amountUsed++;
}
amount = amountUsed;
}
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:2667
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 behavior is already automatically given to all items that can be made at a placed bottle tile.