Fix moveItemStackTo not calling onTake
This commit is contained in:
parent
3cacf7f11f
commit
ccf2a162a3
@ -577,11 +577,15 @@ abstract class MatteryMenu @JvmOverloads protected constructor(
|
||||
return false
|
||||
}
|
||||
|
||||
val copy = source.item.copy()
|
||||
|
||||
if (remainder.isEmpty) {
|
||||
source.set(ItemStack.EMPTY)
|
||||
source.onTake(ply, copy)
|
||||
} else {
|
||||
copy.count = source.item.count - remainder.count
|
||||
source.item.count = remainder.count
|
||||
source.setChanged()
|
||||
source.onTake(ply, copy)
|
||||
}
|
||||
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user