Also don't scroll mattery menus

This commit is contained in:
DBotThePony 2022-10-24 08:43:08 +07:00
parent 3f3d08ac32
commit 8a5727233a
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -15,6 +15,7 @@ import net.minecraft.world.item.Items
import net.minecraftforge.network.NetworkEvent
import org.apache.logging.log4j.LogManager
import ru.dbotthepony.mc.otm.capability.matteryPlayer
import ru.dbotthepony.mc.otm.menu.MatteryMenu
import ru.dbotthepony.mc.otm.menu.MatterySlot
import ru.dbotthepony.mc.otm.network.MatteryPacket
import ru.dbotthepony.mc.otm.network.packetHandled
@ -175,7 +176,7 @@ class InventoryScrollPacket(val scroll: Int) : MatteryPacket {
fun play(player: Player) {
val containerMenu = player.containerMenu ?: return
if (containerMenu is InventoryMenu) {
if (containerMenu is InventoryMenu || containerMenu is MatteryMenu) {
return
}