Implement Prototype creation
Dieser Commit ist enthalten in:
Ursprung
c39eb4dda6
Commit
435e986777
@ -22,9 +22,16 @@ package de.steamwar.bausystem.region;
|
||||
import yapion.hierarchy.types.YAPIONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Prototype {
|
||||
|
||||
private static final Map<String, Prototype> PROTOTYPE_MAP = new HashMap<>();
|
||||
|
||||
private final String name;
|
||||
private final String displayName;
|
||||
|
||||
private final int sizeX;
|
||||
private final int sizeY;
|
||||
private final int sizeZ;
|
||||
@ -37,7 +44,12 @@ public class Prototype {
|
||||
private final SubPrototype testblock;
|
||||
private final SubPrototype build;
|
||||
|
||||
public Prototype(YAPIONObject yapionObject) {
|
||||
public Prototype(String name, YAPIONObject yapionObject) {
|
||||
PROTOTYPE_MAP.put(name, this);
|
||||
|
||||
this.name = name;
|
||||
displayName = yapionObject.getPlainValueOrDefault("displayName", name);
|
||||
|
||||
sizeX = yapionObject.getPlainValue("sizeX");
|
||||
sizeY = yapionObject.getPlainValue("sizeY");
|
||||
sizeZ = yapionObject.getPlainValue("sizeZ");
|
||||
@ -105,7 +117,10 @@ public class Prototype {
|
||||
extensionPositiveZ = yapionObject.getPlainValueOrDefault("extensionPositiveZ", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Region generateRegion() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren