Iguanatweak Reborn and Pneumaticraft : who is the FoV master ?
LokyLive opened this issue ยท 13 comments
For feature requests, just erase this template and clearly describe the feature you'd like to see
Minecraft Version
1.12.2
Forge Version
2814
Mod Version
Pneumaticraft 0.9.2-321
Iguana Tweak Reborn 1.4.8
Describe your problem, including steps to reproduce it
Introduction:
ITR add an encumbrance FoV change depending to the content of the player inventory.
When "movement restriction"(ITR) is active, you have to "disable FoV on Speed Modified" to fix for exemple the FoV movement restriction update when you're in a GUI.
Problem :
With Pneumaticraft installed, "disable FoV on Speed Modified" active or unactive won't change anything, i've tryed to change "leggingsFOVfactor" value too.
Any other comments?
It seems that ITR can't change FoV when Pneumaticraft is on the same modpack
The PNC FOV handling is here: https://github.com/TeamPneumatic/pnc-repressurized/blob/master/src/main/java/me/desht/pneumaticcraft/client/ClientEventHandler.java#L493-L507
It goes through each worn/held item on the player (4 armor slots, main hand and off hand), and calculates an FOV modifer value from each item. Right now only the Pneumatic Leggings and Minigun (with tracker upgrade installed for zooming) can modify the FOV; if no such items are worn, the FOV is left unchanged (event.setNewfov(event.getFov() + modifier);
, where modifier = 0.0
)
So I don't see how this can be clashing with ITR; in most cases PNC doesn't touch the FOV, and when it does, it's only as a modifier to the existing FOV from the event.
@LokyLive might also be worth trying build https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized/322/ - I made some changes to PNC's FOV calculations which might help (using a multiplier rather than adding/subtracting the FOV).
That's pretty strange. The calculations are correct on both sides but when Pneumaticraft is installed IT Fov modifier is ignored while Pneumaticraft one (seems) to be respected
OK, not sure what to say then. As @Insane-96 said, both PNC and ITR are doing the right calculations, but seem to be conflicting. I'll keep this open but don't have a resolution for it at this point...
Is it possible to just add a turn Off option to disable Fov calculation from Pneumaticraft ? (maybe with 0.0 factor value the mod still calcul to applied value 0.0 fov change)
It's actually a 1.0 return now, since it's a multiplier on the existing FOV, not an addition. However, unless you're wearing Pneumatic Leggings with speed upgrades and the leggingsFOVfactor
config option is non-zero, or actively firing a Minigun with tracker upgrades, the return is always 1.0, i.e. no FOV modification. It just multiplies the incoming FOV by 1.0 and set the new FOV to that, i.e. no change on the modification.
Update Hmm, wait. I think I know what the problem is, and if I'm right then ITR has the same problem (as do multiple other mods, most likely). The FOV event has two methods: getFov()
and getNewfov()
. The first method gets the original player FOV, modified only by vanilla code. The second method gets the FOV already modified by any other mods whose FOV event handler ran before ours. I've been using getFov()
as the base for multiplying, which basically cancels out changes made by any other mods. I'd bet that ITR's event handler is running before PNC's in this case.
Anyway, I'll be pushing another change shortly which hopefully fixes this problem, will let you know when the build is available.
OK, can you try https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized/323/ and let me know?
Fixed it on my end Insane96/IguanaTweaksReborn@faef81c