From 1cc880d32109ac5b2948bef362e20f140f73d321 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Wed, 12 Jun 2024 21:36:57 +0300 Subject: [PATCH 1/8] Create 21.0release.md --- content/news/21.0release.md | 89 +++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 content/news/21.0release.md diff --git a/content/news/21.0release.md b/content/news/21.0release.md new file mode 100644 index 0000000..8728a3b --- /dev/null +++ b/content/news/21.0release.md @@ -0,0 +1,89 @@ +--- +title: "NeoForge 20.1 for Minecraft 1.21" +date: 2024-06-12T17:40:16+03:00 +draft: false +categories: +- News +- Releases +author: neoforgedteam +summary: "All you need to know about NeoForge 21.0, now released for Minecraft 1.21." +description: "All you need to know about NeoForge 21.0, now released for Minecraft 1.21." +--- + +It's that time of the year again! Mojang has just released a new Minecraft major version: 1.21, followed by the first beta release of NeoForge 21.0. + +## Previous changes +Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version outlining important vanilla changes too: + +- [1.20.2](20.2release.md): + - The package renames + - The [EventBus changes](20.2eventbus-changes.md) + - The [registry rework](20.2registry-rework.md) +- [1.20.3](20.3release.md): + - The [capability rework](20.3capability-rework.md) +- 1.20.4: + - The introduction of [data maps](https://github.com/neoforged/NeoForge/pull/519) + - The [networking refactor](20.4networking-refactor.md) + - The [switch to Fabric Mixin](https://github.com/neoforged/FancyModLoader/pull/94) +- [1.20.5](20.5release.md): + - The `mods.toml` file was renamed to `neoforge.mods.toml` + - The [second networking rework](20.5release/#network-api-rework) + - The [Tick event refactor](https://github.com/neoforged/NeoForge/pull/542) +- 1.20.6: + - The [removal of `Event.Result`](https://github.com/neoforged/NeoForge/pull/588) + +## The Vanilla 1.21 changes +And now, let's get into the most important changes in Vanilla. + +First of all, the `ResourceLocation` constructors were made private, and replaced with static factory methods: +- `ResourceLocation#fromNamespaceAndPath`: takes in the namespace and the path of the resource location. This is functionally equivalent to the `ResourceLocation(String, String)` constructor in 1.20.6 and below. Accompanied by `#tryBuild` which returns `null` instead of throwing if the parameters aren't valid. +- `ResourceLocation#parse`: takes in a resource location string composed of a namespace and path, separated by `:`. This method is functionally equivalent to the `ResourceLocation(String)` constructor in 1.20.6 and below. Accompanied by `#tryParse` which returns `null` instead of throwing if the parameters aren't valid. +- `ResourceLocation#withDefaultNamespace`: takes in the path of the resource location, and always uses `minecraft` as its namespace. + +### Depluralisation +Several data folder names that were plural have been renamed: +- tag folders: + - `tags/blocks` -> `tags/block` + - `tags/entity_types` -> `tags/entity_type` + - `tags/fluids` -> `tags/fluid` + - `tags/items` -> `tags/item` + - `tags/game_events` -> `tags/game_event` +- `recipes` -> `recipe` +- `advancements` -> `advancement` + +### Data-driven enchantments +Enchantments are no longer a static, built-in registry, and instead are a datapack registry. +With this change, methods that previously took an `Enchantment` will now take a `Holder`, and all fields in the `Enchantments` class are `ResourceKey`s. +Additionally, your code should now use `EnchantmentEffectComponents` to determine whether an enchantment should affect something, instead of relying on direct level checks. + +## The NeoForge changes +The first NeoForge beta release for 1.21 comes with some changes too. + +### Deprecations +Members deprecated for removal have been mostly removed: +- `IItemExtension#onArmorTick`: use `Item#inventory` tick instead, with the armor slot indices being 36, 37, 38 and 39. +- `ItemHandlerHelper#copyStackWithSize` -> `ItemStack#copyWithCount` +- `ItemHandlerHelper#canItemStacksStack` -> `ItemStack#isSameItemSameComponents` +- the `ComposterBlock#COMPOSTABLES` map is now ignored. Use the data map instead. +- the `VibrationSystem#VIBRATION_FREQUENCY_FOR_EVENT` map is now ignored. Use the data map instead. +- the `Parrot#MOB_SOUND_MAP` map is now ignored. Use the data map instead. + +FML also had its deprecated members removed: +- the `ModLoadingContext#registerConfig` methods are replaced by `ModContainer#registerConfig` +- `FMLJavaModLoadingContext#get` was removed. The direct replacement is `ModLoadingContext#get`, however use of it is discouraged. You should use direct references to your container where possible, and consider that the mod's event bus is provided as a mod class constructor argument. +- `DistExecutor` was removed without replacement. You should either use `if (FMLLoader.dist == )` checks, or separate entrypoints for client and common code. + +### Enum extensions +TODO: + +## Experimental Gradle Plugin +We're currently developing a new experimental Gradle Plugin, focused on simpler buildscripts and improved caching. You can find information on its usage [here](https://github.com/NeoForged/ModDevGradle), and support is provided in the [thread](https://discord.com/channels/313125603924639766/1239579489617580072) on our [Discord server](https://discord.neoforged.net). + +NeoGradle will **continue** to be supported. + +## A note on stability +As was the case with the 1.20 lifecycle, we expect 1.21 (or 1.21.1) to be the stable version packs will focus on during the 1.21 lifecycle. +This means that 1.21 may have a longer beta period so that we can make sure that the version packs will use for the year to come is as good as it gets. +However, we will, as always, refrain from making useless breaking changes, and will make sure to announce them in the [Dev Announcements channel](https://discord.com/channels/313125603924639766/1187738270386372740) of our [Discord server](https://discord.neoforged.net). Make sure to select the `Dev Announcement Pings` role if you want to be kept up to date with the most important changes! + +As always, we want to thank everyone for their contributions during the 1.20 lifecycle, and we hope to see more mods be developed for NeoForge in the coming months. \ No newline at end of file From e92216c526f646769d5c221c5ed183c46f4b3fb4 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Wed, 12 Jun 2024 21:40:06 +0300 Subject: [PATCH 2/8] Add primer link --- content/news/21.0release.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index 8728a3b..bb12dd4 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -56,6 +56,7 @@ Enchantments are no longer a static, built-in registry, and instead are a datapa With this change, methods that previously took an `Enchantment` will now take a `Holder`, and all fields in the `Enchantments` class are `ResourceKey`s. Additionally, your code should now use `EnchantmentEffectComponents` to determine whether an enchantment should affect something, instead of relying on direct level checks. +For more information, we encourage you to consult [ChampionAsh](https://github.com/ChampionAsh5357)'s [1.21 primer](https://gist.github.com/ChampionAsh5357/d895a7b1a34341e19c80870720f9880f). ## The NeoForge changes The first NeoForge beta release for 1.21 comes with some changes too. From 859f1fa9c321b478920ac37dc612cd0bdec8a8e2 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Wed, 12 Jun 2024 21:41:13 +0300 Subject: [PATCH 3/8] It's 21.0 --- content/news/21.0release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index bb12dd4..bfd8221 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -1,5 +1,5 @@ --- -title: "NeoForge 20.1 for Minecraft 1.21" +title: "NeoForge 21.0 for Minecraft 1.21" date: 2024-06-12T17:40:16+03:00 draft: false categories: From 2abf09f3310336d180a51ba9d4515c1f7e7ec74e Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Wed, 12 Jun 2024 21:43:42 +0300 Subject: [PATCH 4/8] Update 21.0release.md --- content/news/21.0release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index bfd8221..abb59b9 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -13,7 +13,7 @@ description: "All you need to know about NeoForge 21.0, now released for Minecra It's that time of the year again! Mojang has just released a new Minecraft major version: 1.21, followed by the first beta release of NeoForge 21.0. ## Previous changes -Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version outlining important vanilla changes too: +Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version outlining important Vanilla changes: - [1.20.2](20.2release.md): - The package renames From 1dc86a01148997ea5f3a5256344835890ebd35de Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Thu, 13 Jun 2024 18:12:28 +0300 Subject: [PATCH 5/8] Enum extensions not yet --- content/news/21.0release.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index abb59b9..cc60a76 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -74,9 +74,6 @@ FML also had its deprecated members removed: - `FMLJavaModLoadingContext#get` was removed. The direct replacement is `ModLoadingContext#get`, however use of it is discouraged. You should use direct references to your container where possible, and consider that the mod's event bus is provided as a mod class constructor argument. - `DistExecutor` was removed without replacement. You should either use `if (FMLLoader.dist == )` checks, or separate entrypoints for client and common code. -### Enum extensions -TODO: - ## Experimental Gradle Plugin We're currently developing a new experimental Gradle Plugin, focused on simpler buildscripts and improved caching. You can find information on its usage [here](https://github.com/NeoForged/ModDevGradle), and support is provided in the [thread](https://discord.com/channels/313125603924639766/1239579489617580072) on our [Discord server](https://discord.neoforged.net). @@ -87,4 +84,4 @@ As was the case with the 1.20 lifecycle, we expect 1.21 (or 1.21.1) to be the st This means that 1.21 may have a longer beta period so that we can make sure that the version packs will use for the year to come is as good as it gets. However, we will, as always, refrain from making useless breaking changes, and will make sure to announce them in the [Dev Announcements channel](https://discord.com/channels/313125603924639766/1187738270386372740) of our [Discord server](https://discord.neoforged.net). Make sure to select the `Dev Announcement Pings` role if you want to be kept up to date with the most important changes! -As always, we want to thank everyone for their contributions during the 1.20 lifecycle, and we hope to see more mods be developed for NeoForge in the coming months. \ No newline at end of file +As always, we want to thank everyone for their contributions during the 1.20 lifecycle, and we hope to see more mods be developed for NeoForge in the coming months. From 573b11f6736a37168f2ff873a095122b1d9a22f8 Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:29:00 +0300 Subject: [PATCH 6/8] Update date --- content/news/21.0release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index cc60a76..dc8bdad 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -1,6 +1,6 @@ --- title: "NeoForge 21.0 for Minecraft 1.21" -date: 2024-06-12T17:40:16+03:00 +date: 2024-06-13T19:28:00+03:00 draft: false categories: - News From a86cda58f3cfe028ab4216abc564eed425f95f95 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Thu, 13 Jun 2024 19:42:03 +0300 Subject: [PATCH 7/8] Update post --- content/news/20.2release.md | 1 + content/news/20.3release.md | 1 + content/news/20.5release.md | 1 + content/news/21.0release.md | 20 ++++++++++---------- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/content/news/20.2release.md b/content/news/20.2release.md index 25c4aa9..f0d1c7c 100644 --- a/content/news/20.2release.md +++ b/content/news/20.2release.md @@ -3,6 +3,7 @@ title: "NeoForge 20.2 for Minecraft 1.20.2" date: 2023-10-30T19:50:00+01:00 categories: - News +- Releases author: neoforgedteam summary: | All you need to know about NeoForge 20.2, now released for Minecraft 1.20.2. diff --git a/content/news/20.3release.md b/content/news/20.3release.md index 89cad51..dccfb09 100644 --- a/content/news/20.3release.md +++ b/content/news/20.3release.md @@ -3,6 +3,7 @@ title: "NeoForge 20.3 for Minecraft 1.20.3 and 1.20.4" date: 2023-12-05T20:25:00+01:00 categories: - News +- Releases author: neoforgedteam summary: | All you need to know about NeoForge 20.3, now released for Minecraft 1.20.3. diff --git a/content/news/20.5release.md b/content/news/20.5release.md index 854e5bf..1823030 100644 --- a/content/news/20.5release.md +++ b/content/news/20.5release.md @@ -3,6 +3,7 @@ title: "NeoForge 20.5 for Minecraft 1.20.5" date: 2024-04-23T22:50:00+02:00 categories: - News +- Releases author: neoforgedteam summary: | All you need to know about NeoForge 20.5, now released for Minecraft 1.20.5. diff --git a/content/news/21.0release.md b/content/news/21.0release.md index dc8bdad..46cd31f 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -13,27 +13,27 @@ description: "All you need to know about NeoForge 21.0, now released for Minecra It's that time of the year again! Mojang has just released a new Minecraft major version: 1.21, followed by the first beta release of NeoForge 21.0. ## Previous changes -Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version outlining important Vanilla changes: +Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version, outlining important Vanilla changes: - [1.20.2](20.2release.md): - The package renames - The [EventBus changes](20.2eventbus-changes.md) - - The [registry rework](20.2registry-rework.md) + - The [Registry Rework](20.2registry-rework.md) - [1.20.3](20.3release.md): - - The [capability rework](20.3capability-rework.md) + - The [Capability Rework](20.3capability-rework.md) - 1.20.4: - - The introduction of [data maps](https://github.com/neoforged/NeoForge/pull/519) - - The [networking refactor](20.4networking-refactor.md) + - The introduction of [Data Maps](https://github.com/neoforged/NeoForge/pull/519) + - The [Networking Refactor](20.4networking-refactor.md) - The [switch to Fabric Mixin](https://github.com/neoforged/FancyModLoader/pull/94) - [1.20.5](20.5release.md): - The `mods.toml` file was renamed to `neoforge.mods.toml` - - The [second networking rework](20.5release/#network-api-rework) - - The [Tick event refactor](https://github.com/neoforged/NeoForge/pull/542) + - The [Second Networking Rework](20.5release/#network-api-rework) + - The [Tick Event Refactor](https://github.com/neoforged/NeoForge/pull/542) - 1.20.6: - The [removal of `Event.Result`](https://github.com/neoforged/NeoForge/pull/588) ## The Vanilla 1.21 changes -And now, let's get into the most important changes in Vanilla. +Now, let's get into the most important changes in Vanilla. First of all, the `ResourceLocation` constructors were made private, and replaced with static factory methods: - `ResourceLocation#fromNamespaceAndPath`: takes in the namespace and the path of the resource location. This is functionally equivalent to the `ResourceLocation(String, String)` constructor in 1.20.6 and below. Accompanied by `#tryBuild` which returns `null` instead of throwing if the parameters aren't valid. @@ -52,8 +52,8 @@ Several data folder names that were plural have been renamed: - `advancements` -> `advancement` ### Data-driven enchantments -Enchantments are no longer a static, built-in registry, and instead are a datapack registry. -With this change, methods that previously took an `Enchantment` will now take a `Holder`, and all fields in the `Enchantments` class are `ResourceKey`s. +Enchantments are no longer a static, built-in registry, and are instead a datapack registry. +With this change, methods that previously took an `Enchantment` will now take a `Holder` (which can be grabbed from a registry obtained through a level's `RegistryAccess`), and all fields in the `Enchantments` class are `ResourceKey`s. Additionally, your code should now use `EnchantmentEffectComponents` to determine whether an enchantment should affect something, instead of relying on direct level checks. For more information, we encourage you to consult [ChampionAsh](https://github.com/ChampionAsh5357)'s [1.21 primer](https://gist.github.com/ChampionAsh5357/d895a7b1a34341e19c80870720f9880f). From d2b582488f14188e8483c2615c7a102a91ac5d74 Mon Sep 17 00:00:00 2001 From: Matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> Date: Thu, 13 Jun 2024 19:49:00 +0300 Subject: [PATCH 8/8] Add the version --- content/news/21.0release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/21.0release.md b/content/news/21.0release.md index 46cd31f..a41ba9e 100644 --- a/content/news/21.0release.md +++ b/content/news/21.0release.md @@ -10,7 +10,7 @@ summary: "All you need to know about NeoForge 21.0, now released for Minecraft 1 description: "All you need to know about NeoForge 21.0, now released for Minecraft 1.21." --- -It's that time of the year again! Mojang has just released a new Minecraft major version: 1.21, followed by the first beta release of NeoForge 21.0. +It's that time of the year again! Mojang has just released a new Minecraft major version: 1.21, followed by the first beta release of NeoForge 21.0: `21.0.0-beta`. ## Previous changes Before diving into the changes brought by 1.21, we would like to quickly go through the changes made to NeoForge since 1.20.1, for those that haven't updated all the way to 1.20.6. You will also find the respective blog posts for each version, outlining important Vanilla changes: