![]() |
tModLoader v2025.07
A mod to make and play Terraria mods
|
Places this layer between the two provided layers. This layer will draw over layer1 and under layer2. null
can be used to indicate that the exact position of the layer doesn't matter aside from being before/after the other non-null argument. For example new Between(PlayerDrawLayers.HairBack, null)
would place the layer anywhere after HairBack
, while new Between(null, PlayerDrawLayers.HairBack)
would be anywhere before HairBack
. For ordering before or after all vanilla layers, the helper properties PlayerDrawLayers.BeforeFirstVanillaLayer and PlayerDrawLayers.AfterLastVanillaLayer can be used directly. The layer parameters used must have fixed positions, meaning that layers registered using either Multiple, BeforeParent, or AfterParent are not valid. For vanilla layers, this includes PlayerDrawLayers.FrontAccFront and PlayerDrawLayers.HeldItem. If ordering in relation to these layers, consider either using AfterParent or BeforeParent to draw at whatever positions that layer is actually drawn, or referencing a different layer for ordering instead.
More...
Inherits PlayerDrawLayer.Position.
Public Member Functions | |
Between (PlayerDrawLayer layer1, PlayerDrawLayer layer2) | |
Properties | |
PlayerDrawLayer | Layer1 [get] |
PlayerDrawLayer | Layer2 [get] |
Places this layer between the two provided layers. This layer will draw over layer1 and under layer2.
null
can be used to indicate that the exact position of the layer doesn't matter aside from being before/after the other non-null argument. For example new Between(PlayerDrawLayers.HairBack, null)
would place the layer anywhere after HairBack
, while new Between(null, PlayerDrawLayers.HairBack)
would be anywhere before HairBack
. For ordering before or after all vanilla layers, the helper properties PlayerDrawLayers.BeforeFirstVanillaLayer and PlayerDrawLayers.AfterLastVanillaLayer can be used directly.
The layer parameters used must have fixed positions, meaning that layers registered using either Multiple, BeforeParent, or AfterParent are not valid. For vanilla layers, this includes PlayerDrawLayers.FrontAccFront and PlayerDrawLayers.HeldItem. If ordering in relation to these layers, consider either using AfterParent or BeforeParent to draw at whatever positions that layer is actually drawn, or referencing a different layer for ordering instead.