Class GlobalConstants
- Namespace
- Vintagestory.API.Config
- Assembly
- VintagestoryAPI.dll
Contains some global constants and static values
public class GlobalConstants
- Inheritance
-
GlobalConstants
- Inherited Members
Fields
AirDragAlways
Multiplier applied to entity motion while on the ground or in air
public static float AirDragAlways
Field Value
AirDragFlying
Multiplier applied to entity motion while flying (creative mode)
public static float AirDragFlying
Field Value
AllChatGroups
Special channel key typically to reply a Command inside the same the channel the player sent it
public static int AllChatGroups
Field Value
AllowedChatGroupChars
Allowed characters for a player group name
public static string AllowedChatGroupChars
Field Value
BaseJumpForce
Multiplier applied to the players jump motion
public static float BaseJumpForce
Field Value
BaseMoveSpeed
Multiplier applied to the players movement motion
public static float BaseMoveSpeed
Field Value
CaveArtColsPerRow
public static int CaveArtColsPerRow
Field Value
ChunkSize
Now a hard-coded constant
public const int ChunkSize = 32
Field Value
ConsoleGroup
Special channel key for message sent via server console
public static int ConsoleGroup
Field Value
CreatureDamageModifier
Global modifier to change the damage melee attacks from creatures inflict. Can be changed during run-time. The value is multiplied to the normal damage value (default: 1)
public static float CreatureDamageModifier
Field Value
CurrentChatGroup
Special channel key typically to reply a Command inside the same the channel the player sent it
public static int CurrentChatGroup
Field Value
CurrentDistanceToRainfallClient
Set by the SystemPlayerEnvAwarenessTracker System in the engine at the players position, once every second. 12 horizontal, 4 vertical search distance
public static float CurrentDistanceToRainfallClient
Field Value
CurrentNearbyRelLeavesCountClient
Set by the game client at the players position
public static float CurrentNearbyRelLeavesCountClient
Field Value
CurrentWindSpeedClient
Set by the WeatherSimulation System in the survival mod at the players position
public static Vec3f CurrentWindSpeedClient
Field Value
DamageLogChatGroup
Channel name for the damage chat log
public static int DamageLogChatGroup
Field Value
DefaultAttackRange
Attack range when using hands
public static float DefaultAttackRange
Field Value
DefaultChatGroups
public static int[] DefaultChatGroups
Field Value
- int[]
DefaultCultureInfo
public static CultureInfo DefaultCultureInfo
Field Value
DefaultDomain
Prefix for all default asset locations
public const string DefaultDomain = "game"
Field Value
DefaultPickingRange
Range in blocks a player can interact with blocks (break, use, place)
public static float DefaultPickingRange
Field Value
DefaultSimulationRange
Range in blocks at where this entity is simulated on the server (MagicNum.cs sets this value)
public static int DefaultSimulationRange
Field Value
DimensionSizeInChunks
Used in various places if the dimension of a chunk is combined into the chunk's y value.
public const int DimensionSizeInChunks = 1024
Field Value
EntityBlockFallingTypeCode
The entity class used when spawning falling blocks
public static AssetLocation EntityBlockFallingTypeCode
Field Value
EntityItemTypeCode
The entity class used when spawning items in the world
public static AssetLocation EntityItemTypeCode
Field Value
EntityPlayerTypeCode
The entity class used when spawning players
public static AssetLocation EntityPlayerTypeCode
Field Value
GeneralChatGroup
Channel name for the general chat
public static int GeneralChatGroup
Field Value
GravityPerSecond
Amount of gravity per tick applied to all entities affected by gravity
public static float GravityPerSecond
Field Value
GravityStrengthParticle
A multiplier applied to the y motion of all particles affected by gravity.
public static float GravityStrengthParticle
Field Value
GuiGearRotJitter
public static float GuiGearRotJitter
Field Value
HungerSpeedModifier
Global modifier to change the rate of player hunger. Can be changed during run-time. The value is multiplied to the normal spoilage rate (default: 1)
public static float HungerSpeedModifier
Field Value
IgnoredStackAttributes
Default Itemstack attributes that should be ignored during a stack.Collectible.Equals() comparison
public static string[] IgnoredStackAttributes
Field Value
- string[]
InfoLogChatGroup
Channel name for the info chat log
public static int InfoLogChatGroup
Field Value
MaxAnimatedElements
Max. amount of "bones" for animated model. Limited by max amount of shader uniforms of around 60, but depends on the gfx card
public static int MaxAnimatedElements
Field Value
MaxColorMaps
Max. amount of "bones" for color maps. Limited by max amount of shader uniforms, but depends on the gfx card
public const int MaxColorMaps = 40
Field Value
MaxPhysicsIntervalInSlowTicks
Limits the amount of world time that can be simulated by the physics engine if the server is ticking slowly: if ticks are slower than this, entities will seem to slow down (viewed on client might even jump backwards)
Recommended range 0.1f to 0.4f
public static float MaxPhysicsIntervalInSlowTicks
Field Value
MaxViewDistanceForLodBiases
public const int MaxViewDistanceForLodBiases = 640
Field Value
MaxWorldSizeXZ
Hard-enforced world size limit, above this the code may break
public const int MaxWorldSizeXZ = 67108864
Field Value
MaxWorldSizeY
Hard-enforced world height limit, above this the code may break.
public const int MaxWorldSizeY = 16384
Field Value
MeltingFreezingEnabled
Set by the weather simulation system to determine if snowed variants of blocks should melt. Used a static var to improve performance and reduce memory usage
public static bool MeltingFreezingEnabled
Field Value
OverallSpeedMultiplier
Multiplied to all motions and animation speeds
public static float OverallSpeedMultiplier
Field Value
PerishSpeedModifier
Global modifier to change the spoil rate of foods. Can be changed during run-time. The value is multiplied to the normal spoilage rate (default: 1)
public static float PerishSpeedModifier
Field Value
PhysicsFrameTime
Frame time for physics simulation
public static float PhysicsFrameTime
Field Value
ServerInfoChatGroup
Channel name for the general chat
public static int ServerInfoChatGroup
Field Value
SinglePlayerEntitlements
Bit of a helper thing for single player servers to display the correct entitlements
public static string SinglePlayerEntitlements
Field Value
SneakSpeedMultiplier
Multiplier applied to the players sneaking motion
public static float SneakSpeedMultiplier
Field Value
SprintSpeedMultiplier
Multiplier applied to the players sprinting motion
public static double SprintSpeedMultiplier
Field Value
TimeToDespawnPlayerInventoryDrops
Time in seconds for dropped items to remain when dropped after player death; overrides the despawn time set in item.json
public static int TimeToDespawnPlayerInventoryDrops
Field Value
ToolMiningSpeedModifier
Global modifier to change the block breaking speed of all tools. Can be changed during run-time. The value is multiplied to the breaking speed (default: 1)
public static float ToolMiningSpeedModifier
Field Value
WaterDrag
Multiplier applied to entity motion while walking in water
public static float WaterDrag
Field Value
WorldSaveExtension
public const string WorldSaveExtension = ".vcdbs"
Field Value
backpackInvClassName
public const string backpackInvClassName = "backpack"
Field Value
characterInvClassName
public const string characterInvClassName = "character"
Field Value
craftingInvClassName
public const string craftingInvClassName = "craftinggrid"
Field Value
creativeInvClassName
public const string creativeInvClassName = "creative"
Field Value
groundInvClassName
public const string groundInvClassName = "ground"
Field Value
hotBarInvClassName
public const string hotBarInvClassName = "hotbar"
Field Value
mousecursorInvClassName
public const string mousecursorInvClassName = "mouse"
Field Value
playerColorByEntitlement
public static Dictionary<string, double[]> playerColorByEntitlement
Field Value
- Dictionary<string, double[]>
playerTagBackgroundByEntitlement
public static Dictionary<string, TextBackground> playerTagBackgroundByEntitlement
Field Value
Properties
FoodSpoilHealthLossMulHandler
public static FoodSpoilageCalcDelegate FoodSpoilHealthLossMulHandler { get; }
Property Value
FoodSpoilSatLossMulHandler
public static FoodSpoilageCalcDelegate FoodSpoilSatLossMulHandler { get; }
Property Value
Methods
FoodSpoilageHealthLossMul(float, ItemStack, EntityAgent)
public static float FoodSpoilageHealthLossMul(float spoilState, ItemStack stack, EntityAgent byEntity)
Parameters
spoilState
floatstack
ItemStackbyEntity
EntityAgent
Returns
FoodSpoilageSatLossMul(float, ItemStack, EntityAgent)
public static float FoodSpoilageSatLossMul(float spoilState, ItemStack stack, EntityAgent byEntity)
Parameters
spoilState
floatstack
ItemStackbyEntity
EntityAgent
Returns
OutsideWorld(double, double, double, IBlockAccessor)
Returns true if the player fell out of the world (which is map boundaries + 30 blocks in every direction)
public static bool OutsideWorld(double x, double y, double z, IBlockAccessor blockAccessor)
Parameters
x
doubley
doublez
doubleblockAccessor
IBlockAccessor
Returns
OutsideWorld(int, int, int, IBlockAccessor)
Returns true if the player fell out of the world (which is map boundaries + 30 blocks in every direction)
public static bool OutsideWorld(int x, int y, int z, IBlockAccessor blockAccessor)
Parameters
x
inty
intz
intblockAccessor
IBlockAccessor