Closed sanik closed 3 months ago
@Mgazul I don't know English well, so my explanation might be a bit unclear. In short, we need to check for null on the container itself because it is passed during the creation of CraftInventory. When getLocation is called, it turns out to be null and causes spam.
Please provide the error log you encountered
Please provide the error log you encountered
@Mgazul https://pastes.dev/jl4TOi1EOm
@Mgazul The problem is that Container itself is null and not CraftCustomInventory, so this does not fix the error...
if (container != null)
Inventory sourceInventory = InventoryOwner.getInventory(container);
If you look at CraftCustomInventory in it
public Location getLocation() { return inventory.getLocation(); } and inventory == null
Originally posted by @sanik in https://github.com/MohistMC/Mohist/issues/3152#issuecomment-2177769546