diff --git a/ADVANCED.md b/ADVANCED.md index 32da2ff..418ae38 100644 --- a/ADVANCED.md +++ b/ADVANCED.md @@ -55,6 +55,16 @@ MCP: A set of mappings made by the MCP team, one of the oldest mapping teams. - Built Forge JARs use READABLE class names? Obfuscated method names? What about field names? - Original enum field names? +## Migration + +``` +# Migrate from Yarn to MojMaps +./gradlew.bat migrateMappings --mappings "net.minecraft:mappings:1.20.2" + +# Then add this to build.gradle +mappings loom.officialMojangMappings() +``` + ## Additional Links Fabric Intermediaries: Maps sourcenames->unique mappings common to all versions but not readable by humans diff --git a/CHANGELOG.md b/CHANGELOG.md index 59dd1c8..4c314c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,78 +4,68 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Upcoming -- [] Caused by: java.lang.NoSuchFieldError: displayName - at net.pickhaxe.compat.world.item.CreativeModeTab$CreativeModeTab_Impl_.setId(E:\Programming\Game Modding\Minecraft Modding\PickHaxe\pickhaxe\src\net/pickhaxe/compat/world/item/CreativeModeTab.hx:66) - at net.pickhaxe.compat.world.item.CreativeModeTab$CreativeModeTab_Impl_.register(E:\Programming\Game Modding\Minecraft Modding\PickHaxe\pickhaxe\src\net/pickhaxe/compat/world/item/CreativeModeTab.hx:30) - at com.elitemastereric.madeinhaxe.items.ModItems.registerCreativeTab(./src/com/elitemastereric/madeinhaxe/items/ModItems.hx:38) - at com.elitemastereric.madeinhaxe.MadeInHaxeMod.onCreativeModeTabRegister(./src/com/elitemastereric/madeinhaxe/MadeInHaxeMod.hx:13) - at net.pickhaxe.core.CommonMod.onInitialize(E:\Programming\Game Modding\Minecraft Modding\PickHaxe\pickhaxe\src\net/pickhaxe/core/CommonMod.hx:196) - at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:383) -- [] Caused by 1: java.lang.NoClassDefFoundError: net/minecraftforge/event/RegistryEvent/Register - at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?] {} - at java.lang.Class.privateGetDeclaredMethods(Class.java:3402) ~[?:?] {} - at java.lang.Class.privateGetPublicMethods(Class.java:3427) ~[?:?] {} - at java.lang.Class.privateGetPublicMethods(Class.java:3433) ~[?:?] {} - at java.lang.Class.getMethods(Class.java:2019) ~[?:?] {} - at net.minecraftforge.eventbus.EventBus.registerObject(EventBus.java:92) ~[eventbus-5.0.3.jar%2336!/:?] {} - at net.minecraftforge.eventbus.EventBus.register(EventBus.java:120) ~[eventbus-5.0.3.jar%2336!/:?] {} - at net.pickhaxe.core.CommonMod.forge_registerListeners(E:\Programming\Game Modding\Minecraft Modding\PickHaxe\pickhaxe\src\net/pickhaxe/core/CommonMod.hx:95) ~[obsidianarmor-0.4.0.jar%2353!/:?] {re:classloading} -- [] Forge (multiple mods): https://github.com/HaxeFoundation/haxe/issues/11361 -- [] Prompt to clean when switching versions, and save last version so we know when to do that -- [] Add command line argument for shading -- [] Option to auto-make when building +### Enhancements +- Support more versions of Forge +- Support for Legacy Fabric +- Support for Quilt +- Support for NeoForge +- Update documentation +- Add feature in tooling that checks metadata and warns you if a specific loader/version commmbination is unsupported +- Add more Bare samples for MadeInHaxe +- Add more sample projects +- Add more compat features +- Dogfood PickHaxe (make some real mods) +### Known Issues +- Multiple PickHaxe mods for Forge will conflict: https://github.com/HaxeFoundation/haxe/issues/11361 +- Functional interfaces need to be fully qualified (i.e. if you're passing a function as an argument, add typing to all the arguments or it will break at runtime). +- `pickhaxe runClient` doesn't work on Fabric (need to figure out a fix) +### Versions to Fix +- [] Fabric 1.16.5 (Bare): Just need to write it +- [] Forge 1.19.4 (Bare): Just need to write it +- [] Forge 1.20.2 (Bare): Just need to write it +- [] Forge 1.16.5 (Bare): Something Gradle-related? +- [] Forge 1.16.5: Something Gradle-related? +- [] Forge 1.17.1: Something Gradle-related? +- [] NeoForge 1.20.2: Haven't looked into it, will need Gradle work +- [] Quilt 1.18.2: Haven't looked into it, will need Gradle work +- [] Quilt 1.19.4: Haven't looked into it, will need Gradle work +- [] Quilt 1.20.2: Haven't looked into it, will need Gradle work -## [0.4.0] + +## [0.4.0] - 2023-11-10 +This version was a long time in the making, in part due to issues with the Haxe compiler itself; now, most of those are resolved. Fabric 1.16.5-1.20.2 (+ snapshots!) as well as Forge 1.18.2-1.20.2 are now fully supported and have working builds, and the tools for developing for both have greatly improved. ## Added - Updated JVM target to be functional, and to be the default mode (to allow for improved code generation from Haxe). - In this mode, Pickhaxe will now generate an unmapped "dev" JAR rather than a set of Java source files. -- Fixes to mod metadata now add `authors` and `contributors` +- Added the `pickhaxe runClient` commmand. + - Specify a Minecraft mod loader and game version, and the game will +- Added the `pickhaxe template` command. + - This acts as an alternative to the `pickhaxe init` command, allowing you to download a sample project and get started with PickHaxe immediately. + - Use `pickhaxe template --list` to peruse the list of official sample projects and `pickhaxe template ` to download one. +- Added the `--shading` and `--no-shading` arguments to the Build command. + - These are used to enable and disable Shading, which is a tool to relocate core classes which would otherwise have shared classpaths. Without Shading, two PickHaxe mods for Forge would conflict with each other. +- Added the `--make` argument to the Build command. + - This will automatically call `pickhaxe make` with your chosen settings. +- PickHaxe project files now have the `mod-authors` and `mod-contributors` tags. +- Calling `trace` in Haxe now properly uses `slf4j` to output a debug log. ## Changed -- Haxe dependency updated to require `5.0.0-alpha` (unless they end up releasing a 4.3.3). +- PickHaxe is now dependant on Haxe `5.0.0-alpha`. This is due to a long list of recent fixes made to the JVM target that enable PickHaxe to function. - Easiest way to handle this is to modify `.vscode/settings.json` and change `terminal.integrated.env.windows` to add +- The `pickhaxe build` command has been improved; it now cleanly handles multiple versions of Minecraft, and runs way faster on repeat builds for the same version. +- The `pickhaxe init` command now includes the `.vscode/settings.json` and `.gitignore` files. +- Call stacks for error messages now only display with `--verbose` turned on. +- Error messages for the PickHaxe tool now display an error code (`[EXCEPTION ###]`) to assist with diagnosis, and for the most part better convey the issue. ## Fixed -- Updates and bug fixes to fix Fabric 1.16.0-1.20.2, as well as Fabric on snapshot 23w44a. +- A large range of fixes to ensure projects generate functioning builds for Fabric and Forge. + - I am summarizing this in one line but really this is what took months of work, on-and-off. - Fixed an issue where mod icons were not displaying. Make sure the icon is located at `resources/assets/_icon.png` so it works. -## To Fix -- [] Fabric 1.16: Untested -- [] Fabric 1.16.1: java.lang.NoSuchFieldError: displayName -- [X] Fabric 1.16.2 -- [X] Fabric 1.16.3 -- [X] Fabric 1.16.4 -- [X] Fabric 1.16.5 -- [X] Fabric 1.17 -- [X] Fabric 1.17.1 -- [X] Fabric 1.18 -- [X] Fabric 1.18.1 -- [X] Fabric 1.18.2 -- [X] Fabric 1.19 -- [X] Fabric 1.19.1 -- [X] Fabric 1.19.2 -- [X] Fabric 1.19.3 -- [X] Fabric 1.19.4 -- [X] Fabric 1.20 -- [X] Fabric 1.20.1 -- [X] Fabric 1.20.2 -- [X] Fabric 1.20.3 (Snapshot) -- [] Forge 1.16: Untested -- [] Forge 1.16.1: Untested -- [] Forge 1.16.2: Untested -- [] Forge 1.16.3: Untested -- [] Forge 1.16.4: Untested -- [] Forge 1.16.5: Untested -- [] Forge 1.17: Untested -- [] Forge 1.17.1: ForgeGradle issues -- [] Forge 1.18: Untested -- [] Forge 1.18.1: Untested -- [] Forge 1.18.2: java.lang.NoClassDefFoundError: net/minecraftforge/event/RegistryEvent/Register -- [X] Forge 1.19 -- [X] Forge 1.19.1 -- [X] Forge 1.19.2 -- [X] Forge 1.19.3 -- [X] Forge 1.19.4 -- [] Forge 1.20: ForgeGradle issues -- [] Forge 1.20.1 -- [] Forge 1.20.2 +- Fixed an issue where certain metadata wasn't getting put into the mod manifest. +- Fixed a bug where the wrong Parchment version would be used when using `build --make`. +- Fixed an issue where builds would fail if optional tags were not included in `project.xml`. +## Removed +- Removed the mapping macros, which were never used (Gradle is now used to obfuscate output instead). +## Known Issues +- Any time you use a functional interface (i.e. you pass a function as an argument to another function), all parameters must be properly typed or Java will crash. ## [0.3.0] - 2023-07-10 @@ -180,4 +170,3 @@ Initial release. - Implemented basic support for Fabric 1.19.4 - Added Made in Haxe sample project. - Added Obsidian Armor sample project. - diff --git a/README.md b/README.md index 2fb3fcd..2c1b35e 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,17 @@ PickHaxe is a flexible, powerful Haxe framework to supercharge your Minecraft mod development. Build your mods in a high-level strictly-typed language and export to the Minecraft version and modding API of your choice. -Getting started is simple. Install Haxe and PickHaxe, then create a new mod project and get developing. When you're ready to test, PickHaxe will compile your mod for the mod loader of your choice, for the Minecraft version of your choice. - -PickHaxe currently supports exporting mods to Minecraft 1.19, with plans to gradually expand to other versions over time. PickHaxe currently supports exporting mods to Fabric and Forge. +Getting started is simple. Install Haxe and PickHaxe, then create a new mod project (or download a sample project) and get developing. When you're ready to test, PickHaxe will compile your mod for any of several several versions of Minecraft on multiple different mod loaders. PickHaxe currently supports Fabric 1.16.5-1.20.2, as well as Forge 1.18.2-1.20.2, and all your code can be shared in a single project! # Usage +Download PickHaxe via [haxelib](https://lib.haxe.org/p/PickHaxe/): + +``` +haxelib install pickhaxe +haxelib run pickhaxe help +``` + Please see the [tutorial](https://github.com/EliteMasterEric/PickHaxe/wiki/Tutorial%253A-Your-First-Mod) on the wiki for more information on basic usage. Also see the available [sample projects](https://github.com/EliteMasterEric/PickHaxe-Samples/), available in their own repo. diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md new file mode 100644 index 0000000..c0d708b --- /dev/null +++ b/TROUBLESHOOTING.md @@ -0,0 +1,5 @@ +# Troubleshooting Guide + +## Unix.Unix_error(40, "recv", "") + +Just keep running the command until it works, it's an issue with Haxe I think. diff --git a/haxelib.json b/haxelib.json index 76f3091..04b5bf4 100644 --- a/haxelib.json +++ b/haxelib.json @@ -6,7 +6,7 @@ "classPath": "src", "description": "A Haxe framework to build Minecraft mods. Fabric, Forge, and more.", "contributors": ["MasterEric"], - "releasenote": "Working JVM target (replaces Java target) for better code generation.", + "releasenote": "template and runClient commands, working Forge and Fabric, and many bugfixes.", "version": "0.4.0", "dependencies": { "thx.semver": "", diff --git a/src/net/pickhaxe/tools/schema/PickHaxeDefines.hx b/src/net/pickhaxe/tools/schema/PickHaxeDefines.hx index 1ae39b7..1353c65 100644 --- a/src/net/pickhaxe/tools/schema/PickHaxeDefines.hx +++ b/src/net/pickhaxe/tools/schema/PickHaxeDefines.hx @@ -597,7 +597,7 @@ class Builder result.append(DEFINE, defines.pickhaxe.loader.current); // Add a define for the current Minecraft version (#if minecraft == 1.19.3, #if minecraft >= 1.12.2) - result.append(DEFINE, 'minecraft=${defines.pickhaxe.minecraft.version}'); + // result.append(DEFINE, 'minecraft=${defines.pickhaxe.minecraft.version}'); return result; }