From 3582582e3f5007adae3d3cbde4e6ea30984c67b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Salom=C3=A3o?= Date: Sat, 26 Jun 2021 10:25:47 -0300 Subject: [PATCH] fix off-by-one voiding patterns when removing expansion cards --- src/main/java/appeng/helpers/DualityInterface.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/helpers/DualityInterface.java b/src/main/java/appeng/helpers/DualityInterface.java index 7b4ad4b6d..15c1e67bc 100644 --- a/src/main/java/appeng/helpers/DualityInterface.java +++ b/src/main/java/appeng/helpers/DualityInterface.java @@ -608,14 +608,14 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn List dropList = new ArrayList<>(); for( int invSlot = 0; invSlot < patterns.getSlots(); invSlot++ ) { - if( invSlot >= 9 + ( this.getInstalledUpgrades( Upgrades.PATTERN_EXPANSION ) ) * 9 ) + if( invSlot > 8 + this.getInstalledUpgrades( Upgrades.PATTERN_EXPANSION ) * 9 ) { ItemStack is = patterns.getStackInSlot( invSlot ); if( is.isEmpty() ) continue; dropList.add( patterns.extractItem( invSlot, Integer.MAX_VALUE, false ) ); } } - if( dropList.size() > 1 ) + if( dropList.size() > 0 ) { World world = this.getLocation().getWorld(); BlockPos blockPos = this.getLocation().getPos();