PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Iguanatweak Reborn and Pneumaticraft : who is the FoV master ?

LokyLive opened this issue ยท 13 comments

commented

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

commented

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.

commented

I'll check this out in the dev environment soon

commented

@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).

commented

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

commented

Bug persist with 322 version of Pneumaticraft .

commented

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...

commented

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)

commented

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.

commented
commented

Fixed in 0.9.3 release.

commented
commented

This is fixed ! Well done guys ! THANS SO MUCH !

commented

Excellent. Expect a new release in the next day or so :)