So I'm trying to get the comparator input override of a block (if it has one) with something like:
@OnlyIn(Dist.CLIENT)
@SubscribeEvent
public void onRenderGameOverlay(RenderGameOverlayEvent.Post event)
{
//...
if (blockstate.hasComparatorInputOverride())
{
int p = blockstate.getComparatorInputOverride(minecraft.world, tBlockPos);
}
//...
}
For blocks like bee nest and cauldron it worked, but for blocks with inventory it always returns 0 because when it tries to get the block inventory gets an air full inventory(not null) even when the chest is full.