mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +00:00
Clamp Y coordinates during selection
This commit is contained in:
@@ -37,7 +37,7 @@ public abstract class ImmutableVirtualWorld implements VirtualWorld {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockVector3 position, BlockStateHolder block, boolean notifyAndLight) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, boolean notifyAndLight) throws WorldEditException {
|
||||
return setBlock(position, block);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public abstract class ImmutableVirtualWorld implements VirtualWorld {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockVector3 pt, BlockStateHolder block) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 pt, B block) throws WorldEditException {
|
||||
return unsupported();
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ public interface VirtualWorld extends SimpleWorld, Closeable {
|
||||
int getMaxY();
|
||||
|
||||
@Override
|
||||
boolean setBlock(BlockVector3 pt, BlockStateHolder block) throws WorldEditException;
|
||||
<B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 pt, B block) throws WorldEditException;
|
||||
|
||||
Player getPlayer();
|
||||
|
||||
|
@@ -718,7 +718,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockVector3 position, BlockStateHolder block) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block) throws WorldEditException {
|
||||
return setBlock(position.getBlockX(), position.getBlockY(), position.getBlockZ(), block);
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(int x, int y, int z, BlockStateHolder block) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block) throws WorldEditException {
|
||||
return this.setBlock(x, y, z, block.getOrdinalChar());
|
||||
}
|
||||
|
||||
@@ -979,7 +979,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
|
||||
return heights.getByte(index) & 0xFF;
|
||||
}
|
||||
|
||||
public void setFloor(int x, int z, BlockStateHolder block) {
|
||||
public <B extends BlockStateHolder<B>> void setFloor(int x, int z, B block) {
|
||||
int index = z * getWidth() + x;
|
||||
floor.setInt(index, block.getOrdinalChar());
|
||||
}
|
||||
@@ -1914,7 +1914,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setBlock(BlockVector3 position, BlockStateHolder block, boolean notifyAndLight) throws WorldEditException {
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, boolean notifyAndLight) throws WorldEditException {
|
||||
return setBlock(position, block);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user