Make all valid books work with shift-clicking and hopper insertion
This commit is contained in:
@@ -2,6 +2,7 @@ package electroblob.wizardry.tileentity;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.block.BlockBookshelf;
|
||||
import electroblob.wizardry.inventory.ContainerBookshelf;
|
||||
import electroblob.wizardry.item.ItemSpellBook;
|
||||
import electroblob.wizardry.util.NBTExtras;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -136,8 +137,8 @@ public class TileEntityBookshelf extends TileEntity implements IInventory, ITick
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slotNumber, ItemStack itemstack){
|
||||
return itemstack.isEmpty() || itemstack.getItem() instanceof ItemSpellBook; // TODO: Add a whitelist
|
||||
public boolean isItemValidForSlot(int slotNumber, ItemStack stack){
|
||||
return stack.isEmpty() || ContainerBookshelf.isBook(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user