
[1.10.2] Baubles slot in Capacitor Bank GUI pass null to canEquip from Baubles
BrainStone opened this issue ยท 10 comments
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:
- Implement an item that accesses the entity while calling canEquip from Baubles
- Try to place the item in a Baubles slot in the Capaciot Bank GUI
- 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:
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.
Smalls a bit like Azanor/Baubles#121
Sorry, neither
baubles.isItemValidForSlot(Minecraft.getMinecraft().thePlayer, stack)
nor
baubles.isItemValidForSlot(slotno, Minecraft.getMinecraft().thePlayer)
compiles.
.
.
(scnr)
I see. So you're saying this is more of a Baubles issue, right?
I can report it over there.
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
didn't we had this issue earlier? in 1.7.10 already? clicking a capacitory crashing while having somethign in the bauble slots?
Reported. Azanor/Baubles#171
Yes, @mindforger, that is the issue I linked in above.