Fix NetworkToolViewer stack overflow, saveguard against markDirty recursion.

fixes #3199
This commit is contained in:
Florian Scandella
2017-11-08 13:17:34 +01:00
parent be65edbd5b
commit 56a5363528
3 changed files with 14 additions and 4 deletions
@@ -54,13 +54,12 @@ public class NetworkToolViewer implements INetworkTool, IAEAppEngInventory
@Override
public void saveChanges()
{
this.inv.markDirty( -1 );
this.inv.writeToNBT( Platform.openNbtData( this.is ), "inv" );
}
@Override
public void onChangeInventory( IItemHandler inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack )
{
this.inv.writeToNBT( Platform.openNbtData( this.is ), "inv" );
}
@Override