Hopefully fixed that pesky crash
This commit is contained in:
parent
f0b6799409
commit
64c37f4d94
1 changed files with 11 additions and 1 deletions
|
@ -189,6 +189,11 @@ public final class TransporterUtils
|
||||||
else {
|
else {
|
||||||
ISidedInventory sidedInventory = (ISidedInventory) inventory;
|
ISidedInventory sidedInventory = (ISidedInventory) inventory;
|
||||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||||
|
|
||||||
|
if(slots == null || slots.length == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for(int get = 0; get <= slots.length - 1; get++)
|
for(int get = 0; get <= slots.length - 1; get++)
|
||||||
{
|
{
|
||||||
|
@ -268,6 +273,11 @@ public final class TransporterUtils
|
||||||
else {
|
else {
|
||||||
ISidedInventory sidedInventory = (ISidedInventory) inventory;
|
ISidedInventory sidedInventory = (ISidedInventory) inventory;
|
||||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||||
|
|
||||||
|
if(slots == null || slots.length == 0)
|
||||||
|
{
|
||||||
|
return itemStack;
|
||||||
|
}
|
||||||
|
|
||||||
for(int get = 0; get <= slots.length - 1; get++)
|
for(int get = 0; get <= slots.length - 1; get++)
|
||||||
{
|
{
|
||||||
|
@ -331,7 +341,7 @@ public final class TransporterUtils
|
||||||
ISidedInventory sidedInventory = (ISidedInventory)inventory;
|
ISidedInventory sidedInventory = (ISidedInventory)inventory;
|
||||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||||
|
|
||||||
if(slots != null)
|
if(slots != null && slots.length != 0)
|
||||||
{
|
{
|
||||||
for(int get = slots.length - 1; get >= 0; get--)
|
for(int get = slots.length - 1; get >= 0; get--)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue