Package mindustry.io
Class TypeIO
java.lang.Object
mindustry.io.TypeIO
Class for specifying read/write methods for code generation. All IO MUST be thread safe!
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents a building that has not been resolved yet.static class
Represents a unit that has not been resolved yet. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getMaxPlans
(Queue<BuildPlan> plans) static Ability[]
readAbilities
(Reads read) static Ability[]
readAbilities
(Reads read, Ability[] abilities) static Packets.AdminAction
readAction
(Reads read) static Block
static mindustry.gen.Building
readBuilding
(Reads read) static BulletType
readBulletType
(Reads read) static byte[]
static Color
static Color
static UnitCommand
readCommand
(Reads read) static Content
readContent
(Reads read) static UnitController
readController
(Reads read, UnitController prev) static Effect
readEffect
(Reads read) static <T extends mindustry.gen.Entityc>
TreadEntity
(Reads read) static int[]
static IntSeq
readIntSeq
(Reads read) static Item
static ItemStack
static ItemStack
static Packets.KickReason
static Liquid
readLiquid
(Reads read) static WeaponMount[]
readMounts
(Reads read) static WeaponMount[]
readMounts
(Reads read, WeaponMount[] mounts) static Object
readObject
(Reads read) static Object
readObjectBoxed
(Reads read, boolean box) Reads an object, but boxes buildings.static MapObjectives
readObjectives
(Reads read) static Payload
readPayload
(Reads read) static BuildPlan
static BuildPlan[]
readPlansQueue
(Reads read) static Rules
static Sound
static StatusEntry
readStatus
(Reads read) static String
readString
(Reads read) static String
readString
(ByteBuffer read) static String[][]
readStringArray
(Reads read) static String
readStringData
(DataInput buffer) static String[]
readStrings
(Reads read) static Team
static Tile
static Administration.TraceInfo
readTraceInfo
(Reads read) static mindustry.gen.Unit
static UnitType
readUnitType
(Reads read) static Vec2
static Vec2
static Vec2
readVecNullable
(Reads read) static Weather
readWeather
(Reads read) static void
writeAbilities
(Writes write, Ability[] abilities) static void
writeAction
(Writes write, Packets.AdminAction reason) static void
writeBlock
(Writes write, Block block) static void
writeBuilding
(Writes write, mindustry.gen.Building tile) static void
writeBulletType
(Writes write, BulletType type) static void
writeBytes
(Writes write, byte[] bytes) static void
writeColor
(Writes write, Color color) static void
writeCommand
(Writes write, UnitCommand command) static void
writeContent
(Writes write, Content cont) static void
writeController
(Writes write, UnitController control) static void
writeEffect
(Writes write, Effect effect) static void
writeEntity
(Writes write, mindustry.gen.Entityc entity) static void
static void
writeIntSeq
(Writes write, IntSeq seq) static void
static void
writeItems
(Writes write, ItemStack stack) static void
writeKick
(Writes write, Packets.KickReason reason) static void
writeLiquid
(Writes write, Liquid liquid) static void
writeMounts
(Writes writes, WeaponMount[] mounts) static void
writeObject
(Writes write, Object object) static void
writeObjectives
(Writes write, MapObjectives executor) static void
writePayload
(Writes writes, Payload payload) static void
static void
writePlans
(Writes write, BuildPlan[] plans) static void
writePlansQueueNet
(Writes write, Queue<BuildPlan> plans) static void
writeRules
(Writes write, Rules rules) static void
writeSound
(Writes write, Sound sound) static void
writeStatus
(Writes write, StatusEntry entry) static void
writeString
(Writes write, String string) static void
writeString
(ByteBuffer write, String string) static void
writeStringArray
(Writes write, String[][] strings) static void
writeStringData
(DataOutput buffer, String string) static void
writeStrings
(Writes write, String[] strings) static void
writeStrings
(Writes write, String[] strings, int maxLen) static void
static void
static void
writeTraceInfo
(Writes write, Administration.TraceInfo trace) static void
static void
writeUnitType
(Writes write, UnitType effect) static void
static void
writeVecNullable
(Writes write, Vec2 v) static void
writeWeather
(Writes write, Weather item)
-
Constructor Details
-
TypeIO
public TypeIO()
-
-
Method Details
-
writeObject
-
readObject
-
readObjectBoxed
Reads an object, but boxes buildings. -
writePayload
-
readPayload
-
writeMounts
-
readMounts
-
readMounts
-
readAbilities
-
writeAbilities
-
readAbilities
-
writeUnit
-
readUnit
-
writeCommand
-
readCommand
-
writeEntity
-
readEntity
-
writeBuilding
-
readBuilding
-
writeTile
-
readTile
-
writeBlock
-
readBlock
-
getMaxPlans
- Returns:
- the maximum acceptable amount of plans to send over the network
-
writePlansQueueNet
-
readPlansQueue
-
writePlan
-
readPlan
-
writePlans
-
readPlans
-
writeController
-
readController
-
writeKick
-
readKick
-
writeRules
-
readRules
-
writeObjectives
-
readObjectives
-
writeVecNullable
-
readVecNullable
-
writeVec2
-
readVec2
-
readVec2
-
writeStatus
-
readStatus
-
writeItems
-
readItems
-
readItems
-
writeTeam
-
readTeam
-
writeAction
-
readAction
-
writeUnitType
-
readUnitType
-
writeEffect
-
readEffect
-
writeColor
-
readColor
-
readColor
-
writeIntSeq
-
readIntSeq
-
writeContent
-
readContent
-
writeLiquid
-
readLiquid
-
writeBulletType
-
readBulletType
-
writeItem
-
readItem
-
writeSound
-
readSound
-
writeWeather
-
readWeather
-
writeString
-
readString
-
writeString
-
readString
-
writeBytes
-
readBytes
-
writeInts
-
readInts
-
writeTraceInfo
-
readTraceInfo
-
writeStrings
-
writeStrings
-
readStrings
-
writeStringArray
-
readStringArray
-
writeStringData
- Throws:
IOException
-
readStringData
- Throws:
IOException
-