Package mindustry.game
Class Schematics
java.lang.Object
mindustry.game.Schematics
- All Implemented Interfaces:
Loadable
Handles schematics.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a schematic to the list, also copying it into the files.all()
create
(int x, int y, int x2, int y2) Creates a schematic from a world selection.getDefaultLoadout
(CoreBlock block) getLoadouts
(CoreBlock block) int
getMaxLaunchSize
(Block block) getPreview
(Schematic schematic) boolean
hasPreview
(Schematic schematic) boolean
isDefaultLoadout
(Schematic schem) void
load()
Load all schematics in the folder immediately.void
loadSync()
void
static void
static void
static void
placeLaunchLoadout
(int x, int y) Places the last launch loadout at the coordinates and fills it with the launch resources.static void
placeLoadout
(Schematic schem, int x, int y) static void
placeLoadout
(Schematic schem, int x, int y, Team team) static void
placeLoadout
(Schematic schem, int x, int y, Team team, boolean check) static Schematic
static Schematic
read
(InputStream input) static Schematic
readBase64
(String schematic) Loads a schematic from base64.void
static Schematic
void
void
savePreview
(Schematic schematic, Fi file) Creates an array of build plans from a schematic's data, centered on the provided x+y coordinates.static void
static void
write
(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, wait
Methods inherited from interface arc.assets.Loadable
getDependencies, getName, loadAsync
-
Constructor Details
-
Schematics
public Schematics()
-
-
Method Details
-
loadSync
public void loadSync() -
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. -
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.
-