Block
Block
extends UnlockableContent
field | type | default | notes |
---|---|---|---|
hasItems | boolean | false | If true, buildings have an ItemModule. |
hasLiquids | boolean | false | If true, buildings have a LiquidModule. |
hasPower | boolean | false | If true, buildings have a PowerModule. |
outputsLiquid | boolean | false | Flag for determining whether this block outputs liquid somewhere; used for connections. |
consumesPower | boolean | true | Used by certain power blocks (nodes) to flag as non-consuming of power. True by default, even if this block has no power. |
outputsPower | boolean | false | If true, this block is a generator that can produce power. |
connectedPower | boolean | true | If false, power nodes cannot connect to this block. |
conductivePower | boolean | false | If true, this block can conduct power like a cable. |
outputsPayload | boolean | false | If true, this block can output payloads; affects blending. |
acceptsPayloads | boolean | false | If true, this block can input payloads; affects unit payload enter behavior. |
acceptsPayload | boolean | false | If true, payloads will attempt to move into this block. |
acceptsItems | boolean | false | Visual flag use for blending of certain transportation blocks. |
separateItemCapacity | boolean | false | If true, all item capacities of this block are separate instead of pooled as one number. |
itemCapacity | int | 10 | maximum items this block can carry (usually, this is per-type of item) |
liquidCapacity | float | 10.0 | maximum total liquids this block can carry if hasLiquids = true |
liquidPressure | float | 1.0 | higher numbers increase liquid output speed; TODO remove and replace with better liquids system |
outputFacing | boolean | true | If true, this block outputs to its facing direction, when applicable. Used for blending calculations. |
noSideBlend | boolean | false | if true, this block does not accept input from the sides (used for armored conveyors) |
displayFlow | boolean | true | whether to display flow rate |
inEditor | boolean | true | whether this block is visible in the editor |
lastConfig | Object | null | the last configuration value applied to this block. |
saveConfig | boolean | false | whether to save the last config and apply it to newly placed blocks |
copyConfig | boolean | true | whether to allow copying the config through middle click |
clearOnDoubleTap | boolean | false | if true, double-tapping this configurable block clears configuration. |
update | boolean | false | whether this block has a tile entity that updates |
destructible | boolean | false | whether this block has health and can be destroyed |
unloadable | boolean | true | whether unloaders work on this block |
isDuct | boolean | false | if true, this block acts a duct and will connect to armored ducts from the side. |
allowResupply | boolean | false | whether units can resupply by taking items from this block |
solid | boolean | false | whether this is solid |
solidifes | boolean | false | whether this block CAN be solid. |
teamPassable | boolean | false | if true, this counts as a non-solid block to this team. |
underBullets | boolean | false | if true, this block cannot be hit by bullets unless explicitly targeted. |
rotate | boolean | false | whether this is rotatable |
rotateDraw | boolean | true | if rotate is true and this is false, the region won't rotate when drawing |
lockRotation | boolean | true | if rotate = false and this is true, rotation will be locked at 0 when placing (default); advanced use only |
invertFlip | boolean | false | if true, schematic flips with this block are inverted. |
variants | int | 0 | number of different variant regions to use |
drawArrow | boolean | true | whether to draw a rotation arrow - this does not apply to lines of blocks |
drawTeamOverlay | boolean | true | whether to draw the team corner by default |
saveData | boolean | false | for static blocks only: if true, tile data() is saved in world data. |
breakable | boolean | false | whether you can break this with rightclick |
rebuildable | boolean | true | whether to add this block to brokenblocks |
privileged | boolean | false | if true, this logic-related block can only be used with privileged processors (or is one itself) |
requiresWater | boolean | false | whether this block can only be placed on water |
placeableLiquid | boolean | false | whether this block can be placed on any liquids, anywhere |
placeablePlayer | boolean | true | whether this block can be placed directly by the player via PlacementFragment |
placeableOn | boolean | true | whether this floor can be placed on. |
insulated | boolean | false | whether this block has insulating properties. |
squareSprite | boolean | true | whether the sprite is a full square. |
absorbLasers | boolean | false | whether this block absorbs laser attacks. |
enableDrawStatus | boolean | true | if false, the status is never drawn |
drawDisabled | boolean | true | whether to draw disabled status |
autoResetEnabled | boolean | true | whether to automatically reset enabled status after a logic block has not interacted for a while. |
noUpdateDisabled | boolean | false | if true, the block stops updating when disabled |
updateInUnits | boolean | true | if true, this block updates when it's a payload in a unit. |
alwaysUpdateInUnits | boolean | false | if true, this block updates in payloads in units regardless of the experimental game rule |
deconstructDropAllLiquid | boolean | false | if false, only incinerable liquids are dropped when deconstructing; otherwise, all liquids are dropped. |
useColor | boolean | true | Whether to use this block's color in the minimap. Only used for overlays. |
itemDrop | Item | null | item that drops from this block, used for drills |
playerUnmineable | boolean | false | if true, this block cannot be mined by players. useful for annoying things like sand. |
attributes | Attributes | new Attributes() | Array of affinities to certain things. |
scaledHealth | float | -1.0 | Health per square tile that this block occupies; essentially, this is multiplied by size * size. Overridden if health is > 0. If <0, the default is 40. |
health | int | -1 | building health; -1 to use scaledHealth |
armor | float | 0.0 | damage absorption, similar to unit armor |
baseExplosiveness | float | 0.0 | base block explosiveness |
destroyBullet | BulletType | null | bullet that this block spawns when destroyed |
destroyBulletSameTeam | boolean | false | if true, destroyBullet is spawned on the block's team instead of Derelict team |
lightLiquid | Liquid | null | liquid used for lighting |
drawCracks | boolean | true | whether cracks are drawn when this block is damaged |
createRubble | boolean | true | whether rubble is created when this block is destroyed |
floating | boolean | false | whether this block can be placed on edges of liquids. |
size | int | 1 | multiblock size |
offset | float | 0.0 | multiblock offset |
sizeOffset | int | 0 | offset for iteration (internal use only) |
clipSize | float | -1.0 | Clipping size of this block. Should be as large as the block will draw. |
placeOverlapRange | float | 50.0 | When placeRangeCheck is enabled, this is the range checked for enemy blocks. |
crushDamageMultiplier | float | 1.0 | Multiplier of damage dealt to this block by tanks. Does not apply to crawlers. |
timers | int | 1 | Max of timers used. |
cacheLayer | CacheLayer | normal | Cache layer. Only used for 'cached' rendering. |
fillsTile | boolean | true | Special flag; if false, floor will be drawn under this block even if it is cached. |
forceDark | boolean | false | If true, this block can be covered by darkness / fog even if synthetic. |
alwaysReplace | boolean | false | whether this block can be replaced in all cases |
replaceable | boolean | true | if false, this block can never be replaced. |
group | BlockGroup | none | The block group. Unless {@link #canReplace} is overridden, blocks in the same group can replace each other. |
flags | EnumSet |
of() | List of block flags. Used for AI indexing. |
priority | float | 0.0 | Targeting priority of this block, as seen by enemies. |
unitCapModifier | int | 0 | How much this block affects the unit cap by. The block flags must contain unitModifier in order for this to work. |
configurable | boolean | false | Whether the block can be tapped and selected to configure. |
ignoreResizeConfig | boolean | false | If true, this block does not have pointConfig with a transform called on map resize. |
commandable | boolean | false | If true, this building can be selected like a unit when commanding. |
allowConfigInventory | boolean | true | If true, the building inventory can be shown with the config. |
selectionRows | int | 5 | Defines how large selection menus, such as that of sorters, should be. |
selectionColumns | int | 4 | Defines how large selection menus, such as that of sorters, should be. |
logicConfigurable | boolean | false | If true, this block can be configured by logic. |
consumesTap | boolean | false | Whether this block consumes touchDown events when tapped. |
drawLiquidLight | boolean | true | Whether to draw the glow of the liquid for this block, if it has one. |
envRequired | int | 0 | Environmental flags that are all required for this block to function. 0 = any environment |
envEnabled | int | 1 | The environment flags that this block can function in. If the env matches any of these, it will be enabled. |
envDisabled | int | 0 | The environment flags that this block cannot function in. If the env matches any of these, it will be disabled. |
sync | boolean | false | Whether to periodically sync this block across the network. |
conveyorPlacement | boolean | false | Whether this block uses conveyor-type placement mode. |
allowDiagonal | boolean | true | If false, diagonal placement (ctrl) for this block is not allowed. |
swapDiagonalPlacement | boolean | false | Whether to swap the diagonal placement modes. |
allowRectanglePlacement | boolean | false | Whether to allow rectangular placement, as opposed to a line. |
schematicPriority | int | 0 | Build queue priority in schematics. |
mapColor | Color | 000000ff | The color of this block when displayed on the minimap or map preview. Do not set manually! This is overridden when loading for most blocks. |
hasColor | boolean | false | Whether this block has a minimap color. |
targetable | boolean | true | Whether units target this block. |
attacks | boolean | false | If true, this block attacks and is considered a turret in the indexer. Building must implement Ranged. |
suppressable | boolean | false | If true, this block is mending-related and can be suppressed with special units/missiles. |
canOverdrive | boolean | true | Whether the overdrive core has any effect on this block. |
outlineColor | Color | 404049ff | Outlined icon color. |
outlineIcon | boolean | false | Whether any icon region has an outline added. |
outlineRadius | int | 4 | Outline icon radius. |
outlinedIcon | int | -1 | Which of the icon regions gets the outline added. Uses last icon if <= 0. |
hasShadow | boolean | true | Whether this block has a shadow under it. |
customShadow | boolean | false | If true, a custom shadow (name-shadow) is drawn under this block. |
placePitchChange | boolean | true | Should the sound made when this block is built change in pitch. |
breakPitchChange | boolean | true | Should the sound made when this block is deconstructed change in pitch. |
placeSound | Sound | place | Sound made when this block is built. |
breakSound | Sound | breaks | Sound made when this block is deconstructed. |
destroySound | Sound | boom | Sounds made when this block is destroyed. |
albedo | float | 0.0 | How reflective this block is. |
lightColor | Color | ffffffff | Environmental passive light color. |
emitLight | boolean | false | Whether this environmental block passively emits light. Does not change behavior for non-environmental blocks, but still updates clipSize. |
lightRadius | float | 60.0 | Radius of the light emitted by this block. |
fogRadius | int | -1 | How much fog this block uncovers, in tiles. Cannot be dynamic. <= 0 to disable. |
loopSound | Sound | none | The sound that this block makes while active. One sound loop. Do not overuse. |
loopSoundVolume | float | 0.5 | Active sound base volume. |
ambientSound | Sound | none | The sound that this block makes while idle. Uses one sound loop for all blocks. |
ambientSoundVolume | float | 0.05 | Idle sound base volume. |
requirements | ItemStack[] | [] | Cost of constructing this block. |
category | Category | distribution | Category in place menu. |
buildCost | float | 20.0 | Time to build this block in ticks; do not modify directly! |
buildVisibility | BuildVisibility | hidden | Whether this block is visible and can currently be built. |
buildCostMultiplier | float | 1.0 | Multiplier for speed of building this block. |
deconstructThreshold | float | 0.0 | Build completion at which deconstruction finishes. |
instantDeconstruct | boolean | false | If true, this block deconstructs immediately. Instant deconstruction implies no resource refund. |
instantBuild | boolean | false | If true, this block constructs immediately. This implies no resource requirement, and ignores configs - do not use, this is for performance only! |
placeEffect | Effect | placeBlock | Effect for placing the block. Passes size as rotation. |
breakEffect | Effect | breakBlock | Effect for breaking the block. Passes size as rotation. |
destroyEffect | Effect | dynamicExplosion | Effect for destroying the block. |
researchCostMultiplier | float | 1.0 | Multiplier for cost of research in tech tree. |
researchCostMultipliers | ObjectFloatMap |
new ObjectFloatMap<>() | Cost multipliers per-item. |
researchCost | ItemStack[] | null | Override for research cost. Uses multipliers above and building requirements if not set. |
instantTransfer | boolean | false | Whether this block has instant transfer. |
quickRotate | boolean | true | Whether you can rotate this block after it is placed. |
allowDerelictRepair | boolean | true | If true, this derelict block can be repair by clicking it. |
subclass | Class<?> | class mindustry.world.Block | Main subclass. Non-anonymous. |
selectScroll | float | 0.0 | Scroll position for certain blocks. |
buildType | Prov |
null | Building that is created for this block. Initialized in init() via reflection. Set manually if modded. |
configurations | ObjectMap<Class<?>,Cons2> | new ObjectMap<>() | Configuration handlers by type. |
itemFilter | boolean[] | [] | Consumption filters. |
liquidFilter | boolean[] | [] | Consumption filters. |
consumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
optionalConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
nonOptionalConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
updateConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
hasConsumers | boolean | false | Set to true if this block has any consumers in its array. |
consPower | ConsumePower | null | The single power consumer, if applicable. |
regionRotated1 | int | -1 | Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. |
regionRotated2 | int | -1 | Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. |
region | TextureRegion | null | |
editorIcon | TextureRegion | null | |
customShadowRegion | TextureRegion | null | |
teamRegion | TextureRegion | null | |
teamRegions | TextureRegion[] | null | |
variantRegions | TextureRegion[] | null | |
variantShadowRegions | TextureRegion[] | null | |
dumpTime | int | 5 | How often to try dumping items in ticks, e.g. 5 = 12 times/sec |