Fixes #1474: Prevents crafting of disabled recipes and deletes invalid parts

This commit is contained in:
thatsIch
2015-05-24 13:36:43 +02:00
committed by thatsIch
parent 5d34b4e182
commit e5ee4e0e61
20 changed files with 279 additions and 90 deletions
+5 -2
View File
@@ -511,12 +511,15 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IMask
is = is.copy();
is.stackSize = 1;
IPart bp = bi.createPartFromItemStack( is );
final IPart bp = bi.createPartFromItemStack( is );
if( !( side == null || side == ForgeDirection.UNKNOWN || this.tile() == null ) )
{
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
bp.getBoxes( bch );
if( bp != null )
{
bp.getBoxes( bch );
}
for( AxisAlignedBB bb : boxes )
{
if( !this.tile().canAddPart( new NormallyOccludedPart( new Cuboid6( bb ) ) ) )