diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/ExtendedInventoryHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/ExtendedInventoryHandler.kt index 0ea13d42d..829e62eaa 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/compat/ExtendedInventoryHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/compat/ExtendedInventoryHandler.kt @@ -8,6 +8,7 @@ import net.minecraft.network.FriendlyByteBuf import net.minecraft.world.SimpleContainer import net.minecraft.world.entity.player.Player import net.minecraft.world.inventory.AbstractContainerMenu +import net.minecraft.world.inventory.InventoryMenu import net.minecraft.world.inventory.Slot import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items @@ -174,6 +175,10 @@ class InventoryScrollPacket(val scroll: Int) : MatteryPacket { fun play(player: Player) { val containerMenu = player.containerMenu ?: return + if (containerMenu is InventoryMenu) { + return + } + menuConfigurations.computeIfAbsent(containerMenu) { val originalSlots = Int2ObjectAVLTreeMap()