Advanced Peripherals

Advanced Peripherals

29M Downloads

InventoryManager deletes items from game if target inventory is not found (NullPointerException)

FatalMerlin opened this issue ยท 0 comments

commented

Describe

When using the InventoryManager to remove items from the player Inventory, the IM removes the items from the inventory without checking whether the target inventory is valid. This causes the item to be effectively deleted from the game.

(I miss my Atomic Disassembler)

Reproduce

Steps to reproduce the behavior:

  1. Place IM without chest / inventory nearby
  2. Call manager.removeItemFromPlayer("UP", 1)
  3. Witness the first item in your inventory vanishing from existence (V) ;,,,; (V)

Screenshots/Videos

image

Versions:

  • Forge version: 36.1.23
  • AdvancedPeripherals version: 0.5.4b

Crashlog/log (Use https://paste.gg or https://pastebin.com to upload your crashlog/log)
https://paste.gg/p/anonymous/77e5bc40f26a438bb9a72a1cd5454de4