mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 22:44:23 +00:00
Initial test of Gradle (not working yet)
This commit is contained in:
1 parent
e8b7378831
commit
cb87c836c8
519 files changed
+351
No files matched your search
@@ -0,0 +1,37 @@
|
||||
package tconstruct.inventory;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fuj1n
|
||||
*
|
||||
*/
|
||||
public class SlotOpaqueBlocksOnly extends SlotBlocksOnly
|
||||
{
|
||||
|
||||
public SlotOpaqueBlocksOnly(IInventory par1iInventory, int par2, int par3, int par4)
|
||||
{
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
|
||||
public boolean isItemValid (ItemStack par1ItemStack)
|
||||
{
|
||||
if (super.isItemValid(par1ItemStack))
|
||||
{
|
||||
Block b = Block.blocksList[par1ItemStack.itemID];
|
||||
return b.isOpaqueCube() && b.renderAsNormalBlock();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit ()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user