Further BaseBlock modernisation

This commit is contained in:
Matthew Miller
2018-06-18 17:53:33 +10:00
parent 811f1d4433
commit e99190225e
61 changed files with 344 additions and 787 deletions

View File

@ -103,7 +103,7 @@ public class TargetBlock {
boolean searchForLastBlock = true;
Location lastBlock = null;
while (getNextBlock() != null) {
if (world.getLazyBlock(getCurrentBlock().toVector()).getType() == BlockTypes.AIR) {
if (world.getLazyBlock(getCurrentBlock().toVector()).getBlockType() == BlockTypes.AIR) {
if (searchForLastBlock) {
lastBlock = getCurrentBlock();
if (lastBlock.getBlockY() <= 0 || lastBlock.getBlockY() >= world.getMaxY()) {
@ -125,7 +125,7 @@ public class TargetBlock {
* @return Block
*/
public Location getTargetBlock() {
while (getNextBlock() != null && world.getLazyBlock(getCurrentBlock().toVector()).getType() == BlockTypes.AIR) ;
while (getNextBlock() != null && world.getLazyBlock(getCurrentBlock().toVector()).getBlockType() == BlockTypes.AIR) ;
return getCurrentBlock();
}