Add system property to disable environment stripping in development environments#1154
Open
DrexHD wants to merge 4 commits into
Open
Add system property to disable environment stripping in development environments#1154DrexHD wants to merge 4 commits into
DrexHD wants to merge 4 commits into
Conversation
…ronment" This reverts commit 62ae2d5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR disables environment stripping of mods outside of development environment. This now matches the behavior of minecraft classes, which are only stripped inside the development environment to prevent developers from accidentally using classes from the wrong environment.Additionally it adds a system property to disable environment stripping
in development environmentsfor developers that know/can ensure that the classes they are using will be available!Why?
I do have legitimate use cases for using classes from the "wrong" side. I am using client side classes in server environment for "rendering" entity animations. This allows me to patch mods to run server side only, see https://www.youtube.com/watch?v=Cqef5lmJlk4, where I patched cobblemon (without having to manually copy their client side classes). I do make sure the minecraft client classes are added to the classpath myself.
Without these changes development of mod patches requires a custom fork of fabric-loader and using classes from mods, which use environment annotation doesn't work outside of development environment.
These changes requires explicit opt-in, because this behavior is not desired for the majority of users!