Skip to content

Cleanup & Proper usage of NIO #20

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jacobtread
Copy link

Cleaned up the files making them more readable
(Slimmed down path resolutions and added method getMinecraftPath as an alternative to getWorkingPath which replaces a lot of reused calls)

Moved getWorkingPath code to the field workingPath
in net.hypixel.resourcepack.pack.Pack so that it is only created once instead of re-creating it every call (this was also done for the getMinecraftPath method)

Fixed incorrect usage of nio Paths being converted to io files then accessed instead of using the Files interface for nio. This also includes the use of Collections.singleton when writing the file as this can be replaced with a call to getBytes(Charset)

Cleaned up the files making them more readable 
(Slimmed down path resolutions and added method getMinecraftPath as an alternative to getWorkingPath which replaces a lot of reused calls)

Moved getWorkingPath code to the field workingPath
in net.hypixel.resourcepack.pack.Pack so that it is only created once instead of re-creating it every call (this was also done for the getMinecraftPath method)

Fixed incorrect usage of nio Paths being converted to io files then accessed instead of using the Files interface for nio. This also includes the use of Collections.singleton when writing the file as this can be replaced with a call to getBytes(Charset)
@Fallstop
Copy link

It would be great if this would be merged.

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

Successfully merging this pull request may close these issues.

2 participants