Buggy code:
else if ( ( ( WDL . lastEntity ) instanceof EntityMinecartHopper ) && ( ( WDL . windowContainer ) instanceof ContainerHopper ) ) { EntityMinecartHopper emch = ( ( EntityMinecartHopper ) ( WDL . lastEntity ) ) ; for ( int i = 0 ; i < ( emch . getSizeInventory ( ) ) ; i ++ ) { emch . setInventorySlotContents ( i , windowContainer . getSlot ( i ) . getStack ( ) ) ; saveName = "Hopper<seq2seq4repair_space>Minecart<seq2seq4repair_space>contents" ; } } else if ( ( ( WDL . lastEntity ) instanceof EntityVillager ) && ( ( WDL . windowContainer ) instanceof ContainerMerchant ) ) { EntityVillager ev = ( ( EntityVillager ) ( WDL . lastEntity ) ) ; MerchantRecipeList list = ( ( IMerchant ) ( WDL . stealAndGetField ( windowContainer , IMerchant . class ) ) ) . getRecipes ( thePlayer ) ; WDL . stealAndSetField ( ev , MerchantRecipeList . class , list ) ; saveName = "Villager<seq2seq4repair_space>offers" ; } else if ( ( ( WDL . lastEntity ) instanceof EntityHorse ) && ( ( WDL . windowContainer ) instanceof ContainerHorseInventory ) ) { EntityHorse entityHorse = ( ( EntityHorse ) ( WDL . lastEntity ) ) ; AnimalChest horseChest = new AnimalChest ( "HorseChest" , ( ( entityHorse . isChested ( ) ) && ( ( ( entityHorse . getHorseType ( ) ) == 1 ) || ( ( entityHorse . getHorseType ( ) ) == 2 ) ) ? 17 : 2 ) ) ; horseChest . func_110133_a ( entityHorse . getName ( ) ) ; WDL . saveContainerItems ( windowContainer , horseChest , 0 ) ; horseChest . func_110134_a ( entityHorse ) ; WDL . stealAndSetField ( entityHorse , AnimalChest . class , horseChest ) ; saveName = "Horse<seq2seq4repair_space>Chest" ; } else { WDL . chatMsg ( ( "Unsupported<seq2seq4repair_space>entity<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>saved:" + ( EntityUtils . getEntityType ( lastEntity ) ) ) ) ; } WDL . chatDebug ( ON_GUI_CLOSED_INFO , ( ( "Saved<seq2seq4repair_space>" + saveName ) + "." ) ) ; return ; } if ( ! ( WDLPluginChannels . canSaveContainers ( ) ) ) { WDL . chatDebug ( ON_GUI_CLOSED_INFO , "Server<seq2seq4repair_space>configuration<seq2seq4repair_space>forbids<seq2seq4repair_space>saving<seq2seq4repair_space>of<seq2seq4repair_space>TileEntities!" ) ; return ; } TileEntity te = worldClient . getTileEntity ( lastClickedBlock ) ; if ( te == null ) { WDL . chatDebug ( ON_GUI_CLOSED_WARNING , ( "onItemGuiClosed<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>get<seq2seq4repair_space>TE<seq2seq4repair_space>at<seq2seq4repair_space>" + ( WDL . lastClickedBlock ) ) ) ; return ; } if ( ( ( WDL . windowContainer ) instanceof ContainerChest ) && ( te instanceof TileEntityChest ) ) { if ( ( inventorySlots . size ( ) ) > 63 ) { TileEntity te2 ; BlockPos chestPos1 = WDL . lastClickedBlock ; BlockPos chestPos2 ; TileEntityChest tec1 ; TileEntityChest tec2 ; if ( ( ( te2 = worldClient . getTileEntity ( chestPos1 . add ( 0 , 0 , 1 ) ) ) instanceof TileEntityChest ) && ( ( ( ( TileEntityChest ) ( te2 ) ) . getChestType ( ) ) == ( ( ( TileEntityChest ) ( te ) ) . getChestType ( ) ) ) ) { tec1 = ( ( TileEntityChest ) ( te ) ) ; tec2 = ( ( TileEntityChest ) ( te2 ) ) ; chestPos2 = chestPos1 . add ( 0 , 0 , 1 ) ; } else if ( ( ( te2 = worldClient . getTileEntity ( chestPos1 . add ( 0 , 0 , ( - 1 ) ) ) ) instanceof TileEntityChest ) && ( ( ( ( TileEntityChest ) ( te2 ) ) . getChestType ( ) ) == ( ( ( TileEntityChest ) ( te ) ) . getChestType ( ) ) ) ) { tec1 = ( ( TileEntityChest ) ( te2 ) ) ; tec2 = ( ( TileEntityChest ) ( te ) ) ; chestPos2 = chestPos1 . add ( 0 , 0 , ( - 1 ) ) ; } else if ( ( ( te2 = worldClient . getTileEntity ( chestPos1 . add ( 1 , 0 , 0 ) ) ) instanceof TileEntityChest ) && ( ( ( ( TileEntityChest ) ( te2 ) ) . getChestType ( ) ) == ( ( ( TileEntityChest ) ( te ) ) . getChestType ( ) ) ) ) { tec1 = ( ( TileEntityChest ) ( te ) ) ; tec2 = ( ( TileEntityChest ) ( te2 ) ) ; <START_BUG> chestPos2 = chestPos1 . add ( ( - 1 ) , 0 , 0 ) ; <END_BUG> } else if ( ( ( te2 = worldClient . getTileEntity ( chestPos1 . add ( ( - 1 ) , 0 , 0 ) ) ) instanceof TileEntityChest ) && ( ( ( ( TileEntityChest ) ( te2 ) ) . getChestType ( ) ) == ( ( ( TileEntityChest ) ( te ) ) . getChestType ( ) ) ) ) { tec1 = ( ( TileEntityChest ) ( te2 ) ) ; tec2 = ( ( TileEntityChest ) ( te ) ) ; chestPos2 = chestPos1 . add ( ( - 1 ) , 0 , 0 ) ; } else { WDL . chatMsg ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>save<seq2seq4repair_space>this<seq2seq4repair_space>chest!" ) ; return ; } WDL . saveContainerItems ( windowContainer , tec1 , 0 ) ; WDL . saveContainerItems ( windowContainer , tec2 , 27 ) ; newTileEntities . put ( chestPos1 , tec1 ) ; newTileEntities . put ( chestPos2 , tec2 ) ; saveName = "Double<seq2seq4repair_space>Chest<seq2seq4repair_space>contents" ; } else { WDL . saveContainerItems ( windowContainer , ( ( TileEntityChest ) ( te ) ) , 0 ) ; newTileEntities . put ( lastClickedBlock , te ) ; saveName = "Chest<seq2seq4repair_space>contents" ; } } else if ( ( ( WDL . windowContainer ) instanceof ContainerChest ) && ( te instanceof TileEntityEnderChest ) ) { InventoryEnderChest inventoryEnderChest = thePlayer . getInventoryEnderChest ( ) ; int inventorySize = inventoryEnderChest . getSizeInventory ( ) ; int containerSize = inventorySlots . size ( ) ; for ( int i = 0 ;

Fix:
chestPos2 = chestPos1 . add ( 1 , 0 , 0 ) ;