Skip to content
This repository was archived by the owner on May 27, 2023. It is now read-only.

Commit 1a42bba

Browse files
emortalLooFifteen
authored andcommitted
Added getters for dimensions and offsets
1 parent 156100e commit 1a42bba

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

src/main/java/net/crystalgames/scaffolding/schematic/Schematic.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ default void read(InputStream inputStream) throws IOException, NBTException {
2222
inputStream.close();
2323
}
2424
void read(NBTCompound nbtTag) throws NBTException;
25+
2526
void write(OutputStream outputStream, Region region) throws IOException;
2627
CompletableFuture<Region> build(Instance instance, Pos position);
2728

29+
short getWidth();
30+
short getHeight();
31+
short getLength();
32+
33+
int getOffsetX();
34+
int getOffsetY();
35+
int getOffsetZ();
36+
2837
}

src/main/java/net/crystalgames/scaffolding/schematic/impl/MCEditSchematic.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,34 @@ public CompletableFuture<Region> build(Instance instance, Pos position) {
139139
return future;
140140
}
141141

142+
@Override
143+
public short getWidth() {
144+
return width;
145+
}
146+
147+
@Override
148+
public short getHeight() {
149+
return height;
150+
}
151+
152+
@Override
153+
public short getLength() {
154+
return length;
155+
}
156+
157+
@Override
158+
public int getOffsetX() {
159+
return offsetX;
160+
}
161+
162+
@Override
163+
public int getOffsetY() {
164+
return offsetY;
165+
}
166+
167+
@Override
168+
public int getOffsetZ() {
169+
return offsetZ;
170+
}
171+
142172
}

src/main/java/net/crystalgames/scaffolding/schematic/impl/SpongeSchematic.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,34 @@ private short getStateId(@NotNull String input) {
186186
} else return block.stateId();
187187
}
188188

189+
@Override
190+
public short getWidth() {
191+
return width;
192+
}
193+
194+
@Override
195+
public short getHeight() {
196+
return height;
197+
}
198+
199+
@Override
200+
public short getLength() {
201+
return length;
202+
}
203+
204+
@Override
205+
public int getOffsetX() {
206+
return offsetX;
207+
}
208+
209+
@Override
210+
public int getOffsetY() {
211+
return offsetY;
212+
}
213+
214+
@Override
215+
public int getOffsetZ() {
216+
return offsetZ;
217+
}
218+
189219
}

0 commit comments

Comments
 (0)