Ender IO Zoo

Ender IO Zoo

962k Downloads

[1.10.2] Baubles slot in Capacitor Bank GUI pass null to canEquip from Baubles

BrainStone opened this issue ยท 10 comments

commented

Issue Description:

When trying to put an item in the Baubles slot of a capacitor GUI the second parameter (EntityLivingBase) is null. Which will lead to a NullPointerException when you try to access it or members of it.

What happens:

A null reference gets passed and if accessed the game crashes with a NullPointerException.

What you expected to happen:

Getting passed a valid EntityLivingBase.

Steps to reproduce:

  1. Implement an item that accesses the entity while calling canEquip from Baubles
  2. Try to place the item in a Baubles slot in the Capaciot Bank GUI
  3. Crash

Affected Versions (Do not use "latest"):

  • EnderIO: 1.10.2-0.4.1.58-beta
  • EnderCore: 1.10.2-0.4.1.58-beta
  • Minecraft: 1.10.2
  • Forge: 12.18.2.2124

Your most recent log file where the issue was present:

http://pastebin.com/i1BgkEZY

commented

boolean isItemValidForSlot(int index, ItemStack stack);

There's no player for us to pass to Baubles, I don't know where Baubles does (or in this case doesn't) get the player from.

commented

Smalls a bit like Azanor/Baubles#121

commented

Maybe try Minecraft.getMinecraft().thePlayer?

commented

Sorry, neither

baubles.isItemValidForSlot(Minecraft.getMinecraft().thePlayer, stack)

nor

baubles.isItemValidForSlot(slotno, Minecraft.getMinecraft().thePlayer)

compiles.

.

.

(scnr)

commented

I see. So you're saying this is more of a Baubles issue, right?
I can report it over there.

commented

Yes, that's what I was implying. Wanted to have a look at the Baubles code myself before stating it as fact, but time flies :-(

PS: Yes, it should be reported there

commented

didn't we had this issue earlier? in 1.7.10 already? clicking a capacitory crashing while having somethign in the bauble slots?

commented
commented

Yes, @mindforger, that is the issue I linked in above.

commented

solved