Skip to content

Instantly share code, notes, and snippets.

@TelepathicGrunt
Last active June 19, 2024 20:11
Show Gist options
  • Save TelepathicGrunt/4de77c67adb661c9380e594d20b6a58b to your computer and use it in GitHub Desktop.
Save TelepathicGrunt/4de77c67adb661c9380e594d20b6a58b to your computer and use it in GitHub Desktop.

A small selection of changes that were done in NeoForge since it's creation. This is not all of them. Most changes can be seen in PRs and Commits on the NeoForged GitHub organization's repositories.


Mod Loader

  1. Multiple mod entry points allowed now. Can even specify an entry point to be client only for better client code separation.
    https://docs.neoforged.net/docs/concepts/sides#mod

  2. Capability refactor to split it into Data Attachment and Capabilities separately and cleaner.
    https://docs.neoforged.net/docs/datastorage/attachments
    https://docs.neoforged.net/docs/datastorage/capabilities

  3. Networking refactor to be simpler (ideally) to be used.
    https://docs.neoforged.net/docs/networking/

  4. Forge Registry Wrappers are removed. You must use vanilla registries.
    https://docs.neoforged.net/docs/concepts/registries

  5. DeferredRegistries in Neo now deliberately fire in nearly the same order as Vanilla's registry initialization minus a few exceptions (Mojang had missed a few bugs with registry init that we had to account for). What this means is a lot of the supplier constructors needed in past are no longer necessary! For example, you can pass your Fluid to BucketItem in your DeferredRegistries without issues. Side effect of this is multi-loader mods are a bit easier to write for Neo alongside Fabric.

  6. Switched to full Mojmap mappings everywhere. Runtime, AccessTransformers, etc. The whole toolchain.

  7. Uses Fabric Mixins and ships Mixin Extras to give as much mixin abilities to devs.

  8. A GameTest system is setup to unit test NeoForge's features better. GameTests are also improved and expanded for modders to make better use of them as well. There is also NeoForge's Test Framework that modder can make use of too.
    https://docs.neoforged.net/docs/misc/gametest

  9. JUnit tests are now available for modders to use to test their mods without running full GameTests. Quicker to write and better for testing smaller chunks of code in a mod.

  10. Split up the many Tick events into separate Pre and Post events. Will help reduce number of mods accidentally running their code in both start and end of a tick.

  11. Generate command is now async and functional. A Point of Interest system memory leak was also fixed so any pregenning on Neo is more robust and safer.

  12. Damage Type systems expansion to allow modders to add more to the enums that back it. Also added neoforge:poison Damage Type and have Vanilla Poison Potion use it to allow mods to detect poison better.

  13. Fluid rendering hook is added so modders can more easily do custom fluid rendering systems for their modded fluids.

  14. Made it so server configs generate in config folder automatically by default for users to find them. The world's own serverconfig files are blank and if users want to override per world, they would need to copy the serverconfig from the config folder into the world's own config folder.

  15. Watchdog crashes now prints the entire stacktrace for every thread instead of a truncated, unhelpful stacktrace. Helpful for modders and players to debug a mod issue.

  16. Crashes in Vanilla's network stack will now properly log the exception into the logs instead of swallowing it. Much easier to debug networking issues in mods and modpacks. (This change may be now incorporated into Vanilla itself as of 1.21 snapshots)

  17. Mod locators have been changed and split into locators and providers (metadata parsers). This greatly improves the API for mods such as Connector.

  18. Redid how Events have results and how results are handled. This leads to compile-time checking of the results, better documentation of an event's result, and less annotation magic.

  19. STARTUP configs are now added to support modder's valid use cases where they need to config stuff on mod load right away.

  20. Java Coremods are now available as an alternative to JS Coremods. See the PR here for more details:
    neoforged/FancyModLoader#79

  21. Any enum in vanilla that extends IExtensibleEnum can now be extended by defining a special JSON file and will properly sync the enum order when connecting to servers! It's now data driven!
    https://docs.neoforged.net/docs/advanced/extensibleenums

Datapacks/Resourcepacks

  1. The pack.mcmeta file is now optional in mod's resources. Instead, NeoForge will automatically generate a pack.mcmeta for your mod that will say your mod's assets/data are compatible with the currently running Minecraft version.

  2. Added Data Maps which are special datapackable json files where we patch the map to apply to a vanilla feature. Example, what items can be composted in a Composter is now datapackable.
    https://docs.neoforged.net/docs/datamaps/neo_maps/

  3. Added a recipe ingredient specifically for fluids so mods do not need to roll out their own versions of it.

  4. Allow NeoForge's nbt ingredient to match Components on items in recipes. (See Capability Refactor bullet point)

  5. Mod's own internal datapacks and resource packs now support Vanilla pack features such as Pack Overlays or Pack Filters.

  6. Allow mods to create KnownPacks (special markers in datapacks) that can reduce amount of data needed to join worlds with Synced Datapack Registries.

  7. Fixed mod's internal resourcepacks and datapacks to have consistent ordering to allow mods to easily override other mod's data or assets.

Compatibility

  1. Unified tags with Fabric under c namespace and has folders. Easier for cross-loader mods and datapacks.
    https://docs.neoforged.net/docs/resources/server/tags#conventions

  2. Added incompatible/discouraged clauses for mods to mark other mods as not compatible/discouraged and provide a reason to users.
    https://docs.neoforged.net/docs/gettingstarted/modfiles#dependency-configurations

  3. Networking refactor to be a bit more robust to handle other kinds of non-Neo connections a bit better.

  4. Flight attribute added so modders have a more consistent way of enabling or disabling Creative Flight without causing weird bugs.

NeoGradle (NG)

  1. Got a major cleanup to remove many hacks and allow it to be more testable with unit tests.

  2. NeoGradle now exposes NeoForge like a normal dependency instead of a DSL in the perspective of a modder adding it to their buildscripts. In other words, NeoForge can be handled with implementation 'net.neoforged.neoforge:<version>' or api 'net.neoforged:neoforge:<version' now. Still has special handling under the hood.

  3. Improved handling configurations better (groups of dependencies) and improved how it does conventions. (setting default values)

ModDevGradle (MDG)

  1. Created as an simplier alternative for NeoGradle if modders want a more lightweight hands-off mod dev plugin. Still in experimental phase.

Installer changes

  1. GUI improvements with button positioning, padding, and directory errors.

  2. Translatable installer GUI with persistent language selector drop-down.

  3. Option to generate fat installers for offline use or to reduce downloads. (3 stackable options available: installer libraries, MC jars, MC libraries)

  4. Devs can now log into their Microsoft account to use in their development environment! See the documentation here for more details:
    https://github.com/neoforged/NeoGradle?tab=readme-ov-file#devlogin-1

NeoForge and toolchain development

  1. Consistent formatting across the code base using Spotless.

  2. PR Publishing system, allowing any developer to test PRs and provide feedback without building them locally.

Other

  1. NeoForge documentation site is more beginner friendly and is improving over time:
    https://docs.neoforged.net/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment