User Tools

Site Tools


Sidebar

Setup

Basics

Items

Blocks and Block Entities

Fluids

Entities

World Generation

Miscellaneous

Events

Mixins

Advanced

Tutorials for Minecraft 1.15

Tutorials for Minecraft 1.14

Documentation

tutorial:datafixer:start

DataFixers: An introduction

A forewarning

DataFixing is a very complex subject and we do not take any responsibility for damaged worlds and or saves. If you are trying something out, please backup your worlds.

Most importantly DO NOT COPY CODE WITHOUT READING WHAT IT DOES.

What is a DataFixer? And why would you use one?

The name honestly explains what it does, it fixes data by converting an old data format to a newer one. DataFixers are used in cases ranging from renaming an item to The Flattening inside Minecraft.

Okay so how do you use it

Hold on a second you are probably going to need a lot of context first or you will be entirely confused, so just read on a bit more.

DataFixerUpper

DataFixerUpper (DFU) is the library Mojang created for DataFixing. Without getting into 10 academic articles it uses Profunctor Optics and some other mathematical magic to transform the datasets.

What can it do?

DFU within Minecraft has been used to do many things including:

  • The Flattening.
  • Changing entity NBT so UUIDs are stored as Greatest and Least Significant bits instead of a String.
  • Converting villagers to new 1.14 data format.
  • Renaming Biomes.
  • Renaming Entities.
  • Renaming Items (both on ground, in entities and in BlockEntities)
  • Changing block names.
  • Anything else if you are willing to try to wrap your head around DSL (covered later on).

So what's next?

Next up is learning about Schemas here

To return to the Main DataFixer page click here

tutorial/datafixer/start.txt · Last modified: 2020/01/17 03:39 by i509vcb