Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-07 20:10:06 +01:00
Add API method for creation schematic visualizer
Dieser Commit ist enthalten in:
Ursprung
f72977e69a
Commit
fce706c78f
@ -39,6 +39,8 @@ import java.nio.file.LinkOption;
|
|||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An Immutable virtual world used to display & select schematics
|
* An Immutable virtual world used to display & select schematics
|
||||||
*/
|
*/
|
||||||
@ -54,6 +56,18 @@ public class SchemVis extends ImmutableVirtualWorld {
|
|||||||
private final BlockVector2D chunkOffset;
|
private final BlockVector2D chunkOffset;
|
||||||
private BlockVector2D lastPosition;
|
private BlockVector2D lastPosition;
|
||||||
|
|
||||||
|
public static SchemVis create(FawePlayer player, Collection<File> files) throws IOException {
|
||||||
|
checkNotNull(player);
|
||||||
|
checkNotNull(files);
|
||||||
|
SchemVis visExtent = new SchemVis(player);
|
||||||
|
for (File file : files) {
|
||||||
|
visExtent.add(file);
|
||||||
|
}
|
||||||
|
visExtent.bind();
|
||||||
|
visExtent.update();
|
||||||
|
return visExtent;
|
||||||
|
}
|
||||||
|
|
||||||
public SchemVis(FawePlayer player) {
|
public SchemVis(FawePlayer player) {
|
||||||
this.files = new Long2ObjectOpenHashMap<>();
|
this.files = new Long2ObjectOpenHashMap<>();
|
||||||
this.chunks = new Long2ObjectOpenHashMap<>();
|
this.chunks = new Long2ObjectOpenHashMap<>();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren