Skip to content

Commit

Permalink
implimented isStackValidForSlot to return true if valid to allow for …
Browse files Browse the repository at this point in the history
…automation inserst (mainly Applied Energistics)

Signed-off-by: Andrew Meehan <andrew@meehan.me.uk>
  • Loading branch information
Pharabus committed May 8, 2013
1 parent 655a31e commit d559946
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions common/buildcraft/factory/TileHopper.java
Expand Up @@ -106,4 +106,22 @@ public void openChest() {
@Override
public void closeChest() {
}

@Override
public boolean isStackValidForSlot(int i, ItemStack itemstack)
{

TileEntity tile = this.worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord);
if(tile == null)
{
return false;
}
if(tile instanceof IInventory)
{
return ((IInventory)tile).isStackValidForSlot(i, itemstack);
}

return false;

}
}
2 changes: 1 addition & 1 deletion common/buildcraft/silicon/TileAssemblyTable.java
Expand Up @@ -504,6 +504,6 @@ public boolean isInvNameLocalized()
public boolean isStackValidForSlot(int i, ItemStack itemstack)
{
// TODO Auto-generated method stub
return false;
return true;
}
}

0 comments on commit d559946

Please sign in to comment.