Skip to content

Instantly share code, notes, and snippets.

@apple502j
Last active June 8, 2022 08:49
Show Gist options
  • Save apple502j/f2783990bac68a35acef2f7e4c901a2a to your computer and use it in GitHub Desktop.
Save apple502j/f2783990bac68a35acef2f7e4c901a2a to your computer and use it in GitHub Desktop.

22w16b docs

Known issues

  • Game can crash while ticking some mobs (parrots, allays, etc). MC-250321

Changes

Loader/Loom update required

Minecraft now uses LWJGL version 3.3.1, which contains Java 19-compiled class files. While you do not need Java 19 to play or build mods, this means Fabric Loader needs to be updated to version 0.14.0 (currently beta), and the same goes to Loom (refresh dependencies). The new Fabric Loader also contains some new features and improvements; the most significant one being ability to mixin into libraries like authlib.

Big Text refactor

Texts were split into text contents and structures. "Text contents" include what was previously called LiteralText, TranslatableText, etc (which no longer subclass or implement Text), and "text structure" is Text/MutableText (now a class with implementation). Text contents implement class_7417/TextContent. Various NBT text implementations have now been changed to "data sources", which NbtContent will use to query the data.

Here are some upcoming yarn renames (see FabricMC/yarn#3105):

Old New
BlockNbtText BlockNbtDataSource
EntityNbtText EntityNbtDataSource
KeybindText KeybindTextContent
LiteralText LiteralTextContent
NbtText NbtTextContent
ScoreText ScoreTextContent
SelectorText SelectorTextContent
StorageNbtText StorageNbtDataSource
TranslatableText TranslatableTextContent

This also means the methods on creating Text instances have changed. Previously you called one of the constructors of the classes. However, due to the split, they no longer create a Text. Instead, you need to call the static methods in Text:

Old Class New Method
LiteralText of
TranslatableText translatable
KeybindText keybind
NbtText nbt
ScoreText score
SelectorText selector

(Note: there are also Text#literal which acts like of except not allowing null, and Text#empty() to indicate empty text.)

If your class took TranslatableText etc, it's likely that you want to change it to Text. Also if you somehow have a TextContent and you want to make it into a Text, try MutableText#of.

Misc changes

  • AbstractRandom#nextPredictable was added, returning a random double with a triangular distribution. The values are more "predictable" than gaussian random values.
  • Rendering code has changed significantly, mostly to remove unnecessary binding of buffers.
  • Painting received some refactors. PaintingSpawnS2CPacket was removed.
  • Tracked entity positions have a new wrapper class (net.minecraft.entity.TrackedPosition). Code that previously existed on EntityS2CPacket etc have been moved to that class. You can access it via Entity#getTrackedPosition/updateTrackedPosition.
  • Save file loading (for singleplayer world screen) have changed. Arguments that took the world folder as File now take either Path or a new record LevelStorage.LevelSave.
  • Util#combineCancellable was added. This works like Util#combine except it cancels all other futures when one throws.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment