McJtyMods / TheOneProbe

This simple mod adds a probe and an API for other mods to show information with that probe
MIT License
137 stars 68 forks source link

Error and console/log spam #214

Open Yorkforce opened 6 years ago

Yorkforce commented 6 years ago

We are currently seeing this issue on the Horizons 3 server modpack

https://pastebin.com/vK9gVcVu

No idea what specifically is causing it but the spam is pretty insane (every 2 seconds) Is this something we should be reporting to Sponge?

McJty commented 6 years ago

I will check it out soon

McJty commented 6 years ago

This is caused by an invalid modded block which doesn't implement capabilities correctly. You'll have to figure out when exactly this happens (i.e. when a player looks at a certain block) because I cannot tell that from the log.

Basically the problem is that:

    if (te != null && te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
        IItemHandler capability = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
        maxSlots = capability.getSlots();

Apparently hasCapability() returns true but getCapability() still returns null. That's an error