Package mindustry.io

Class TypeIO

java.lang.Object
mindustry.io.TypeIO

public class TypeIO extends Object
Class for specifying read/write methods for code generation. All IO MUST be thread safe!
  • Constructor Details

    • TypeIO

      public TypeIO()
  • Method Details

    • writeObject

      public static void writeObject(Writes write, Object object)
    • readObject

      @Nullable public static Object readObject(Reads read)
    • readObjectBoxed

      @Nullable public static Object readObjectBoxed(Reads read, boolean box)
      Reads an object, but boxes buildings.
    • writePayload

      public static void writePayload(Writes writes, Payload payload)
    • readPayload

      public static Payload readPayload(Reads read)
    • writeMounts

      public static void writeMounts(Writes writes, WeaponMount[] mounts)
    • readMounts

      public static WeaponMount[] readMounts(Reads read, WeaponMount[] mounts)
    • readMounts

      public static WeaponMount[] readMounts(Reads read)
    • readAbilities

      public static Ability[] readAbilities(Reads read, Ability[] abilities)
    • writeAbilities

      public static void writeAbilities(Writes write, Ability[] abilities)
    • readAbilities

      public static Ability[] readAbilities(Reads read)
    • writeUnit

      public static void writeUnit(Writes write, mindustry.gen.Unit unit)
    • readUnit

      public static mindustry.gen.Unit readUnit(Reads read)
    • writeCommand

      public static void writeCommand(Writes write, @Nullable UnitCommand command)
    • readCommand

      @Nullable public static UnitCommand readCommand(Reads read)
    • writeEntity

      public static void writeEntity(Writes write, mindustry.gen.Entityc entity)
    • readEntity

      public static <T extends mindustry.gen.Entityc> T readEntity(Reads read)
    • writeBuilding

      public static void writeBuilding(Writes write, mindustry.gen.Building tile)
    • readBuilding

      public static mindustry.gen.Building readBuilding(Reads read)
    • writeTile

      public static void writeTile(Writes write, Tile tile)
    • readTile

      public static Tile readTile(Reads read)
    • writeBlock

      public static void writeBlock(Writes write, Block block)
    • readBlock

      public static Block readBlock(Reads read)
    • getMaxPlans

      public static int getMaxPlans(Queue<BuildPlan> plans)
      Returns:
      the maximum acceptable amount of plans to send over the network
    • writePlansQueueNet

      public static void writePlansQueueNet(Writes write, Queue<BuildPlan> plans)
    • readPlansQueue

      public static Queue<BuildPlan> readPlansQueue(Reads read)
    • writePlan

      public static void writePlan(Writes write, BuildPlan plan)
    • readPlan

      public static BuildPlan readPlan(Reads read)
    • writePlans

      public static void writePlans(Writes write, BuildPlan[] plans)
    • readPlans

      public static BuildPlan[] readPlans(Reads read)
    • writeController

      public static void writeController(Writes write, UnitController control)
    • readController

      public static UnitController readController(Reads read, UnitController prev)
    • writeKick

      public static void writeKick(Writes write, Packets.KickReason reason)
    • readKick

      public static Packets.KickReason readKick(Reads read)
    • writeRules

      public static void writeRules(Writes write, Rules rules)
    • readRules

      public static Rules readRules(Reads read)
    • writeObjectives

      public static void writeObjectives(Writes write, MapObjectives executor)
    • readObjectives

      public static MapObjectives readObjectives(Reads read)
    • writeVecNullable

      public static void writeVecNullable(Writes write, @Nullable Vec2 v)
    • readVecNullable

      @Nullable public static Vec2 readVecNullable(Reads read)
    • writeVec2

      public static void writeVec2(Writes write, Vec2 v)
    • readVec2

      public static Vec2 readVec2(Reads read, Vec2 base)
    • readVec2

      public static Vec2 readVec2(Reads read)
    • writeStatus

      public static void writeStatus(Writes write, StatusEntry entry)
    • readStatus

      public static StatusEntry readStatus(Reads read)
    • writeItems

      public static void writeItems(Writes write, ItemStack stack)
    • readItems

      public static ItemStack readItems(Reads read, ItemStack stack)
    • readItems

      public static ItemStack readItems(Reads read)
    • writeTeam

      public static void writeTeam(Writes write, Team team)
    • readTeam

      public static Team readTeam(Reads read)
    • writeAction

      public static void writeAction(Writes write, Packets.AdminAction reason)
    • readAction

      public static Packets.AdminAction readAction(Reads read)
    • writeUnitType

      public static void writeUnitType(Writes write, UnitType effect)
    • readUnitType

      public static UnitType readUnitType(Reads read)
    • writeEffect

      public static void writeEffect(Writes write, Effect effect)
    • readEffect

      public static Effect readEffect(Reads read)
    • writeColor

      public static void writeColor(Writes write, Color color)
    • readColor

      public static Color readColor(Reads read)
    • readColor

      public static Color readColor(Reads read, Color color)
    • writeIntSeq

      public static void writeIntSeq(Writes write, IntSeq seq)
    • readIntSeq

      public static IntSeq readIntSeq(Reads read)
    • writeContent

      public static void writeContent(Writes write, Content cont)
    • readContent

      public static Content readContent(Reads read)
    • writeLiquid

      public static void writeLiquid(Writes write, Liquid liquid)
    • readLiquid

      public static Liquid readLiquid(Reads read)
    • writeBulletType

      public static void writeBulletType(Writes write, BulletType type)
    • readBulletType

      public static BulletType readBulletType(Reads read)
    • writeItem

      public static void writeItem(Writes write, Item item)
    • readItem

      public static Item readItem(Reads read)
    • writeSound

      public static void writeSound(Writes write, Sound sound)
    • readSound

      public static Sound readSound(Reads read)
    • writeWeather

      public static void writeWeather(Writes write, Weather item)
    • readWeather

      public static Weather readWeather(Reads read)
    • writeString

      public static void writeString(Writes write, String string)
    • readString

      public static String readString(Reads read)
    • writeString

      public static void writeString(ByteBuffer write, String string)
    • readString

      public static String readString(ByteBuffer read)
    • writeBytes

      public static void writeBytes(Writes write, byte[] bytes)
    • readBytes

      public static byte[] readBytes(Reads read)
    • writeInts

      public static void writeInts(Writes write, int[] ints)
    • readInts

      public static int[] readInts(Reads read)
    • writeTraceInfo

      public static void writeTraceInfo(Writes write, Administration.TraceInfo trace)
    • readTraceInfo

      public static Administration.TraceInfo readTraceInfo(Reads read)
    • writeStrings

      public static void writeStrings(Writes write, String[] strings, int maxLen)
    • writeStrings

      public static void writeStrings(Writes write, String[] strings)
    • readStrings

      public static String[] readStrings(Reads read)
    • writeStringArray

      public static void writeStringArray(Writes write, String[][] strings)
    • readStringArray

      public static String[][] readStringArray(Reads read)
    • writeStringData

      public static void writeStringData(DataOutput buffer, String string) throws IOException
      Throws:
      IOException
    • readStringData

      public static String readStringData(DataInput buffer) throws IOException
      Throws:
      IOException