Traincraft

Traincraft

1M Downloads

Minecraft crash while in any Diesel pressing letter "R" to refuel

Tsoccerguy3 opened this issue ยท 13 comments

commented

Latest compile from code dated July 8 . Tested on Windows 10 x64 and Linux Mint 19 Cinnamon
Latest Nvidia drivers
The game crashes while in any Diesel and trying to re-fuel Pressing R , Traincraft is the only mod loaded

Get logs from Traincraft directory from my OneDrive Here , http://sdrv.ms/TPcx5v

The File is , "Press R crashes game logs.zip"

commented

I just tried renaming R , which is the default key to open inventory , to the key "I" . Pressing I now crashes the game . I expect the error to be in the GuiLoco2.java

line 309 in GuiLoco2.java , out of bounds error . just a guess

commented

Yeah that black rectangle has been there, it's in the graphic for the GUI.

As for the TMI bug, it's likely a bug with TMI itself.
In the screenshot with the glitch none of our HUD or GUI elements are loaded, so it can't be our stuff messing with it.
That being said we still don't support NEI, and by associacion TMI. Support may be added in the rewrite but currently I can't offer any promises.

commented

2018-07-08_16 23 51
2018-07-08_16 23 40
No longer crashing , but while in the Diesel pressing R there is a graphics glitch where you add the fuel

also while in the Diesel pressing E the right arrow above the inventory GUI is missing

commented

I cant remember if the black rectangle above the refuel box was there before ? Maybe not a glitch , IDK

The missing right arrow above the Inventory GUI is caused by pressing E while in a Diesel and having
TooManyItems2014_07_15_1.7.10_Forge.jar in mods . somewhere TC has a conflict with the To many items mod

commented

Thanks EBF

Crash fixed

commented

I loaded up a older version of Traincraft , Traincraft-4.3.4_012 and the right arrow is OK , so somewhere between the 2 versions something got changed . There are 3 overlaid GUI's , Vanilla , TMI and TC . The Glitch only happens when the 3 menus are together . Ill try to narrow down where the commit is that causes this , unless you find it first lol
2018-07-09_06 21 08
2018-07-09_06 23 36

commented

The other Arrow is underneath the Diamond in the first picture , just need to zoom in then you see the grey box under it . So i scrolled the TMI window over until only a few items were displayed . The right arrow was not missing , just hidden under TMI's GUI . Looks like some where in TC 's GUI code , the vanilla arrows got relocated to the right . Just have to find where in the code we told Forge to move that line over . lol

2018-07-09_06 44 29

commented

Hm.... Very strange, sounds like a GL translate call gone wrong...
What's also going wrong is the TC GUI shouldn't be loaded at all on that screen.
If that's the case then this bug is not limited to TMI or NEI, it should also effect vanilla, which does give the issue a higher priority.

I'm gonna mess around with the code, see which GUI is rendering, and what translate calls are being used. It might take a few hours but I think I can fix this.

commented

Okay, I can't re-create the issue at all. Even with that same version of TMI.

What's even more strange, I double checked, TC's GUI and HUD code are not called at all on those screens.
And even if they were, there are no GL translate calls being made that would cause that sort of offset.
So I think there has to be something else going on here, and I have absolutely no idea what or where to look.

commented

The bug starts in commit aa4d728 verified
File EntityRollingStock.java

Adding these lines for potions caused the bug , pushing the arrows over .I cant see the relevance but this scews over the arrows in the item GUI
adding lines 26 and 27
adding lines 621 - 624

Adding these lines of code puts up a Resistance Potion caption next to the item GUI pushing the arrows to the right .lol found it

commented

If that's what caused it, this is FULLY on TMI, as the additional GUI element for the resistance potion is from vanilla.

All we did was add a normal potion effect to the player every tick while riding the train, as if you drank a potion with a really short duration.
In which case, being in range of a beacon or drinking a potion should give you the same exact result.

Excellent work finding this though.

If you're up for it, since for whatever reason I can't replicate the bug, try extending the duration and see if that fixes it.
Maybe we're lucky and it's just trying to out-predict the potion rather than just being stupid.

Here it is with 10 times the duration:
((EntityPlayer) riddenByEntity).addPotionEffect(new PotionEffect(Potion.resistance.id, 200, 5, true));

commented

I'm closing in on the error
I tested Traincraft-4.4.0_016 April 25 2018 , from curse-forge and the error is not there

The error is in a commit after Traincraft-4.4.0_016 April 25 2018

Verified

commented

Checked this again Traincraft does not have to be present for this to happen .
Forge is responsible for putting up the left right arrows to scroll through multiple item pages .If TMI is installed the Effect Caption pop ups will cause the shifting of the arrows to the right. When the potion effect caption goes away , the arrows return to its normal position

Closing this . It's a Forge +TMI issue