What are the dud BlockCategories?

This commit is contained in:
Jesse Boyd
2018-08-14 11:00:44 +10:00
parent 76a55b7712
commit 1740c845d2
13 changed files with 40 additions and 31 deletions

View File

@ -1026,7 +1026,7 @@ public class LocalSession implements TextureHolder {
public void setTool(BaseItem item, @Nullable Tool tool, Player player) throws InvalidToolBindException {
ItemTypes type = item.getType();
if (type.hasBlockType() && type.getBlockType() != BlockTypes.AIR) {
if (!type.hasBlockType() && type.getBlockType().getMaterial().isAir()) {
throw new InvalidToolBindException(type, "Blocks can't be used");
} else if (type == config.wandItem) {
throw new InvalidToolBindException(type, "Already used for the wand");