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:
hiddenshowndebugOnlyeditorOnlycoreZoneOnlyworldProcessorOnlysandboxOnlycampaignOnlylegacyLaunchPadOnlynotLegacyLaunchPadOnlylightingOnlyfogOnly
BlockGroup
Groups for blocks to build on top of each other:
nonewallsprojectorsturretstransportationpowerliquidsdrillsunitslogicpayloadsheat
ItemStack
An 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;effectThings for storage or passive effects;logicBlocks that are related to logic operations.
Color
Color is a hexadecimal string, <rr><gg><bb> for example:
ff0000is red,00ff00is green,0000ffis blue,ffff00is yellow,00ffffis cyan,- etc.
CacheLayer
Layers used for cache rendering, in draw order:
waterwater layer, adding tile water shaders, and giving wave reflections;mudmud layer, similar to water but for mud tiles;cryofluidcryofluid layer, giving the icy blue shader used by cryofluid pools;tartar layer, adding tar shaders, making it darker and giving it some bubble reflections;slagslag layer, giving molten slag its glow shader;arkycitearkycite layer, used for the arkycite liquid on Erekir;spacespace layer, used for background space tiles;normalnormal layer, the default for most floors;wallswalls layer;
CacheLayer is a class rather than an enum, so mods can register their own layers with CacheLayer.add.
TargetPriority
A set of float constants; a higher value means a higher priority. Higher priority blocks will always get targeted over those of lower priority, regardless of distance.
| priority | value | notes |
|---|---|---|
wall |
-3 | nobody cares about walls |
under |
-2 | for blocks with underBullets |
transport |
-1 | conveyors and other transport infrastructure |
base |
0 | most blocks |
turret |
1 | turrets, since they deal damage |
core |
2 | the core is always the top priority |