Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.aatxe:pkgnx:3.0.1'
}
dependencies {
implementation("com.github.aatxe:pkgnx:3.0.1")
}
<dependency>
<groupId>com.github.aatxe</groupId>
<artifactId>pkgnx</artifactId>
<version>3.0.1</version>
</dependency>
libraryDependencies += "com.github.aatxe" % "pkgnx" % "3.0.1"
:dependencies [[com.github.aatxe/pkgnx "3.0.1"]]
pkgnx is a simple Java library for the NX file format. The format was designed by Peter Atashian and angelsl and has a public specification available here. The format intended on replacing the proprietary WZ data format designed by Wizet for the popular game, MapleStory.
Using pkgnx is really quite simple! The first step, of course, is to include the library as a dependency either by adding it to your classpath or adding it as a maven dependency. Once that's done, you can start coding away. The code itself is quite simple.
You can use an eagerly-loaded NX File like so:
NXFile file = new EagerNXFile("path/to/file");
// Do stuff, like...
System.out.println(file.getRoot().getChild("Mob").getChild("8800000.img"));
// Or...
System.out.println(file.resolve("Mob/8800000.img"));
You can use a lazy-loaded NX File like so:
NXFile file = new LazyNXFile("path/to/file");
// Do stuff, like...
System.out.println(file.getRoot().getChild("Mob").getChild("8800000.img"));
// Or...
System.out.println(file.resolve("Mob/8800000.img"));
You can also delay the parsing of an eager NX file until later like so:
EagerNXFile file = new EagerNXFile("path/to/file", false);
// Do some other stuff and then later...
file.parse();
pkgnx follows the Semantic Versioning guidelines. This means that the versions follow the structure Major.Minor.Patch where increments in patch number mean that no API changes took place, increments in minor number mean that all changes are backwards compatible, and increments in major number mean that changes are backwards-incompatible. This should make it easy to know when it's safe for you as a user to update this library!
To contribute a patch to pkgnx, simply fork it and run. When you've finished all of your commits, go ahead and send a pull request. All changes are required to match the official format specification and changes that do not fix bugs or add additional functionality will be rejected. This means no style changes!
pkgnx is licensed under the MIT License. The full license text can be found in LICENSE.md for your convenience.