Immersiveengineering: [1.10.2][0.10-42] Railcraft and IE Shaders Crash

Created on 6 Oct 2016  路  9Comments  路  Source: BluSunrize/ImmersiveEngineering

Crashed When a Railcraft Steam locomotive is launched from a Holding Track. Crashes due to cart shaders from IE.

using The latest Version of the mods:
IE: ImmersiveEngineering-0.10-42
However Railcraft is build directly from source:
Railcraft_1.10.2-10.0.0-alpha-25-unofficial
No optifine was used.Happened on SP. not tested with dedicated server or LAN.Assuming the same will happen.

Crashlog:
https://gist.github.com/Joshwoo70/3994b0f1b24b6d1bc10099326677d619
Notes From CJ:
screenshot 2016-10-06 12 27 00

All 9 comments

Ugh. Yes. Because using an unreleased mod is definitely a great idea >_>
I'll look into it.

So, I can't get Railcraft to load in my dev environment. Probably an issue with obfuscation or some bullplop.

Back to the issue at hand however:
As far as I am aware, I'm not doing anything wrong. IE's attachment of capability looks like this:
event.addCapability(new ResourceLocation("immersiveengineering:shader"), new CapabilityHandler_CartShaders(entityMinecart));
see here:
https://github.com/BluSunrize/ImmersiveEngineering/blob/master/src/main/java/blusunrize/immersiveengineering/common/EventHandler.java#L121-L129

I'd actually like @CovertJaguar 's direct input on this. To my knowledge, everything should work as intended, yet somehow the capability map seems to get scrambled. Any ideas?

Right. After a very short conversation in the FC channels, it seems that I didn't initialize and register my capability.
I'll attempt to confirm that to be the fix as soon as I can get Railcraft to not crash on rendering items. Still working on that one. Gimme a few hours.

@Joshwoo70 if you can build from sources, do the favour and build yourself an IE after that commit ^

You'll need Crafttweaker as an additional Lib because they don't have maven, so they're not included in the gradle.
I actually can't test atm because Lambdas apparently don't deobf properly which prevents me from using RC in dev.

Without any further input, it'll probably stay with this fix.

The fix does not appear to be working, I'll try to fix it now.

Could this line be the issue? I'm pretty sure you should be injecting the capability as @CapabilityInject(CapabilityHandler_CartShaders.class), meaning you never add a value to your capability constant thus are actually checking for an input of null as to whether to return your capability.

I know, I just fixed it :). This is an interaction of an RC bug and and IE bug:
IE does not have the correct @CapabilityInject, so the shader capability is null.
RC does not call its capability registration method (mods.railcraft.common.blocks.charge.CapabilityCartBattery.register()), so their capability is null as well (@CovertJaguar, you might want to fix that).
And this causes the IE capability to be returned when the RC one is requested and therefore causes the crash.

Ugh, fine then. Gimme a pull request, I want to get a build out today.

Hmm....register? oh dear

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jbengtson picture jbengtson  路  4Comments

cybercat5555 picture cybercat5555  路  3Comments

Boundarybreaker picture Boundarybreaker  路  4Comments

DietmarKrause picture DietmarKrause  路  5Comments

Voxel-Friend picture Voxel-Friend  路  5Comments