Do not scroll inventory menu
This commit is contained in:
parent
b14b7467c9
commit
115cd1f027
@ -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<Slot>()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user