Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Farmer's Delight Compatibility #35

Closed
ghost opened this issue Mar 5, 2023 · 8 comments
Closed

Farmer's Delight Compatibility #35

ghost opened this issue Mar 5, 2023 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 5, 2023

Minecraft 1.19.2
Fabric 0.14.14
Fabric API 0.75.1
Farmer's Delight 1.3.9
Raised 1.2.1

The nourishment hunger overlay from Farmer's Delight doesn't seem to work with Raised. The overlay is in a fixed position and is unaffected by raising the hotbar up or down.

export

(I use custom textures for hud elements in the screenshot, but have also tested this in a fresh instance with normal textures with the same incompatibility.)

@yurisuika
Copy link
Owner

Thanks for the suggestion! Yes, this is normal to see with mods that add HUD elements. Unless they use Forge's GUI (which Raised modifies, like Appleskin), then I have to make Raised manually inject into a mod to make their HUD move. It has nothing to with textures.

I can add support for this in the next update!

@ghost
Copy link
Author

ghost commented Mar 7, 2023

Thanks, that would be much appreciated :)

@yurisuika
Copy link
Owner

image
Okay, it would appear there is also a "comfort overlay" on the hearts from it's respective status effect. Both of these work natively in the Forge version, so these patches will only be required for the Fabric version.

@yurisuika
Copy link
Owner

I have added Actions to the project, so now there are builds whenever I push some change.
https://github.com/yurisuika/Raised/actions

As for now it should all be good!

@Lucky-56
Copy link

Lucky-56 commented Sep 9, 2024

this seems to be back on 1.21.1

I already reported it to Farmer's Delight Fabric but it seems here is where it actually has to be reported

@Lucky-56
Copy link

@yurisuika

@yurisuika
Copy link
Owner

IIRC, Farmer's Delight was supported via mixin initially, but around the same time they added support on their end for Raised's Object Share and this caused a conflict of FD being doubly raised until the mixin was removed with the advent of 3.x.

As of Raised 3.x, Raised no longer has mod mixin injections because it was a very unstable way of doing things; changes in mods would cause crashes and thus only the latest versions of mixin supported mods could be supported, meaning backwards mod support was impossible. Breaking out mod support into addition files in 2.x was an attempt to resolve it, but launchers did not support these additional files hosted on their own repos, so despite it being a good idea that resolved all those problems it just didn't work out in a practical sense. While it could have been done as separate projects, I really did not want that mess.

With 3.x Raised changed significantly in how it worked, and thus for the most part mods were natively supported without the need for any such hackery. This didn't work for all mods, but most of what had previously been supported through hacky mixins still worked and even some that couldn't be mixed into before for various reasons now worked. Even some that supported Raised via Object Share on Fabric no longer needed OS, so there was an option to disable OS (i.e. making it return 0).

Instead, it now translates anything using the HUD pose stack. On Forge this is mainly anything using certain render events that correspond to certain Forge elements (pre 1.20.5), or nowadays and on Fabric is done by wrapping the element's code in these translations. If that doesn't work, and the mod does not inject at the head/tail of the main render method (realized as mod element OTHER), then there really is nothing that can be done as that is the closest proxy to some sort of standardization of rendering HUD elements on Fabric. On older Forge and NeoForge there is also support for mods using the overlay registries.

OS support was dropped in 4.x because of the complexity of the new system and a lot more ways to control mod elements. so there was no exact analog for what the old objects represented with the ability to choose position of the elements and horizontal movement etc. Raised now has an API to replace the simple support that OS offered, and support is exactly the same on Forge/NeoForge/Fabric, unlike before where OS was only for Fabric.

So, as of today, if it doesn't work with any of the mod elements, it must be supported through the API. If the mod author does not want to add support for it, you can make a bridge mod to basically do the same as I used to do, making a hacky inject, modifyarg, redirect, whatever.

@Lucky-56
Copy link

alright I'll reopen the issue then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants