Class DrawBlock

java.lang.Object
mindustry.world.draw.DrawBlock
Direct Known Subclasses:
DrawArcSmelt, DrawBlurSpin, DrawBubbles, DrawCells, DrawCircles, DrawCrucibleFlame, DrawCultivator, DrawDefault, DrawFade, DrawFlame, DrawFrames, DrawGlowRegion, DrawHeatInput, DrawHeatOutput, DrawHeatRegion, DrawLiquidOutputs, DrawLiquidRegion, DrawLiquidTile, DrawMulti, DrawMultiWeave, DrawParticles, DrawPistons, DrawPower, DrawPulseShape, DrawPumpLiquid, DrawRegion, DrawShape, DrawSideRegion, DrawSoftParticles, DrawSpikes, DrawTurret, DrawWarmupRegion, DrawWeave

public abstract class DrawBlock extends Object
An implementation of custom rendering behavior for a crafter block. This is used mostly for mods.
  • Field Details

    • rand

      protected static final Rand rand
    • iconOverride

      @Nullable public String[] iconOverride
      If set, the icon is overridden to be these strings, in order. Each string is a suffix.
  • Constructor Details

    • DrawBlock

      public DrawBlock()
  • Method Details

    • getRegionsToOutline

      public void getRegionsToOutline(Block block, Seq<TextureRegion> out)
    • draw

      public void draw(mindustry.gen.Building build)
      Draws the block itself.
    • drawLight

      public void drawLight(mindustry.gen.Building build)
      Draws any extra light for the block.
    • drawPlan

      public void drawPlan(Block block, BuildPlan plan, Eachable<BuildPlan> list)
      Draws the planned version of this block.
    • load

      public void load(Block block)
      Load any relevant texture regions.
    • icons

      public TextureRegion[] icons(Block block)
      Returns:
      the generated icons to be used for this block.
    • finalIcons

      public final TextureRegion[] finalIcons(Block block)
    • expectCrafter

      public GenericCrafter expectCrafter(Block block)