Check getAccessibleSlotsFromSide for null returns.
This commit is contained in:
@@ -1052,8 +1052,13 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
if ( te instanceof IInventory && ((IInventory) te).getSizeInventory() == 0 )
|
if ( te instanceof IInventory && ((IInventory) te).getSizeInventory() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( te instanceof ISidedInventory && ((ISidedInventory) te).getAccessibleSlotsFromSide( s.getOpposite().ordinal() ).length == 0 )
|
if ( te instanceof ISidedInventory )
|
||||||
continue;
|
{
|
||||||
|
int[] sides = ((ISidedInventory) te).getAccessibleSlotsFromSide( s.getOpposite().ordinal() );
|
||||||
|
|
||||||
|
if ( sides == null || sides.length == 0 )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( mop.blockX == te.xCoord && mop.blockY == te.yCoord && mop.blockZ == te.zCoord )
|
if ( mop.blockX == te.xCoord && mop.blockY == te.yCoord && mop.blockZ == te.zCoord )
|
||||||
{
|
{
|
||||||
|
|||||||
+7
-1
@@ -1470,7 +1470,13 @@ public class Platform
|
|||||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||||
{
|
{
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
for (Integer Side : ((ISidedInventory) target).getAccessibleSlotsFromSide( dir.ordinal() ))
|
|
||||||
|
int[] sides = ((ISidedInventory) target).getAccessibleSlotsFromSide( dir.ordinal() );
|
||||||
|
|
||||||
|
if ( sides == null )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (Integer Side : sides)
|
||||||
{
|
{
|
||||||
int c = (Side << (offset++ % 8)) ^ (1 << dir.ordinal());
|
int c = (Side << (offset++ % 8)) ^ (1 << dir.ordinal());
|
||||||
hash = c + (hash << 6) + (hash << 16) - hash;
|
hash = c + (hash << 6) + (hash << 16) - hash;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class AdaptorISpecialInventory extends InventoryAdaptor
|
|||||||
{
|
{
|
||||||
ISidedInventory sided = (ISidedInventory) i;
|
ISidedInventory sided = (ISidedInventory) i;
|
||||||
int slots[] = sided.getAccessibleSlotsFromSide( d.ordinal() );
|
int slots[] = sided.getAccessibleSlotsFromSide( d.ordinal() );
|
||||||
|
|
||||||
if ( slots == null )
|
if ( slots == null )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class WrapperInventoryRange implements IInventory
|
|||||||
public WrapperInventoryRange(IInventory a, int[] s, boolean ignoreValid) {
|
public WrapperInventoryRange(IInventory a, int[] s, boolean ignoreValid) {
|
||||||
src = a;
|
src = a;
|
||||||
slots = s;
|
slots = s;
|
||||||
|
|
||||||
if ( slots == null )
|
if ( slots == null )
|
||||||
slots = new int[0];
|
slots = new int[0];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user