JEI transfer handler OutOfBounds fix
This commit is contained in:
@@ -298,19 +298,17 @@ public class PacketJEIRecipe extends AppEngPacket
|
|||||||
|
|
||||||
con.onCraftMatrixChanged( new WrapperInvItemHandler( craftMatrix ) );
|
con.onCraftMatrixChanged( new WrapperInvItemHandler( craftMatrix ) );
|
||||||
|
|
||||||
if( this.output != null && ( ( con instanceof ContainerPatternTerm && !( (ContainerPatternTerm) con ).isCraftingMode() ) || con instanceof ContainerExpandedProcessingPatternTerm ) )
|
if( this.output != null && ( ( con instanceof ContainerPatternTerm && !( (ContainerPatternTerm) con ).isCraftingMode() ) || con instanceof ContainerExpandedProcessingPatternTerm ) ) {
|
||||||
{
|
IItemHandler outputSlots = cct.getInventoryByName("output");
|
||||||
IItemHandler outputSlots = cct.getInventoryByName( "output" );
|
for (int i = 0; i < outputSlots.getSlots(); ++i) {
|
||||||
|
ItemHandlerUtil.setStackInSlot(outputSlots, i, ItemStack.EMPTY);
|
||||||
for( int i = 0; i < this.output.size(); ++i )
|
}
|
||||||
{
|
for (int i = 0; i < this.output.size() && i < outputSlots.getSlots(); ++i) {
|
||||||
if( this.output.get( i ) == null )
|
if (this.output.get(i) == null || this.output.get(i) == ItemStack.EMPTY) {
|
||||||
{
|
continue;
|
||||||
continue;
|
}
|
||||||
}
|
ItemHandlerUtil.setStackInSlot(outputSlots, i, this.output.get(i));
|
||||||
ItemHandlerUtil.setStackInSlot( outputSlots, i, this.output.get( i ) );
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user