Roadhog360 / Et-Futurum-Requiem

[Releases] Brings the future to now!
GNU Lesser General Public License v3.0
52 stars 40 forks source link

Can't step up blocks if rubbing against one on the side #210

Open DarianLStephens opened 1 year ago

DarianLStephens commented 1 year ago

Please check any boxes that apply to you and your issue

Version number of Et-Futurum-Requiem (IMPORTANT)

2.4.1

Describe the issue (IMPORTANT)

Place stairs or a slab, or have something that allows you to step up whole blocks, and place a wall directly next to the stairs, then rub against the wall, turned slightly towards it (So you keep walking in to it a bit), and attempt to walk up the stairs. If you're on a full block level, you can't, but if you're on the mid part of the stairs, you can.

A simple setup like this is impossible to walk up unless you pull yourself off the wall and don't bump in to it while climbing: 2023-01-01_19 09 02

I'm attempting to walk up it here, but I cannot. 2023-01-01_19 09 14

If I disable the 'stepHeightFix' option under mixin settings, I can walk up steps like this normally.

Mod list (OPTIONAL)

_Et Futurum Requiem 2.4.1

Additional Context (OPTIONAL)

I disabled every mod I had and tested Et Futurum alone.

makamys commented 1 year ago

Interesting, I've come across this too, but thought it was a vanilla bug.

GregoriusT commented 1 year ago

Everything is a vanilla Bug if you rely on vanilla Code to work XD

calreveraster commented 1 year ago

I'll add to this with the following:

This issue comes up most frequently when you butt a stair up against a grass path. When you do that, you cant step onto the stairs since the grass path drops the player down slightly. I assume this is why the mixin was added in the first place; to ensure that you could step onto stairs from grass paths

The problem is that the old solution, "fullGrassPath" which made it so that you didnt sink down on grass paths, no longer seems to work. The grass path always sinks the player down slightly.

So now, the player is kind of forced to pick between one problem and another.

GregoriusT commented 1 year ago

So I went up a Lich Tower from Twilight Forest (wood slab and stone slab staircase) and whenever I walk against the corner wall and then try to sidestep up a slab I need to rotate all the way to face the slab more than the wall before I can walk up said slab. Just wanted to mention this because uninstalling EFR and loading that world in a backup has fixed the Issue for me, meaning it was indeed likely the step height fix causing it. Luckily there is a Config for that, which I'm gonna use now, lol.

DarianLStephens commented 1 year ago

I do hope the issue can be fixed, because it's not a very nice feeling to get stuck like that, but the improvements offered also come in handy often.

Roadhog360 commented 1 year ago

I attempted to take a swing at fixing this and failed. Every single attempt only resulted in far worse issues. This issue may effectively be unfixable, the only way to fix it being to disable it but re-introduce the old bug. Embeddedt on Discord:

Yes, the current injection point was very finicky to select. The entire stepping function is a giant black box with many obfuscated variables, I do not really know how to change it further without breaking more stuff. Also simply copying the modern function also doesn't work if I remember correctly, it breaks many other movements.

calreveraster commented 1 year ago

Honestly, I don't see an issue with making the grass path block full height and allowing the player to hover slightly over the path when theyre walking. It's only a couple of pixels and in my opinion is fine. This seems like one of those issues where the effort to fix it doesnt line up with the severity of the problem.

Roadhog360 commented 1 year ago

It's not accurate and the issue is not exclusive to just grass paths. It will barely fix anything. It's a 10% workaround. I don't like workarounds, I much prefer solutions. This issue also doesn't even affect grass paths, them being lower caused you to not be able to step onto stairs, which is already solved by raising the step height by .1, so I'm not sure why you think that'll actually change anything. This is a different issue that in no way affects grass paths.

For clarity: The step height fix is what you are thinking of. That was to allow stepping up from a grass path to a stair, and that works. This is not the same issue. And I could not reproduce this any more with grass paths as much as full blocks in the same exact configurations.

calreveraster commented 1 year ago

Looking back on my first comment I see that I wasn't clear. If you disable the stepHeightFix mixin, the issue of getting stuck on a wall goes away - which is a mixin made to deal with the grass path height problem. The problem with disabling the stepHeightFix mixin - as you know - is that you can no longer step up onto a stair from a grass path if you do, which means that if you have a set of stairs coming from a grass path, you will have an issue with that setup regardless of whether or not the mixin is enabled or disabled - you'll just have to pick between "I can't step up" and "I can step up, but I get stuck".

However, in prior versions of the mod there was a configuration option to choose whether or not the path dropped the player down, or remained at full height called fullGrassPath. Consequently, one could have (if the option still existed) chosen to disable the stepHeightFix, enabled fullGrassPath, and the gameplay issues would be eliminated in exchange for a small visual compromise.

Therefore my point is that, until you do have a solution, re-adding the fullGrassPath option at least allows the player to have an configuration setup which isn't as impactful to gameplay. If I had to pick between a visual issue and being unable to walk up stairs properly, I'd pick the visual issue (and I think most would).

That said, I (deeply) respect you wanting to find a true solution to it - that dedication is why et futurum is as good as it is, and I hope you do find it.

Roadhog360 commented 1 year ago

Sometimes I do get a bit too focused on making things "accurate", after writing that I will be honest and say that I did have a look-down-at-my-hands existential moment and asked myself if it needs to be the way I want it.

The original option was removed because it was seemingly pointless due to these new fixes removing the reason to enable it, but I see now that may be wrong. I suppose I should explain why I am so tacky about that. Well for one since I thought the issue no longer had to do with grass paths it felt pointless. But also changing the path hitbox still doesn't fix other blocks in the game so a fix can feel more "complete".

I do thank your kind words and appreciation. I had not immediately made the connection in my head as to why this was related to paths but now I have.

calreveraster commented 1 year ago

Your desire for that accuracy is really admirable, and like I said, it's what has made your mod as complete and clean as it is. We need more of that in the modding community - and in the 1.7.10 space it's more important than ever since people like you are keeping it alive to allow players to keep enjoying the mods they love.

So I don't think there's anything wrong with your approach - I just wanted to provide some context from the perspective of a pack designer that might allow you to give your players a workaround that will allow them to maintain maximum functionality while you work through the issue - that way, you don't have to bash your head against a wall worrying about whether or not you can get this thing fixed yesterday. That's how you burn yourself out, y'know?

Also to your point about the step function being a black box - I don't know about 1.9 (when grass paths were added) but there are deobfuscation mappings available for 1.12 - perhaps you could use that to gather some insight on how they do what they do?

Roadhog360 commented 1 year ago

The deobfuscation mappings are complete and leave most function vars, especially local variables completely unchanged. This makes some more tightly packed code like the stepping function virtually impossible to understand.

Development environments are already deobfuscated, but the coverage deobfuscation offers is nowhere near complete.

Roadhog360 commented 1 year ago

For now I'll wave my white flag and make grass paths have an invisible full hithox for now. This is too minor to need to be configurable. If step issues are fixed I'll just make it so it uses its normal collision box when the step fix is enabled. I do hope to eventually resolve this fully as non-full blocks can have items picked up through them via hoppers, and likely other obscure uses I want to keep intact.

OvermindDL1 commented 3 months ago

Just leaving some notes...

So I reduced the mixin to 'just' futzing with the arguments passed to the aabb method and it still causes the stairs issue, which is happening because the bounding box of the player perfectly matches the integral edge value of the block, and since the test in that aabb function is a bit... not right looking, it still happens, even though no parent function call data was changed, even if it doesn't look like the returned 'y' value is different from the unaltered version...

In short, wtf is vanilla doing, this code is... very very much not great... It needs a refactoring baaaadly....