Made everything that uses canPassThrough use data values.

This commit is contained in:
TomyLobo
2013-06-23 21:04:23 +02:00
parent b612de3429
commit 921c354db7
3 changed files with 15 additions and 12 deletions

View File

@ -620,7 +620,8 @@ public class EditSession {
for (int y = maxY; y >= minY; --y) {
Vector pt = new Vector(x, y, z);
int id = getBlockType(pt);
if (naturalOnly ? BlockType.isNaturalTerrainBlock(id) : !BlockType.canPassThrough(id)) {
int data = getBlockData(pt);
if (naturalOnly ? BlockType.isNaturalTerrainBlock(id, data) : !BlockType.canPassThrough(id, data)) {
return y;
}
}
@ -2480,6 +2481,7 @@ public class EditSession {
loop: for (int y = world.getMaxY(); y >= 1; --y) {
final Vector pt = new Vector(x, y, z);
final int id = getBlockType(pt);
final int data = getBlockData(pt);
switch (id) {
case BlockID.DIRT:
@ -2497,7 +2499,7 @@ public class EditSession {
default:
// ...and all non-passable blocks
if (!BlockType.canPassThrough(id)) {
if (!BlockType.canPassThrough(id, data)) {
break loop;
}
}
@ -2971,7 +2973,7 @@ public class EditSession {
while (!queue.isEmpty()) {
final BlockVector current = queue.removeFirst();
if (!BlockType.canPassThrough(getBlockType(current))) {
if (!BlockType.canPassThrough(getBlockType(current), getBlockData(current))) {
continue;
}