Expose a way of switching between ItemType and BlockType for ItemBlocks.

This commit is contained in:
Matthew Miller
2018-07-01 23:20:07 +10:00
parent b06937d1c8
commit 93b225ca3c
17 changed files with 110 additions and 1243 deletions

View File

@ -136,7 +136,7 @@ public class TargetBlock {
* @return Block
*/
public Location getSolidTargetBlock() {
while (getNextBlock() != null && BlockType.canPassThrough(world.getBlock(getCurrentBlock().toVector()))) ;
while (getNextBlock() != null && !world.getBlock(getCurrentBlock().toVector()).getBlockType().getMaterial().isMovementBlocker()) ;
return getCurrentBlock();
}