Class WorldLabelComp

java.lang.Object
mindustry.entities.comp.WorldLabelComp
All Implemented Interfaces:
Position, mindustry.gen.Drawc, mindustry.gen.Entityc, mindustry.gen.Posc, mindustry.gen.Syncc

public abstract class WorldLabelComp extends Object implements mindustry.gen.Posc, mindustry.gen.Drawc, mindustry.gen.Syncc
Component/entity for labels in world space. Useful for servers. Does not save in files - create only on world load.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte
     
    static final byte
     
    byte
    Flags are packed into a byte for sync efficiency; see the flag static values.
    float
     
     
    float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    void
     
    static void
    drawAt(String text, float x, float y, float layer, int flags, float fontSize)
     
    void
    This MUST be called instead of remove()!

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface mindustry.gen.Entityc

    add, afterRead, as, classId, id, id, isAdded, isLocal, isNull, isRemote, read, self, serialize, write

    Methods inherited from interface mindustry.gen.Posc

    blockOn, buildOn, floorOn, getX, getY, onSolid, set, set, tileOn, tileX, tileY, trns, trns, x, x, y, y

    Methods inherited from interface arc.math.geom.Position

    angleTo, angleTo, dst, dst, dst2, dst2, within, within

    Methods inherited from interface mindustry.gen.Syncc

    afterSync, handleSyncHidden, interpolate, isSyncHidden, lastUpdated, lastUpdated, readSync, readSyncManual, remove, snapInterpolation, snapSync, update, updateSpacing, updateSpacing, writeSync, writeSyncManual
  • Field Details

    • flagBackground

      public static final byte flagBackground
      See Also:
    • flagOutline

      public static final byte flagOutline
      See Also:
    • text

      public String text
    • fontSize

      public float fontSize
    • z

      public float z
    • flags

      public byte flags
      Flags are packed into a byte for sync efficiency; see the flag static values.
  • Constructor Details

    • WorldLabelComp

      public WorldLabelComp()
  • Method Details

    • clipSize

      public float clipSize()
      Specified by:
      clipSize in interface mindustry.gen.Drawc
    • draw

      public void draw()
      Specified by:
      draw in interface mindustry.gen.Drawc
    • drawAt

      public static void drawAt(String text, float x, float y, float layer, int flags, float fontSize)
    • hide

      public void hide()
      This MUST be called instead of remove()!