Class GenericCrafter

All Implemented Interfaces:
Comparable<Content>, Senseable
Direct Known Subclasses:
AttributeCrafter, HeatCrafter, HeatProducer

public class GenericCrafter extends Block
  • Field Details

    • outputItem

      @Nullable public ItemStack outputItem
      Written to outputItems as a single-element array if outputItems is null.
    • outputItems

      @Nullable public ItemStack[] outputItems
      Overwrites outputItem if not null.
    • outputLiquid

      @Nullable public LiquidStack outputLiquid
      Written to outputLiquids as a single-element array if outputLiquids is null.
    • outputLiquids

      @Nullable public LiquidStack[] outputLiquids
      Overwrites outputLiquid if not null.
    • liquidOutputDirections

      public int[] liquidOutputDirections
      Liquid output directions, specified in the same order as outputLiquids. Use -1 to dump in every direction. Rotations are relative to block.
    • dumpExtraLiquid

      public boolean dumpExtraLiquid
      if true, crafters with multiple liquid outputs will dump excess when there's still space for at least one liquid type
    • ignoreLiquidFullness

      public boolean ignoreLiquidFullness
    • craftTime

      public float craftTime
    • craftEffect

      public Effect craftEffect
    • updateEffect

      public Effect updateEffect
    • updateEffectChance

      public float updateEffectChance
    • warmupSpeed

      public float warmupSpeed
    • legacyReadWarmup

      public boolean legacyReadWarmup
      Only used for legacy cultivator blocks.
    • drawer

      public DrawBlock drawer
  • Constructor Details

    • GenericCrafter

      public GenericCrafter(String name)
  • Method Details

    • setStats

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

      public void setBars()
      Overrides:
      setBars in class Block
    • rotatedOutput

      public boolean rotatedOutput(int x, int y)
      Overrides:
      rotatedOutput in class Block
    • 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.
      Overrides:
      load in class Block
    • init

      public void init()
      Description copied from class: Block
      Called after all blocks are created.
      Overrides:
      init in class Block
    • drawPlanRegion

      public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list)
      Overrides:
      drawPlanRegion in class Block
    • icons

      public TextureRegion[] icons()
      Overrides:
      icons in class Block
    • outputsItems

      public boolean outputsItems()
      Overrides:
      outputsItems in class Block
    • getRegionsToOutline

      public void getRegionsToOutline(Seq<TextureRegion> out)
      Overrides:
      getRegionsToOutline in class Block
    • drawOverlay

      public void drawOverlay(float x, float y, int rotation)
      Description copied from class: Block
      Drawn when placing and when hovering over.
      Overrides:
      drawOverlay in class Block