geforkt von Mirrors/FastAsyncWorldEdit
Fix height brush
Dieser Commit ist enthalten in:
Ursprung
e452fc9556
Commit
00ac111e46
@ -221,21 +221,21 @@ public interface Extent extends InputExtent, OutputExtent {
|
|||||||
for (int d = 0; d <= clearance; d++) {
|
for (int d = 0; d <= clearance; d++) {
|
||||||
int y1 = y + d;
|
int y1 = y + d;
|
||||||
block = getLazyBlock(x, y1, z);
|
block = getLazyBlock(x, y1, z);
|
||||||
if (!block.getBlockType().getMaterial().isMovementBlocker() != state && block != EditSession.nullBlock) return y1 - offset;
|
if (!block.getMaterial().isMovementBlocker() != state && block.getBlockType() != BlockTypes.__RESERVED__) return y1 - offset;
|
||||||
int y2 = y - d;
|
int y2 = y - d;
|
||||||
block = getLazyBlock(x, y2, z);
|
block = getLazyBlock(x, y2, z);
|
||||||
if (!block.getBlockType().getMaterial().isMovementBlocker() != state && block != EditSession.nullBlock) return y2 + offset;
|
if (!block.getMaterial().isMovementBlocker() != state && block.getBlockType() != BlockTypes.__RESERVED__) return y2 + offset;
|
||||||
}
|
}
|
||||||
if (clearanceAbove != clearanceBelow) {
|
if (clearanceAbove != clearanceBelow) {
|
||||||
if (clearanceAbove < clearanceBelow) {
|
if (clearanceAbove < clearanceBelow) {
|
||||||
for (int layer = y - clearance - 1; layer >= minY; layer--) {
|
for (int layer = y - clearance - 1; layer >= minY; layer--) {
|
||||||
block = getLazyBlock(x, layer, z);
|
block = getLazyBlock(x, layer, z);
|
||||||
if (!block.getBlockType().getMaterial().isMovementBlocker() != state && block != EditSession.nullBlock) return layer + offset;
|
if (!block.getMaterial().isMovementBlocker() != state && block.getBlockType() != BlockTypes.__RESERVED__) return layer + offset;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (int layer = y + clearance + 1; layer <= maxY; layer++) {
|
for (int layer = y + clearance + 1; layer <= maxY; layer++) {
|
||||||
block = getLazyBlock(x, layer, z);
|
block = getLazyBlock(x, layer, z);
|
||||||
if (!block.getBlockType().getMaterial().isMovementBlocker() != state && block != EditSession.nullBlock) return layer - offset;
|
if (!block.getMaterial().isMovementBlocker() != state && block.getBlockType() != BlockTypes.__RESERVED__) return layer - offset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,9 @@ public class BlockStateImpl extends BlockState {
|
|||||||
|
|
||||||
public BlockMaterial getMaterial() {
|
public BlockMaterial getMaterial() {
|
||||||
if (this.material == null) {
|
if (this.material == null) {
|
||||||
|
if (type == BlockTypes.__RESERVED__) {
|
||||||
|
return this.material = type.getMaterial();
|
||||||
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (this.material == null) {
|
if (this.material == null) {
|
||||||
this.material = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getMaterial(this);
|
this.material = WorldEdit.getInstance().getPlatformManager().queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getMaterial(this);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren