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

@ -555,7 +555,7 @@ public class LocalSession {
* @throws InvalidToolBindException if the item can't be bound to that item
*/
public void setTool(ItemType item, @Nullable Tool tool) throws InvalidToolBindException {
if (false /*TODO item > 0 && item < 255*/) {
if (item.hasBlockType()) {
throw new InvalidToolBindException(item, "Blocks can't be used");
} else if (item == ItemTypes.getItemType(config.wandItem)) {
throw new InvalidToolBindException(item, "Already used for the wand");