paperweight-test-plugin
paperweight-test-plugin copied to clipboard
test plugin for paperweight-userdev
trafficstars
paperweight-test-plugin
jmp's test plugin for paperweight-userdev development
(also serves as an example until more thorough documentation is created)
notes (read these)
build.gradle.ktsandsettings.gradle.ktsboth contain important configuration.paperweight-userdevautomatically detects shadow and will useshadowJaras input forreobfJar. This means no extra configuration is required to usepaperweight-userdevwith shadow. See theshadowbranch on this repository for an example usage of shadow withpaperweight-userdev.- The
run-paperGradle plugin is optional, it integrates with paperweight and allows for launching a test server with your plugin through therunServerandrunMojangMappedServertasks. - Due to a gradle bug, independently applying
paperweight-userdevto multiple projects in a build can result in errors. To work around this, applypaperweight-userdevto the root project withapply false(i.e.,id("...") version "..." apply falsein Kotlin DSL), and then when applyingpaperweight-userdevto subprojects don't include a version specification. A more advanced solution would involve addingpaperweight-userdevas a dependency to your build logic, seereflection-remapperand thesource-remapbranch on this repo for examples of this. - The
source-remapbranch on this repo has a specialremapPluginSourcestask to remap the source code insrc/main/javafrom spigot to Mojang mappings, outputting remapped source in/src/main/mojangMappedJava. Note that this will only remap your code, not update it from a prior version. Meaning you must be using the dev bundle for the Minecraft version your source code is for when remapping. paperweight-userdevdoesn't provide any utilities for doing reflection.reflection-remapperis a companion library topaperweight-userdevassisting with reflection on remapped code.