tModLoader v2025.07
A mod to make and play Terraria mods
RangeAttribute Class Reference

Specifies a range for primitive data values. Without this, default min and max are as follows:
float: 0, 1
int/uint: 0, 100
byte: 0, 255
long/ulong: Unchanged from the full range of the type When using this, you might need to cast the arguments to the desired numeric type to call the correct overload. More...

Inherits Attribute.

Public Member Functions

 RangeAttribute (byte min, byte max)
 
 RangeAttribute (float min, float max)
 
 RangeAttribute (int min, int max)
 
 RangeAttribute (long min, long max)
 
 RangeAttribute (uint min, uint max)
 
 RangeAttribute (ulong min, ulong max)
 

Properties

object Max [get]
 
object Min [get]
 

Detailed Description

Specifies a range for primitive data values. Without this, default min and max are as follows:
float: 0, 1
int/uint: 0, 100
byte: 0, 255
long/ulong: Unchanged from the full range of the type

When using this, you might need to cast the arguments to the desired numeric type to call the correct overload.