Implement double click quickmove fix using isSameInventory
This commit is contained in:
parent
e1be8dcfdb
commit
c6fae3348b
@ -128,6 +128,13 @@ abstract class MatteryMenu @JvmOverloads protected constructor(
|
|||||||
override fun mayPickup(player: Player): Boolean {
|
override fun mayPickup(player: Player): Boolean {
|
||||||
return super.mayPickup(player) && !isInventorySlotLocked(index)
|
return super.mayPickup(player) && !isInventorySlotLocked(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun isSameInventory(other: Slot): Boolean {
|
||||||
|
if (container === inventory || container === ply.matteryPlayer?.exoSuitContainer)
|
||||||
|
return other.container === inventory || other.container === ply.matteryPlayer?.exoSuitContainer
|
||||||
|
|
||||||
|
return super.isSameInventory(other)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open inner class EquipmentSlot(container: Container, index: Int, val type: net.minecraft.world.entity.EquipmentSlot, x: Int = 0, y: Int = 0) : InventorySlot(container, index, x, y) {
|
open inner class EquipmentSlot(container: Container, index: Int, val type: net.minecraft.world.entity.EquipmentSlot, x: Int = 0, y: Int = 0) : InventorySlot(container, index, x, y) {
|
||||||
|
Loading…
Reference in New Issue
Block a user