-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b26d79f
commit 1cc880d
Showing
1 changed file
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Enchantment>`, and all fields in the `Enchantments` class are `ResourceKey<Enchantment>`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 == <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. |
1cc880d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploying with Cloudflare Pages