Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.12.2] Wand lacks inventory index safety #104

Closed
Vectrobe opened this issue Apr 17, 2019 · 6 comments
Closed

[1.12.2] Wand lacks inventory index safety #104

Vectrobe opened this issue Apr 17, 2019 · 6 comments

Comments

@Vectrobe
Copy link

Vectrobe commented Apr 17, 2019

Seems to attempt to load an index out of range in some cases, causing it to crash on accessing some inventories;

java.lang.ArrayIndexOutOfBoundsException: 45
	at cofh.core.gui.container.InventoryContainerItemWrapper.func_70301_a(InventoryContainerItemWrapper.java:142)
	at net.minecraftforge.items.wrapper.InvWrapper.getStackInSlot(InvWrapper.java:68)
	at portablejim.bbw.containers.handlers.HandlerCapability.countItems(HandlerCapability.java:28)
	at portablejim.bbw.containers.ContainerManager.countItems(ContainerManager.java:55)
	at portablejim.bbw.shims.BasicPlayerShim.countItems(BasicPlayerShim.java:69)
	at portablejim.bbw.core.WandWorker.getProperItemStack(WandWorker.java:81)
	at portablejim.bbw.core.BlockEvents.blockHighlightEvent(BlockEvents.java:53)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1836_BlockEvents_blockHighlightEvent_DrawBlockHighlightEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
	at net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(ForgeHooksClient.java:191)
	at net.minecraft.client.renderer.EntityRenderer.func_175068_a(EntityRenderer.java:1361)
	at net.minecraft.client.renderer.EntityRenderer.func_78471_a(EntityRenderer.java:1259)
	at net.minecraft.client.renderer.EntityRenderer.func_181560_a(EntityRenderer.java:1062)
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1119)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)```
@Vectrobe
Copy link
Author

tell a lie actually, this may be on cofh's side after all...

@msgerbs
Copy link

msgerbs commented May 19, 2019

Have you posted this to COFH yet? Not sure which mod is the true cause but it's really annoying.

@Vectrobe
Copy link
Author

Vectrobe commented Jun 4, 2019

hum, not sure if I got back to this one. I did look at the code on both sides, but couldn't find anything inherently wrong, so I can only assume that something is going horribly wrong with the satchel's internal container...

Could simply be that the satchel isn't re-sized correctly when enchanted, however COFH in their wisdom have locked all the repos so I cant actually check back on them...

@KingLemming
Copy link

KingLemming commented Jun 4, 2019

The true cause of this is whatever mod forcibly adds capabilities to Satchels, because Satchels do not have capabilities. This is a very intentional design decision meant to prevent nonsense like this from happening in the first place.

So, unless this mod forces capabilities onto Satchels (I do not believe it does), it's a third party mod altogether.

Also, @Paul17041993 - the repos are not locked. The feedback repo has been closed down for now because frankly, bugs for 1.12 have been resolved. 99% of everything I get now is tech support issues. However, you can still go look at code to your heart's content.

@Vectrobe
Copy link
Author

Vectrobe commented Jun 4, 2019

You locked the issues for all mods, which is exactly what I wanted to check through

@Vectrobe
Copy link
Author

Vectrobe commented Jun 5, 2019

Alright, can confirm this issue is fixed in CommonCapabilities;
CyclopsMC/CommonCapabilities#20

@Vectrobe Vectrobe closed this as completed Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants