TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CanStackInWorld()

static bool Terraria.ModLoader.ItemLoader.CanStackInWorld ( Item destination,
Item source )
inlinestatic

Calls all GlobalItem.CanStackInWorld hooks until one returns false then ModItem.CanStackInWorld. Returns whether any of the hooks returned false.

Parameters
destinationThe item instance that source will attempt to stack onto
sourceThe item instance being stacked onto destination
Returns
Whether or not the items are allowed to stack

Definition at line 1825 of file ItemLoader.cs.

1826 {
1828 while (enumerator.MoveNext())
1829 {
1830 if (!enumerator.Current.CanStackInWorld(destination, source))
1831 {
1832 return false;
1833 }
1834 }
1835 return destination.ModItem?.CanStackInWorld(source) ?? true;
1836 }
static GlobalHookList< GlobalItem > HookCanStackInWorld

References Terraria.ModLoader.ItemLoader.HookCanStackInWorld.

Referenced by Terraria.Item.CombineWithNearbyItems().

+ Here is the caller graph for this function: