package com.lothrazar.cyclicmagic.gui;
import net.minecraft.block.Block;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;

public class SlotOnlyItems extends Slot {
  public SlotOnlyItems(IInventory inventoryIn, int index, int xPosition, int yPosition) {
    super(inventoryIn, index, xPosition, yPosition);
  }
  @Override
  public boolean isItemValid(ItemStack itemstack) {
    return Block.getBlockFromItem(itemstack.getItem()) == null; // no items only blocks
  }
  @Override
  public void onSlotChanged() {
//    if (this.getHasStack() && this.getStack().getCount() == 0) {
//      this.putStack(ItemStack.EMPTY);
//    }
//    super.onSlotChanged();
  }
}

@@ -66,16 +66,50 @@
 .Block;%0A
+import net.minecraft.init.Blocks;%0A
 import n
@@ -533,16 +533,85 @@
  == null
+%0A        %7C%7C Block.getBlockFromItem(itemstack.getItem()) == Blocks.AIR
 ; // no 
@@ -672,24 +672,28 @@
 Changed() %7B%0A
+    
 //    if (th
@@ -747,16 +747,20 @@
 == 0) %7B%0A
+    
 //      
@@ -795,16 +795,20 @@
 Y);%0A
+    
 //    %7D%0A
 //  
@@ -803,16 +803,20 @@
 //    %7D%0A
+    
 //    su

fix slot only items