Abstracted type detection of simulateBlockMine into BlockType.

This commit is contained in:
zml2008
2011-09-17 21:52:12 -07:00
parent a1cf6eb6da
commit 3f369f104a
3 changed files with 126 additions and 149 deletions

View File

@ -1012,7 +1012,7 @@ public class EditSession {
BaseBlock curBlockType = getBlock(pt);
if ((fromBlockTypes == null && !curBlockType.isAir())
|| (fromBlockTypes != null && curBlockType.inIterable(fromBlockTypes))) {
|| (fromBlockTypes != null && curBlockType.inIterable(fromBlockTypes))) { // Probably faster if someone adds a proper hashCode to BaseBlock
if (setBlock(pt, toBlock)) {
++affected;
}
@ -1068,7 +1068,7 @@ public class EditSession {
BaseBlock curBlockType = getBlock(pt);
if ((fromBlockTypes == null && !curBlockType.isAir())
|| (fromBlockTypes != null && curBlockType.inIterable(fromBlockTypes))) {
|| (fromBlockTypes != null && curBlockType.inIterable(fromBlockTypes))) { // Probably faster if someone adds a proper hashCode to BaseBlock
if (setBlock(pt, pattern.next(pt))) {
++affected;
}