check ItemStack equals, not same object, for lock

closes #2995
This commit is contained in:
payonel 2019-02-02 00:29:24 -08:00
parent 618323a701
commit 69c9240426

View File

@ -9,7 +9,7 @@ trait LockedHotbar extends GuiContainer {
def lockedStack: ItemStack
override def handleMouseClick(slot: Slot, slotId: Int, mouseButton: Int, clickType: ClickType): Unit = {
if (slot == null || slot.getStack != lockedStack) {
if (slot == null || !slot.getStack.isItemEqual(lockedStack)) {
super.handleMouseClick(slot, slotId, mouseButton, clickType)
}
}