fix autocrafting logic bug with container items and processing patterns

fix message reporting missing items having their values swapped
This commit is contained in:
PrototypeTrousers
2022-08-08 19:06:50 -03:00
parent 9fdf0345b3
commit a55dbb061c
5 changed files with 12 additions and 12 deletions
@@ -360,21 +360,21 @@ public class CraftingTreeNode
{
for( final IAEItemStack i : this.used )
{
final IAEItemStack ex = storage.extractItems( i, Actionable.MODULATE, src );
final IAEItemStack actuallyExtracted = storage.extractItems( i, Actionable.MODULATE, src );
if( ex == null || ex.getStackSize() != i.getStackSize() )
if( actuallyExtracted == null || actuallyExtracted.getStackSize() != i.getStackSize() )
{
if( src.player().isPresent() )
{
try
{
if( ex == null )
if( actuallyExtracted == null )
{
NetworkHandler.instance().sendTo( new PacketInformPlayer( i, null, PacketInformPlayer.InfoType.NO_ITEMS_EXTRACTED ), (EntityPlayerMP) src.player().get() );
}
else
{
NetworkHandler.instance().sendTo( new PacketInformPlayer( ex, i, PacketInformPlayer.InfoType.PARTIAL_ITEM_EXTRACTION ), (EntityPlayerMP) src.player().get() );
NetworkHandler.instance().sendTo( new PacketInformPlayer( i, actuallyExtracted, PacketInformPlayer.InfoType.PARTIAL_ITEM_EXTRACTION ), (EntityPlayerMP) src.player().get() );
}
}
catch( IOException e )
@@ -385,7 +385,7 @@ public class CraftingTreeNode
throw new CraftBranchFailure( i, i.getStackSize() );
}
craftingCPUCluster.addStorage( ex );
craftingCPUCluster.addStorage( actuallyExtracted );
}
if( this.howManyEmitted > 0 )