User Tools

Site Tools


Sidebar

Setup

These pages will help you setup a productive development environment and semi-automated releases.

Basics

These pages are essential must-reads when modding with Fabric, and modding Minecraft in general, if you are new to modding, it is recommended you read the following.

Items

Blocks and Block Entities

Data Generation

These pages will guide you through the Fabric Data Generation API, which generates JSON files through data generators.

:!: These pages are currently being written, some may not be available.

World Generation

Commands

These pages will guide you through Mojang's Brigadier library which allows you to create commands with complex arguments and actions.

Events

These pages will guide you through using the many events included in Fabric API, and how to create your own events for you or other mods to use.

Entities

Fluids

Mixins & ASM

These pages will guide you through the usage of SpongePowered's Mixin library, which is a highly complex topic. We recommend you read these pages thoroughly.

Miscellaneous

Yarn

Contribute to Fabric

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