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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val copy = source.item.copy()
|
||||||
|
|
||||||
if (remainder.isEmpty) {
|
if (remainder.isEmpty) {
|
||||||
source.set(ItemStack.EMPTY)
|
source.set(ItemStack.EMPTY)
|
||||||
|
source.onTake(ply, copy)
|
||||||
} else {
|
} else {
|
||||||
|
copy.count = source.item.count - remainder.count
|
||||||
source.item.count = remainder.count
|
source.item.count = remainder.count
|
||||||
source.setChanged()
|
source.onTake(ply, copy)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user