Blood Magic

Blood Magic

97M Downloads

Crash When a ritual's chest selection block is not a chest

Closed this issue ยท 2 comments

commented

I was stacking Domain of the Fillers on top of each other, so the default selected range had another master ritual stone in it.

crash-2025-10-19_08.04.44-server.txt

commented

A look at the logs implies that this may happen if the "chest" location is occupied by a tile entity that doesn't have an inventory. /I could be misreading, to be fair) :

Description: Ticking block entity

java.lang.NullPointerException: Cannot invoke "net.minecraftforge.items.IItemHandler.getSlots()" because "itemHandler" is null
at wayoftime.bloodmagic.ritual.types.RitualPlacer.performRitual(RitualPlacer.java:64)

commented

Yeah, there is a call to Utils.getInventory if the chest range block is a block entity and that method returns a null IItemHandler unless the BE either has the item handler capability or is a (worldly) container aka the vanilla version of item handler. I guess someone will have to go through all the rituals with chest ranges and add in a != null check (if not already present) to avoid that