Giter Site home page Giter Site logo

Comments (1)

tr7zw avatar tr7zw commented on July 21, 2024 2

Hey there, dev of fpm here. In regards to fab52cc, that's not technically the correct fix. You added the mod as a compile dependency and then don't actually use it(FabricLoader.getInstance().isModLoaded("firstperson"); works without having it added). The firstperson mod can be toggled, and just because the player is in first person and gets rendered doesn't mean it's the mod doing it. Other mods like paperdoll and shaders do that too, so with the current fix the backpack would just vanish for them while swimming.
Three potential solutions:

  • Just check for the torso invisible flag being set. While swimming just during the first person render call(so not shader/paperdoll etc) the torso is set to not render so it can't clip into the camera. This might be a decent and easy general workaround.
  • I can look into adding the workarounds I added to the head for better mod support to the torso too. This would not only make the torso invisible, but also move it a few hundred blocks behind the camera. So during the
ModelPart modelPart = playerEntityModel.body;
modelPart.rotate(matrices);

Code the backpack also gets moved far away from where it would be visible.

  • Since you did add the mod as a compile dependency, you could just check https://github.com/tr7zw/FirstPersonModel/blob/1.20.2/Shared/src/main/java/dev/tr7zw/firstperson/api/FirstPersonAPI.java#L42 the API + isSwimming() and that's it. Keep in mind that you need to isolate that code correctly so your mod doesn't crash when trying to check that flag while fpm isn't installed.

from inmisaddon.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.