Improved the readability of BaseBlock.equals.

This commit is contained in:
TomyLobo 2013-12-02 09:46:45 +01:00
parent 9a000de7cf
commit da37f5424c

View File

@ -140,7 +140,12 @@ public class BaseBlock extends Block {
return false; return false;
} }
return getType() == ((BaseBlock) o).getType() && getData() == ((BaseBlock) o).getData(); final BaseBlock otherBlock = (BaseBlock) o;
if (getType() != otherBlock.getType()) {
return false;
}
return getData() == otherBlock.getData();
} }
/** /**