Remove unused hooks code

This commit is contained in:
DBotThePony 2023-07-08 01:07:51 +07:00
parent 84640e0ca4
commit e084221fde
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -1530,56 +1530,6 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
return iterator 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 @JvmStatic
fun inventoryDropAll(inventory: Inventory) { fun inventoryDropAll(inventory: Inventory) {
val mattery = inventory.player.matteryPlayer ?: return val mattery = inventory.player.matteryPlayer ?: return