@Override public void setInternal(IMEInventory<T> i) { if (this.monitor != null) { this.monitor.removeListener(this); } this.monitor = null; IItemList<T> before = this.getInternal() == null ? this.channel.createList() : this.getInternal() .getAvailableItems(new ItemListIgnoreCrafting(this.channel.createList())); super.setInternal(i); if (i instanceof IMEMonitor) { this.monitor = (IMEMonitor<T>) i; } IItemList<T> after = this.getInternal() == null ? this.channel.createList() : this.getInternal() .getAvailableItems(new ItemListIgnoreCrafting(this.channel.createList())); if (this.monitor != null) { this.monitor.addListener(this, this.monitor); } Platform.postListChanges(before, after, this, this.changeSource); }