Package mindustry.game
Class Schematics
java.lang.Object
mindustry.game.Schematics
- All Implemented Interfaces:
arc.assets.Loadable
Handles schematics.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a schematic to the list, also copying it into the files.arc.struct.Seq<Schematic>all()create(int x, int y, int x2, int y2) Creates a schematic from a world selection.arc.graphics.gl.FrameBuffergetDefaultLoadout(CoreBlock block) arc.struct.Seq<Schematic>getLoadouts(CoreBlock block) intgetMaxLaunchSize(Block block) arc.graphics.TexturegetPreview(Schematic schematic) booleanhasPreview(Schematic schematic) booleanisDefaultLoadout(Schematic schem) voidload()Load all schematics in the folder immediately.voidloadSync()voidstatic voidstatic voidstatic voidplaceLaunchLoadout(int x, int y) Places the last launch loadout at the coordinates and fills it with the launch resources.static voidplaceLoadout(Schematic schem, int x, int y) static voidplaceLoadout(Schematic schem, int x, int y, Team team) static voidplaceLoadout(Schematic schem, int x, int y, Team team, boolean check) static Schematicread(arc.files.Fi file) static Schematicread(InputStream input) static SchematicreadBase64(String schematic) Loads a schematic from base64.voidstatic SchematicvoidvoidsavePreview(Schematic schematic, arc.files.Fi file) arc.struct.Seq<BuildPlan>Creates an array of build plans from a schematic's data, centered on the provided x,y coordinates.arc.struct.Seq<BuildPlan>Creates an array of build plans from a schematic's data, centered on the provided x,y coordinates.static voidstatic voidwrite(Schematic schematic, OutputStream output) writeBase64(Schematic schematic) Converts a schematic to base64.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface arc.assets.Loadable
getDependencies, getName, loadAsync
-
Constructor Details
-
Schematics
public Schematics()
-
-
Method Details
-
loadSync
public void loadSync()- Specified by:
loadSyncin interfacearc.assets.Loadable
-
load
public void load()Load all schematics in the folder immediately. -
overwrite
-
all
-
saveChanges
-
savePreview
-
getPreview
-
hasPreview
-
getBuffer
-
toPlans
Creates an array of build plans from a schematic's data, centered on the provided x,y coordinates. -
toPlans
Creates an array of build plans from a schematic's data, centered on the provided x,y coordinates. -
getLoadouts
- Returns:
- all the valid loadouts for a specific core type.
-
getLoadouts
-
getDefaultLoadout
-
isDefaultLoadout
-
getMaxLaunchSize
-
add
Adds a schematic to the list, also copying it into the files. -
remove
-
create
Creates a schematic from a world selection. -
writeBase64
Converts a schematic to base64. Note that the result of this will always start with 'bXNjaAB'. -
placeLaunchLoadout
public static void placeLaunchLoadout(int x, int y) Places the last launch loadout at the coordinates and fills it with the launch resources. -
placeLoadout
-
placeLoadout
-
placeLoadout
-
place
-
place
-
readBase64
Loads a schematic from base64. May throw an exception. -
read
- Throws:
IOException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
rotate
- Returns:
- a temporary schematic representing the input rotated 90 degrees counterclockwise N times.
-