Skip to content

Commit facd31c

Browse files
authored
fix: do not forcefully direct to x,y,z methods in AbstractDelegateExtent (#2614)
- we probably shouldn't be doing this
1 parent 1053d46 commit facd31c

1 file changed

Lines changed: 5 additions & 17 deletions

File tree

worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractDelegateExtent.java

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ public Extent getExtent() {
9191

9292
@Override
9393
public BlockState getBlock(BlockVector3 position) {
94-
//FAWE start - return coordinates
95-
return extent.getBlock(position.getX(), position.getY(), position.getZ());
96-
//FAWE end
94+
return extent.getBlock(position);
9795
}
9896

9997
@Override
@@ -103,9 +101,7 @@ public BlockState getBlock(int x, int y, int z) {
103101

104102
@Override
105103
public BaseBlock getFullBlock(BlockVector3 position) {
106-
//FAWE start - return coordinates
107-
return extent.getFullBlock(position.getX(), position.getY(), position.getZ());
108-
//FAWE end
104+
return extent.getFullBlock(position);
109105
}
110106

111107
//FAWE start
@@ -117,9 +113,7 @@ public BaseBlock getFullBlock(BlockVector3 position) {
117113

118114
@Override
119115
public BaseBlock getFullBlock(int x, int y, int z) {
120-
//FAWE start - return coordinates
121116
return extent.getFullBlock(x, y, z);
122-
//FAWE end
123117
}
124118

125119
@Override
@@ -375,9 +369,7 @@ protected Operation commitBefore() {
375369

376370
@Override
377371
public BiomeType getBiome(BlockVector3 position) {
378-
//FAWE start - switch top x,y,z
379-
return extent.getBiomeType(position.getX(), position.getY(), position.getZ());
380-
//FAWE end
372+
return extent.getBiome(position);
381373
}
382374

383375
//FAWE start
@@ -420,9 +412,7 @@ public void setChangeSet(AbstractChangeSet changeSet) {
420412
@Override
421413
public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block)
422414
throws WorldEditException {
423-
//FAWE start - switch to x,y,z
424-
return extent.setBlock(position.getX(), position.getY(), position.getZ(), block);
425-
//FAWE end
415+
return extent.setBlock(position, block);
426416
}
427417

428418
//FAWE start
@@ -447,9 +437,7 @@ public boolean fullySupports3DBiomes() {
447437

448438
@Override
449439
public boolean setBiome(BlockVector3 position, BiomeType biome) {
450-
//FAWE start - switch to x,y,z
451-
return extent.setBiome(position.getX(), position.getY(), position.getZ(), biome);
452-
//FAWE end
440+
return extent.setBiome(position, biome);
453441
}
454442

455443
//FAWE start

0 commit comments

Comments
 (0)