Fix quickmove behaving weirdly
This commit is contained in:
parent
d7d731bea9
commit
59f275c91e
@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.io.FastByteArrayInputStream
|
||||
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream
|
||||
import it.unimi.dsi.fastutil.objects.Reference2ObjectFunction
|
||||
import it.unimi.dsi.fastutil.objects.Reference2ObjectOpenHashMap
|
||||
import it.unimi.dsi.fastutil.objects.ReferenceArrayList
|
||||
import net.minecraft.network.FriendlyByteBuf
|
||||
import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
@ -380,7 +381,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor(
|
||||
}
|
||||
|
||||
private val externalSlots = ArrayList<Slot>()
|
||||
private val quickMoveMapping = Reference2ObjectOpenHashMap<Slot, ArrayList<Collection<Slot>>>()
|
||||
private val quickMoveMapping = Reference2ObjectOpenHashMap<Slot, ReferenceArrayList<Collection<Slot>>>()
|
||||
|
||||
override fun addSlot(pSlot: Slot): Slot {
|
||||
if (pSlot in slots) {
|
||||
@ -427,7 +428,7 @@ abstract class MatteryMenu @JvmOverloads protected constructor(
|
||||
}
|
||||
|
||||
protected fun mapQuickMove(slot: Slot, target: Collection<Slot>, prepend: Boolean = false) {
|
||||
val listing = quickMoveMapping.computeIfAbsent(slot, Reference2ObjectFunction { ArrayList(1) })
|
||||
val listing = quickMoveMapping.computeIfAbsent(slot, Reference2ObjectFunction { ReferenceArrayList(1) })
|
||||
listing.remove(target)
|
||||
|
||||
if (prepend)
|
||||
|
Loading…
Reference in New Issue
Block a user