Class Block

All Implemented Interfaces:
Comparable<Content>, Senseable
Direct Known Subclasses:
Accelerator, BaseShield, BaseTurret, BeamDrill, CanvasBlock, Cliff, ConstructBlock, Conveyor, DirectionalForceProjector, DirectionalUnloader, DirectionBridge, Drill, DroneCenter, Duct, DuctRouter, Floor, ForceProjector, GenericCrafter, HeatConductor, Incinerator, ItemBridge, ItemIncinerator, ItemSource, ItemVoid, Junction, LaunchPad, LegacyBlock, LightBlock, LiquidBlock, LiquidSource, LiquidVoid, LogicBlock, LogicDisplay, MassDriver, MemoryBlock, MendProjector, MessageBlock, OverdriveProjector, OverflowDuct, OverflowGate, PayloadBlock, PayloadConveyor, PowerBlock, PowerDiode, Prop, Radar, RegenProjector, RepairTower, RepairTurret, Router, Separator, ShockMine, ShockwaveTower, Sorter, StackConveyor, StorageBlock, SwitchBlock, TallBlock, TreeBlock, UnitCargoLoader, UnitCargoUnloadPoint, Unloader, Wall, WallCrafter

public class Block extends UnlockableContent implements Senseable
  • Field Details

    • hasItems

      public boolean hasItems
      If true, buildings have an ItemModule.
    • hasLiquids

      public boolean hasLiquids
      If true, buildings have a LiquidModule.
    • hasPower

      public boolean hasPower
      If true, buildings have a PowerModule.
    • outputsLiquid

      public boolean outputsLiquid
      Flag for determining whether this block outputs liquid somewhere; used for connections.
    • consumesPower

      public boolean consumesPower
      Used by certain power blocks (nodes) to flag as non-consuming of power. True by default, even if this block has no power.
    • outputsPower

      public boolean outputsPower
      If true, this block is a generator that can produce power.
    • connectedPower

      public boolean connectedPower
      If false, power nodes cannot connect to this block.
    • conductivePower

      public boolean conductivePower
      If true, this block can conduct power like a cable.
    • outputsPayload

      public boolean outputsPayload
      If true, this block can output payloads; affects blending.
    • acceptsPayload

      public boolean acceptsPayload
      If true, payloads will attempt to move into this block.
    • acceptsItems

      public boolean acceptsItems
      Visual flag use for blending of certain transportation blocks.
    • separateItemCapacity

      public boolean separateItemCapacity
      If true, all item capacities of this block are separate instead of pooled as one number.
    • itemCapacity

      public int itemCapacity
      maximum items this block can carry (usually, this is per-type of item)
    • liquidCapacity

      public float liquidCapacity
      maximum total liquids this block can carry if hasLiquids = true
    • liquidPressure

      public float liquidPressure
      higher numbers increase liquid output speed; TODO remove and replace with better liquids system
    • outputFacing

      public boolean outputFacing
      If true, this block outputs to its facing direction, when applicable. Used for blending calculations.
    • noSideBlend

      public boolean noSideBlend
      if true, this block does not accept input from the sides (used for armored conveyors)
    • displayFlow

      public boolean displayFlow
      whether to display flow rate
    • inEditor

      public boolean inEditor
      whether this block is visible in the editor
    • lastConfig

      @Nullable public Object lastConfig
      the last configuration value applied to this block.
    • saveConfig

      public boolean saveConfig
      whether to save the last config and apply it to newly placed blocks
    • copyConfig

      public boolean copyConfig
      whether to allow copying the config through middle click
    • clearOnDoubleTap

      public boolean clearOnDoubleTap
      if true, double-tapping this configurable block clears configuration.
    • update

      public boolean update
      whether this block has a tile entity that updates
    • destructible

      public boolean destructible
      whether this block has health and can be destroyed
    • unloadable

      public boolean unloadable
      whether unloaders work on this block
    • isDuct

      public boolean isDuct
      if true, this block acts a duct and will connect to armored ducts from the side.
    • allowResupply

      public boolean allowResupply
      whether units can resupply by taking items from this block
    • solid

      public boolean solid
      whether this is solid
    • solidifes

      public boolean solidifes
      whether this block CAN be solid.
    • teamPassable

      public boolean teamPassable
      if true, this counts as a non-solid block to this team.
    • underBullets

      public boolean underBullets
      if true, this block cannot be hit by bullets unless explicitly targeted.
    • rotate

      public boolean rotate
      whether this is rotatable
    • rotateDraw

      public boolean rotateDraw
      if rotate is true and this is false, the region won't rotate when drawing
    • lockRotation

      public boolean lockRotation
      if rotate = false and this is true, rotation will be locked at 0 when placing (default); advanced use only
    • invertFlip

      public boolean invertFlip
      if true, schematic flips with this block are inverted.
    • variants

      public int variants
      number of different variant regions to use
    • drawArrow

      public boolean drawArrow
      whether to draw a rotation arrow - this does not apply to lines of blocks
    • drawTeamOverlay

      public boolean drawTeamOverlay
      whether to draw the team corner by default
    • saveData

      public boolean saveData
      for static blocks only: if true, tile data() is saved in world data.
    • breakable

      public boolean breakable
      whether you can break this with rightclick
    • rebuildable

      public boolean rebuildable
      whether to add this block to brokenblocks
    • privileged

      public boolean privileged
      if true, this logic-related block can only be used with privileged processors (or is one itself)
    • requiresWater

      public boolean requiresWater
      whether this block can only be placed on water
    • placeableLiquid

      public boolean placeableLiquid
      whether this block can be placed on any liquids, anywhere
    • placeablePlayer

      public boolean placeablePlayer
      whether this block can be placed directly by the player via PlacementFragment
    • placeableOn

      public boolean placeableOn
      whether this floor can be placed on.
    • insulated

      public boolean insulated
      whether this block has insulating properties.
    • squareSprite

      public boolean squareSprite
      whether the sprite is a full square.
    • absorbLasers

      public boolean absorbLasers
      whether this block absorbs laser attacks.
    • enableDrawStatus

      public boolean enableDrawStatus
      if false, the status is never drawn
    • drawDisabled

      public boolean drawDisabled
      whether to draw disabled status
    • autoResetEnabled

      public boolean autoResetEnabled
      whether to automatically reset enabled status after a logic block has not interacted for a while.
    • noUpdateDisabled

      public boolean noUpdateDisabled
      if true, the block stops updating when disabled
    • updateInUnits

      public boolean updateInUnits
      if true, this block updates when it's a payload in a unit.
    • alwaysUpdateInUnits

      public boolean alwaysUpdateInUnits
      if true, this block updates in payloads in units regardless of the experimental game rule
    • useColor

      public boolean useColor
      Whether to use this block's color in the minimap. Only used for overlays.
    • itemDrop

      @Nullable public Item itemDrop
      item that drops from this block, used for drills
    • playerUnmineable

      public boolean playerUnmineable
      if true, this block cannot be mined by players. useful for annoying things like sand.
    • attributes

      public Attributes attributes
      Array of affinities to certain things.
    • scaledHealth

      public float scaledHealth
      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

      public int health
      building health; -1 to use scaledHealth
    • armor

      public float armor
      damage absorption, similar to unit armor
    • baseExplosiveness

      public float baseExplosiveness
      base block explosiveness
    • destroyBullet

      @Nullable public BulletType destroyBullet
      bullet that this block spawns when destroyed
    • destroyBulletSameTeam

      public boolean destroyBulletSameTeam
      if true, destroyBullet is spawned on the block's team instead of Derelict team
    • lightLiquid

      @Nullable public Liquid lightLiquid
      liquid used for lighting
    • drawCracks

      public boolean drawCracks
      whether cracks are drawn when this block is damaged
    • createRubble

      public boolean createRubble
      whether rubble is created when this block is destroyed
    • floating

      public boolean floating
      whether this block can be placed on edges of liquids.
    • size

      public int size
      multiblock size
    • offset

      public float offset
      multiblock offset
    • sizeOffset

      public int sizeOffset
      offset for iteration (internal use only)
    • clipSize

      public float clipSize
      Clipping size of this block. Should be as large as the block will draw.
    • placeOverlapRange

      public float placeOverlapRange
      When placeRangeCheck is enabled, this is the range checked for enemy blocks.
    • crushDamageMultiplier

      public float crushDamageMultiplier
      Multiplier of damage dealt to this block by tanks. Does not apply to crawlers.
    • timers

      public int timers
      Max of timers used.
    • cacheLayer

      public CacheLayer cacheLayer
      Cache layer. Only used for 'cached' rendering.
    • fillsTile

      public boolean fillsTile
      Special flag; if false, floor will be drawn under this block even if it is cached.
    • forceDark

      public boolean forceDark
      If true, this block can be covered by darkness / fog even if synthetic.
    • alwaysReplace

      public boolean alwaysReplace
      whether this block can be replaced in all cases
    • replaceable

      public boolean replaceable
      if false, this block can never be replaced.
    • group

      public BlockGroup group
      The block group. Unless canReplace( is overridden, blocks in the same group can replace each other.
    • flags

      public EnumSet<BlockFlag> flags
      List of block flags. Used for AI indexing.
    • priority

      public float priority
      Targeting priority of this block, as seen by enemies.
    • unitCapModifier

      public int unitCapModifier
      How much this block affects the unit cap by. The block flags must contain unitModifier in order for this to work.
    • configurable

      public boolean configurable
      Whether the block can be tapped and selected to configure.
    • commandable

      public boolean commandable
      If true, this building can be selected like a unit when commanding.
    • allowConfigInventory

      public boolean allowConfigInventory
      If true, the building inventory can be shown with the config.
    • selectionRows

      public int selectionRows
      Defines how large selection menus, such as that of sorters, should be.
    • selectionColumns

      public int selectionColumns
      Defines how large selection menus, such as that of sorters, should be.
    • logicConfigurable

      public boolean logicConfigurable
      If true, this block can be configured by logic.
    • consumesTap

      public boolean consumesTap
      Whether this block consumes touchDown events when tapped.
    • drawLiquidLight

      public boolean drawLiquidLight
      Whether to draw the glow of the liquid for this block, if it has one.
    • envRequired

      public int envRequired
      Environmental flags that are *all* required for this block to function. 0 = any environment
    • envEnabled

      public int envEnabled
      The environment flags that this block can function in. If the env matches any of these, it will be enabled.
    • envDisabled

      public int envDisabled
      The environment flags that this block *cannot* function in. If the env matches any of these, it will be *disabled*.
    • sync

      public boolean sync
      Whether to periodically sync this block across the network.
    • conveyorPlacement

      public boolean conveyorPlacement
      Whether this block uses conveyor-type placement mode.
    • allowDiagonal

      public boolean allowDiagonal
      If false, diagonal placement (ctrl) for this block is not allowed.
    • swapDiagonalPlacement

      public boolean swapDiagonalPlacement
      Whether to swap the diagonal placement modes.
    • schematicPriority

      public int schematicPriority
      Build queue priority in schematics.
    • mapColor

      public Color mapColor
      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

      public boolean hasColor
      Whether this block has a minimap color.
    • targetable

      public boolean targetable
      Whether units target this block.
    • attacks

      public boolean attacks
      If true, this block attacks and is considered a turret in the indexer. Building must implement Ranged.
    • suppressable

      public boolean suppressable
      If true, this block is mending-related and can be suppressed with special units/missiles.
    • canOverdrive

      public boolean canOverdrive
      Whether the overdrive core has any effect on this block.
    • outlineColor

      public Color outlineColor
      Outlined icon color.
    • outlineIcon

      public boolean outlineIcon
      Whether any icon region has an outline added.
    • outlineRadius

      public int outlineRadius
      Outline icon radius.
    • outlinedIcon

      public int outlinedIcon
      Which of the icon regions gets the outline added. Uses last icon if <= 0.
    • hasShadow

      public boolean hasShadow
      Whether this block has a shadow under it.
    • customShadow

      public boolean customShadow
      If true, a custom shadow (name-shadow) is drawn under this block.
    • placePitchChange

      public boolean placePitchChange
      Should the sound made when this block is built change in pitch.
    • breakPitchChange

      public boolean breakPitchChange
      Should the sound made when this block is deconstructed change in pitch.
    • placeSound

      public Sound placeSound
      Sound made when this block is built.
    • breakSound

      public Sound breakSound
      Sound made when this block is deconstructed.
    • destroySound

      public Sound destroySound
      Sounds made when this block is destroyed.
    • albedo

      public float albedo
      How reflective this block is.
    • lightColor

      public Color lightColor
      Environmental passive light color.
    • emitLight

      public boolean emitLight
      Whether this environmental block passively emits light. Does not change behavior for non-environmental blocks, but still updates clipSize.
    • lightRadius

      public float lightRadius
      Radius of the light emitted by this block.
    • fogRadius

      public int fogRadius
      How much fog this block uncovers, in tiles. Cannot be dynamic. <= 0 to disable.
    • loopSound

      public Sound loopSound
      The sound that this block makes while active. One sound loop. Do not overuse.
    • loopSoundVolume

      public float loopSoundVolume
      Active sound base volume.
    • ambientSound

      public Sound ambientSound
      The sound that this block makes while idle. Uses one sound loop for all blocks.
    • ambientSoundVolume

      public float ambientSoundVolume
      Idle sound base volume.
    • requirements

      public ItemStack[] requirements
      Cost of constructing this block.
    • category

      public Category category
      Category in place menu.
    • buildCost

      public float buildCost
      Time to build this block in ticks; do not modify directly!
    • buildVisibility

      public BuildVisibility buildVisibility
      Whether this block is visible and can currently be built.
    • buildCostMultiplier

      public float buildCostMultiplier
      Multiplier for speed of building this block.
    • deconstructThreshold

      public float deconstructThreshold
      Build completion at which deconstruction finishes.
    • instantDeconstruct

      public boolean instantDeconstruct
      If true, this block deconstructs immediately. Instant deconstruction implies no resource refund.
    • placeEffect

      public Effect placeEffect
      Effect for placing the block. Passes size as rotation.
    • breakEffect

      public Effect breakEffect
      Effect for breaking the block. Passes size as rotation.
    • destroyEffect

      public Effect destroyEffect
      Effect for destroying the block.
    • researchCostMultiplier

      public float researchCostMultiplier
      Multiplier for cost of research in tech tree.
    • researchCostMultipliers

      public ObjectFloatMap<Item> researchCostMultipliers
      Cost multipliers per-item.
    • researchCost

      @Nullable public ItemStack[] researchCost
      Override for research cost. Uses multipliers above and building requirements if not set.
    • instantTransfer

      public boolean instantTransfer
      Whether this block has instant transfer.
    • quickRotate

      public boolean quickRotate
      Whether you can rotate this block after it is placed.
    • subclass

      @Nullable public Class<?> subclass
      Main subclass. Non-anonymous.
    • selectScroll

      public float selectScroll
      Scroll position for certain blocks.
    • buildType

      public Prov<mindustry.gen.Building> buildType
      Building that is created for this block. Initialized in init() via reflection. Set manually if modded.
    • configurations

      public ObjectMap<Class<?>,Cons2> configurations
      Configuration handlers by type.
    • itemFilter

      public boolean[] itemFilter
      Consumption filters.
    • liquidFilter

      public boolean[] liquidFilter
      Consumption filters.
    • consumers

      public Consume[] consumers
      Array of consumers used by this block. Only populated after init().
    • optionalConsumers

      public Consume[] optionalConsumers
      Array of consumers used by this block. Only populated after init().
    • nonOptionalConsumers

      public Consume[] nonOptionalConsumers
      Array of consumers used by this block. Only populated after init().
    • updateConsumers

      public Consume[] updateConsumers
      Array of consumers used by this block. Only populated after init().
    • hasConsumers

      public boolean hasConsumers
      Set to true if this block has any consumers in its array.
    • consPower

      @Nullable public ConsumePower consPower
      The single power consumer, if applicable.
    • barMap

      protected OrderedMap<String,Func<mindustry.gen.Building,Bar>> barMap
      Map of bars by name.
    • consumeBuilder

      protected Seq<Consume> consumeBuilder
      List for building up consumption before init().
    • generatedIcons

      protected TextureRegion[] generatedIcons
    • editorVariantRegions

      protected TextureRegion[] editorVariantRegions
    • regionRotated1

      public int regionRotated1
      Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks.
    • regionRotated2

      public int regionRotated2
      Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks.
    • region

      public TextureRegion region
    • editorIcon

      public TextureRegion editorIcon
    • customShadowRegion

      public TextureRegion customShadowRegion
    • teamRegion

      public TextureRegion teamRegion
    • teamRegions

      public TextureRegion[] teamRegions
    • variantRegions

      public TextureRegion[] variantRegions
    • variantShadowRegions

      public TextureRegion[] variantShadowRegions
    • tempTiles

      protected static final Seq<Tile> tempTiles
    • tempBuilds

      protected static final Seq<mindustry.gen.Building> tempBuilds
    • timerDump

      protected final int timerDump
      Dump timer ID.
    • dumpTime

      protected final int dumpTime
      How often to try dumping items in ticks, e.g. 5 = 12 times/sec
      See Also:
  • Constructor Details

    • Block

      public Block(String name)
  • Method Details

    • drawBase

      public void drawBase(Tile tile)
    • drawShadow

      public void drawShadow(Tile tile)
    • percentSolid

      public float percentSolid(int x, int y)
    • drawEnvironmentLight

      public void drawEnvironmentLight(Tile tile)
    • drawPlace

      public void drawPlace(int x, int y, int rotation, boolean valid)
      Drawn when you are placing a block.
    • drawPotentialLinks

      public void drawPotentialLinks(int x, int y)
    • drawPlaceText

      public float drawPlaceText(String text, int x, int y, boolean valid)
    • drawOverlay

      public void drawOverlay(float x, float y, int rotation)
      Drawn when placing and when hovering over.
    • sumAttribute

      public float sumAttribute(@Nullable Attribute attr, int x, int y)
    • getDisplayIcon

      public TextureRegion getDisplayIcon(Tile tile)
    • getDisplayName

      public String getDisplayName(Tile tile)
    • minimapColor

      public int minimapColor(Tile tile)
      a custom minimap color for this or 0 to use default colors.
    • outputsItems

      public boolean outputsItems()
    • canPlaceOn

      public boolean canPlaceOn(Tile tile, Team team, int rotation)
      whether this block can be placed on the specified tile.
    • canBreak

      public boolean canBreak(Tile tile)
      whether this block can be broken on the specified tile.
    • rotatedOutput

      public boolean rotatedOutput(int x, int y)
    • synthetic

      public boolean synthetic()
    • checkForceDark

      public boolean checkForceDark(Tile tile)
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      setStats in class UnlockableContent
    • addBar

      public <T extends mindustry.gen.Building> void addBar(String name, Func<T,Bar> sup)
    • removeBar

      public void removeBar(String name)
    • listBars

      public Iterable<Func<mindustry.gen.Building,Bar>> listBars()
    • addLiquidBar

      public void addLiquidBar(Liquid liq)
    • addLiquidBar

      public <T extends mindustry.gen.Building> void addLiquidBar(Func<T,Liquid> current)
      Adds a liquid bar that dynamically displays a liquid type.
    • setBars

      public void setBars()
    • consumesItem

      public boolean consumesItem(Item item)
    • consumesLiquid

      public boolean consumesLiquid(Liquid liq)
    • canReplace

      public boolean canReplace(Block other)
    • getReplacement

      public Block getReplacement(BuildPlan req, Seq<BuildPlan> plans)
      a possible replacement for this block when placed in a line by the player.
    • changePlacementPath

      public void changePlacementPath(Seq<Point2> points, int rotation, boolean diagonalOn)
      Mutates the given list of points used during line placement.
    • changePlacementPath

      public void changePlacementPath(Seq<Point2> points, int rotation)
      Mutates the given list of points used during line placement.
    • handlePlacementLine

      public void handlePlacementLine(Seq<BuildPlan> plans)
      Mutates the given list of plans used during line placement.
    • configSenseable

      public boolean configSenseable()
    • nextConfig

      public Object nextConfig()
    • onNewPlan

      public void onNewPlan(BuildPlan plan)
      Called when a new build plan is created in the player's queue. Blocks can maintain a reference to this plan and add configs to it later.
    • drawPlan

      public void drawPlan(BuildPlan plan, Eachable<BuildPlan> list, boolean valid)
    • drawPlan

      public void drawPlan(BuildPlan plan, Eachable<BuildPlan> list, boolean valid, float alpha)
    • drawPlanRegion

      public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list)
    • drawDefaultPlanRegion

      public void drawDefaultPlanRegion(BuildPlan plan, Eachable<BuildPlan> list)
      this is a different method so subclasses can call it even after overriding the base
    • getPlanRegion

      public TextureRegion getPlanRegion(BuildPlan plan, Eachable<BuildPlan> list)
    • drawPlanConfig

      public void drawPlanConfig(BuildPlan plan, Eachable<BuildPlan> list)
    • drawPlanConfigCenter

      public void drawPlanConfigCenter(BuildPlan plan, Object content, String region, boolean cross)
    • drawPlanConfigCenter

      public void drawPlanConfigCenter(BuildPlan plan, Object content, String region)
    • drawPlanConfigTop

      public void drawPlanConfigTop(BuildPlan plan, Eachable<BuildPlan> list)
    • pointConfig

      public Object pointConfig(Object config, Cons<Point2> transformer)
      Transforms the internal position of this config using the specified function, and return the result.
    • configClear

      public <E extends mindustry.gen.Building> void configClear(Cons<E> cons)
      Configure when a null value is passed.
    • config

      public <T, E extends mindustry.gen.Building> void config(Class<T> type, Cons2<E,T> config)
      Listen for a config by class type.
    • isAccessible

      public boolean isAccessible()
    • nearbySide

      public void nearbySide(int x, int y, int rotation, int index, Point2 out)
      sets to the index-th side outside of this block, using the given rotation.
    • getEdges

      public Point2[] getEdges()
    • getInsideEdges

      public Point2[] getInsideEdges()
    • iterateTaken

      public void iterateTaken(int x, int y, Intc2 placer)
      Iterate through ever grid position taken up by this block.
    • editorIcon

      public TextureRegion editorIcon()
      Never use outside of the editor!
    • editorVariantRegions

      public TextureRegion[] editorVariantRegions()
      Never use outside of the editor!
    • makeIconRegions

      public TextureRegion[] makeIconRegions()
      special icons to outline and save with an -outline variant. Vanilla only.
    • icons

      protected TextureRegion[] icons()
    • getRegionsToOutline

      public void getRegionsToOutline(Seq<TextureRegion> out)
    • getGeneratedIcons

      public TextureRegion[] getGeneratedIcons()
    • resetGeneratedIcons

      public void resetGeneratedIcons()
    • variantRegions

      public TextureRegion[] variantRegions()
    • hasBuilding

      public boolean hasBuilding()
    • newBuilding

      public final mindustry.gen.Building newBuilding()
    • updateClipRadius

      public void updateClipRadius(float size)
    • bounds

      public Rect bounds(int x, int y, Rect rect)
    • isMultiblock

      public boolean isMultiblock()
    • isVisible

      public boolean isVisible()
    • isVisibleOn

      public boolean isVisibleOn(Planet planet)
    • isPlaceable

      public boolean isPlaceable()
    • supportsEnv

      public boolean supportsEnv(int env)
      whether this block supports a specific environment.
    • placeBegan

      public void placeBegan(Tile tile, Block previous)
      Called when building of this block begins.
    • placeBegan

      public void placeBegan(Tile tile, Block previous, @Nullable mindustry.gen.Unit builder)
      Called when building of this block begins.
    • beforePlaceBegan

      public void beforePlaceBegan(Tile tile, Block previous)
      Called right before building of this block begins.
    • isFloor

      public boolean isFloor()
    • isOverlay

      public boolean isOverlay()
    • asFloor

      public Floor asFloor()
    • isAir

      public boolean isAir()
    • canBeBuilt

      public boolean canBeBuilt()
    • environmentBuildable

      public boolean environmentBuildable()
    • isStatic

      public boolean isStatic()
    • findConsumer

      public <T extends Consume> T findConsumer(Boolf<Consume> filter)
    • hasConsumer

      public boolean hasConsumer(Consume cons)
    • removeConsumer

      public void removeConsumer(Consume cons)
    • consumeLiquid

      public ConsumeLiquid consumeLiquid(Liquid liquid, float amount)
    • consumeLiquids

      public ConsumeLiquids consumeLiquids(LiquidStack... stacks)
    • consumePower

      public ConsumePower consumePower(float powerPerTick)
      Creates a consumer which directly uses power without buffering it.
      powerPerTick - The amount of power which is required each tick for 100% efficiency.
      the created consumer object.
    • consumePowerCond

      public <T extends mindustry.gen.Building> ConsumePower consumePowerCond(float usage, Boolf<T> cons)
      Creates a consumer which only consumes power when the condition is met.
    • consumePowerDynamic

      public <T extends mindustry.gen.Building> ConsumePower consumePowerDynamic(Floatf<T> usage)
      Creates a consumer that consumes a dynamic amount of power.
    • consumePowerBuffered

      public ConsumePower consumePowerBuffered(float powerCapacity)
      Creates a consumer which stores power.
      powerCapacity - The maximum capacity in power units.
    • consumeItem

      public ConsumeItems consumeItem(Item item)
    • consumeItem

      public ConsumeItems consumeItem(Item item, int amount)
    • consumeItems

      public ConsumeItems consumeItems(ItemStack... items)
    • consumeCoolant

      public ConsumeCoolant consumeCoolant(float amount)
    • consumeCoolant

      public ConsumeCoolant consumeCoolant(float amount, boolean allowLiquid, boolean allowGas)
    • consume

      public <T extends Consume> T consume(T consume)
    • setupRequirements

      public void setupRequirements(Category cat, ItemStack[] stacks)
    • setupRequirements

      public void setupRequirements(Category cat, BuildVisibility visible, ItemStack[] stacks)
    • requirements

      public void requirements(Category cat, ItemStack[] stacks, boolean unlocked)
    • requirements

      public void requirements(Category cat, ItemStack[] stacks)
    • requirements

      public void requirements(Category cat, BuildVisibility visible, ItemStack[] stacks)
      Sets up requirements. Use only this method to set up requirements.
    • initBuilding

      protected void initBuilding()
    • researchRequirements

      public ItemStack[] researchRequirements()
      researchRequirements in class UnlockableContent
      items needed to research this content
    • getDependencies

      public void getDependencies(Cons<UnlockableContent> cons)
      Description copied from class: UnlockableContent
      Iterates through any implicit dependencies of this content. For blocks, this would be the items required to build it.
      getDependencies in class UnlockableContent
    • getContentType

      public ContentType getContentType()
      Description copied from class: Content
      Returns the type name of this piece of content. This should return the same value for all instances of this content type.
      Specified by:
      getContentType in class Content
    • logicVisible

      public boolean logicVisible()
      logicVisible in class UnlockableContent
    • init

      public void init()
      Called after all blocks are created.
      init in class Content
    • load

      public void load()
      Description copied from class: Content
      Called after all content is created, only on non-headless versions. Use for loading regions or other image data.
      load in class Content
    • isHidden

      public boolean isHidden()
      Description copied from class: UnlockableContent
      Whether this content is always hidden in the content database dialog.
      isHidden in class UnlockableContent
    • createIcons

      public void createIcons(MultiPacker packer)
      Description copied from class: UnlockableContent
      Generate any special icons for this content. Called synchronously. No regions are loaded at this point; grab pixmaps from the packer.
      createIcons in class UnlockableContent
    • planRotation

      public int planRotation(int rot)
    • flipRotation

      public void flipRotation(BuildPlan req, boolean x)
    • sense

      public double sense(LAccess sensor)
      Specified by:
      sense in interface Senseable
    • sense

      public double sense(Content content)
      Specified by:
      sense in interface Senseable
    • senseObject

      public Object senseObject(LAccess sensor)
      Specified by:
      senseObject in interface Senseable