use of baritone.api.schematic.format.ISchematicFormat in project Spark-Client by Spark-Client-Development.
the class BuilderProcess method build.
@Override
public boolean build(String name, File schematic, Vec3i origin) {
Optional<ISchematicFormat> format = SchematicSystem.INSTANCE.getByFile(schematic);
if (!format.isPresent()) {
return false;
}
ISchematic parsed;
try {
parsed = format.get().parse(new FileInputStream(schematic));
} catch (Exception e) {
e.printStackTrace();
return false;
}
if (Baritone.settings().mapArtMode.getValue()) {
parsed = new MapArtSchematic((IStaticSchematic) parsed);
}
build(name, parsed, origin);
return true;
}
use of baritone.api.schematic.format.ISchematicFormat in project baritone by cabaletta.
the class BuilderProcess method build.
@Override
public boolean build(String name, File schematic, Vec3i origin) {
Optional<ISchematicFormat> format = SchematicSystem.INSTANCE.getByFile(schematic);
if (!format.isPresent()) {
return false;
}
ISchematic parsed;
try {
parsed = format.get().parse(new FileInputStream(schematic));
} catch (Exception e) {
e.printStackTrace();
return false;
}
if (Baritone.settings().mapArtMode.value) {
parsed = new MapArtSchematic((IStaticSchematic) parsed);
}
if (Baritone.settings().buildOnlySelection.value) {
parsed = new SelectionSchematic(parsed, origin, baritone.getSelectionManager().getSelections());
}
build(name, parsed, origin);
return true;
}
Aggregations