Types
Note: Deprecated content classes are not listed here, and their use is heavily discouraged. Transition to non-deprecated equivalents as quickly as possible.
View the list of all deprecated classes and methods in the Mindustry Javadoc.
All JSON examples are automatically taken from Exotic Mod by BlueWolf3682. These should only be used as a reference for fields - do not directly copy-paste them into your mod, they will not work!
BuildVisibility
A flag used by the game to change a few special-case things. It may be one of the following strings:
hiddenshowndebugOnlyeditorOnlycoreZoneOnlyworldProcessorOnlysandboxOnlycampaignOnlylegacyLaunchPadOnlynotLegacyLaunchPadOnlylightingOnlyammoOnlyfogOnly
BlockGroup
Groups for blocks to build on top of each other:
nonewallsprojectorsturretstransportationpowerliquidsdrillsunitslogicpayloadsheat
ItemStack
A ItemStack can be a string or an object. It's used to describe the type and amount of items to a machine.
As a string:
copper/5
As an object:
item: copper
amount: 5
| field | type | notes |
|---|---|---|
| item | string | The name of an Item. |
| amount | int | The amount of said item. |
LiquidStack
A LiquidStack can be a string or an object. It's used to describe the type and amount of liquid to a machine.
As a string:
water/0.5
As an object:
liquid: water
amount: 0.5
| field | type | notes |
|---|---|---|
| liquid | string | The name of a Liquid. |
| amount | float | The amount of said liquid. |
Category
Categories for building menu:
turretOffensive turrets;productionBlocks that produce raw resources, such as drills;distributionBlocks that move items around;liquidBlocks that move liquids around;powerBlocks that generate or transport power;defenseWalls and other defensive structures;craftingBlocks that craft things;unitsBlocks that create units;logicBlocks that are related to logic operations;effectThings for storage or passive effects.
Color
Color is a hexadecimal string, <rr><gg><bb> for example:
ff0000is red,00ff00is green,0000ffis blue,ffff00is yellow,00ffffis cyan,- etc.
CacheLayer
Flags used by for cache render:
normalnormal layer;wallswalls layer;waterwater layer, adding tile water shaders, and giving wave reflections;tartar layer, adding tar shaders, making it darker and giving it some bubble reflections;
TargetPriority
A higher ordinal means a higher priority. Higher priority blocks will always get targeted over those of lower priority, regardless of distance.
baseturret