-
Notifications
You must be signed in to change notification settings - Fork 23
Use JarFileSystem When Scanning Mods #165
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
Conversation
station-api-base/src/main/java/net/modificationstation/stationapi/api/util/Namespace.java
Outdated
Show resolved
Hide resolved
|
My new attempt was to fix this issue by reverting all the changes from this PR and just replacing the following line: StationAPI/station-api-base/src/main/java/net/modificationstation/stationapi/api/util/Namespace.java Line 80 in 3cc9a4a
with the following: try (val fs = FileSystemUtil.getJarFileSystem(callerPath, false).get()) {Since this should always get the same Edit: |
6a2b310 to
5c1bf5f
Compare
|
Fixed - the resulting |
calmilamsy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff.
|
While this might work, |
|
Ah, I missed that part, I'll push some changes when I'm on proper. |
|
I also need to fix up the PR name and body again considering my inaccurate read of the code. |
* Switched from HMI to RetroCommands * Removed broken reimplementation of Divisor's old PlayerAPI. (#139) * Removed Indigo renderer (#140) * Updated UnsafeEvents * ContextVariable * ContextVariable#get * Feature/register helper (#146) * Added register helper methods to RegistryEvent * Remove unused BulkConsumer. * Updated all registries to be entry type bound. * Updated all usages of Registry#register to new helper methods where applicable. * Moved bulk registration helpers implementation to Registry interface and redirected event method helpers to that. * Swapped namespace and rawIdGetter placements so they better reflect the original method arguments. * cleanup/java-hacks (#145) * Cleaned up Java hacks related to entrypoints * Removed EnumFactory. * Removed NativeImage Unsafe buffer cleaner invocation. * Replaced fake BlockItem with null, since MixinExtras allows that, unlike vanilla Mixin's Redirect. * Removed UnsafeProvider. * Updated javadoc for EntrypointManager#registerLookup * Fix a NPE in shears override * Fix a NPE in FuelRegistry * Added StationFlatteningBlock#onStateReplaced * Fixed #159 * Change version * Merge pull request #165 from ThexXTURBOXx/develop Don't close filesystems when resolving mod namespaces * Update modmenu * Merge pull request #168 * Yeet * Wait this is wrong * Merge branch 'develop' into namespace-change * Make stapi get angree (#169) * Update BiomeMixin.java (#196) * Add Block Support to CustomTooltipProvider (#187) * Add Block support to CustomTooltipProvider * Add some documentation to the interface * Make Leaves' Log Check Work With Modded Logs and Leaves (#186) * Fix * And comment this out cause it's ugly * Fix (#185) * FUCK (#200) * Why mine (#197) * Potentially make mine scream (#188) * Implement onBonemealUse on Vanilla Crops (#170) * Yeet * Also do sapling, also fix multiplayer * Use the appropriate random --------- Co-authored-by: mineLdiver <aabesedin@mail.ru> * Fixed cal L moment (cascaded test worldgen) * Change version --------- Co-authored-by: Nico Mexis <nico.mexis@kabelmail.de> Co-authored-by: calmilamsy <bumbill00@gmail.com>
I am using symlinks to self-built mods on my system. All those broke in alpha.4 due to the new approach of resolving Namespaces.
This approach tries to address this issue by using fabric's JarFileSystem internals.
It is definitely not the cleanest approach, but it tackles all my use cases as well as the standard use case (just throwing mods into the mods/ folder).