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

Journeymap Integration. #6

Closed
mysticdrew opened this issue May 31, 2022 · 2 comments
Closed

Journeymap Integration. #6

mysticdrew opened this issue May 31, 2022 · 2 comments

Comments

@mysticdrew
Copy link

mysticdrew commented May 31, 2022

I am the Journeymap Dev, I looked through your integration. Thanks for adding it.
However, all of what you did with the mixins can be done with the EntityRadarUpdateEvent through our API.
https://github.com/TeamJM/journeymap-api/blob/1.16.5_1.8/src/main/java/journeymap/client/api/event/forge/EntityRadarUpdateEvent.java
examplemod:
https://github.com/TeamJM/journeymap-api/blob/5de6fda29c72992f1b806bb56c7475c727edd84a/src/main/java/example/mod/client/plugin/ForgeEventListener.java#L192

ExampleCode with how Pixelmon updates entity textures:

    @SubscribeEvent
    public void onRadarEntityUpdateEvent(EntityRadarUpdateEvent event) {
        LivingEntity entity = (LivingEntity)event.getWrappedEntity().getEntityLivingRef().get();
        if (entity instanceof PixelmonEntity) {
            PixelmonEntity pixelmon = (PixelmonEntity)entity;
            event.getWrappedEntity().setEntityIconLocation(pixelmon.getSprite());
        }
    }

@mysticdrew
Copy link
Author

mysticdrew commented May 31, 2022

Feel free to pop into our discord to chat about integration. I'd much rather devs use our API than mixins to avoid breaking things. I can add more hooks if needed, thanks!

There is also the same exact hooks for fabric with our fabric version of the api.

@AHilyard
Copy link
Owner

This was fixed by #7, thank you!

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