Remove unused hooks code
This commit is contained in:
parent
84640e0ca4
commit
e084221fde
@ -1530,56 +1530,6 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
|
||||
return iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* this method is hooked through coremod transformer
|
||||
*/
|
||||
@JvmStatic
|
||||
fun inventoryAddItemHook(inventory: Inventory, item: ItemStack) {
|
||||
if (item.isEmpty) {
|
||||
return
|
||||
}
|
||||
|
||||
val it = inventory.player.matteryPlayer ?: return
|
||||
|
||||
if (!it.hasExoPack) {
|
||||
return
|
||||
}
|
||||
|
||||
val leftover = it.exoPackContainer.addItem(item, false, popTime = 5)
|
||||
item.count = leftover.count
|
||||
}
|
||||
|
||||
/**
|
||||
* this method is hooked through coremod transformer
|
||||
*/
|
||||
@JvmStatic
|
||||
fun inventoryAddItemHookPre(inventory: Inventory, item: ItemStack) {
|
||||
if (item.isEmpty || !item.isStackable) {
|
||||
return
|
||||
}
|
||||
|
||||
val it = inventory.player.matteryPlayer ?: return
|
||||
|
||||
if (!it.hasExoPack) {
|
||||
return
|
||||
}
|
||||
|
||||
val leftover = it.exoPackContainer.addItem(item, simulate = false, onlyIntoExisting = true, popTime = 5)
|
||||
item.count = leftover.count
|
||||
}
|
||||
|
||||
/**
|
||||
* this method is hooked through coremod transformer
|
||||
*/
|
||||
@JvmStatic
|
||||
fun inventoryAddDamagedItemHook(determinedSlot: Int, inventory: Inventory, item: ItemStack) {
|
||||
if (determinedSlot > 0) {
|
||||
return
|
||||
}
|
||||
|
||||
inventoryAddItemHook(inventory, item)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun inventoryDropAll(inventory: Inventory) {
|
||||
val mattery = inventory.player.matteryPlayer ?: return
|
||||
|
Loading…
Reference in New Issue
Block a user