Heart-of-the-Machine / heart-of-the-machine

Heart of the Machine ModFest 1.16 entry
MIT License
5 stars 0 forks source link

Register dimensions using mixins #1

Closed Kneelawk closed 4 years ago

Kneelawk commented 4 years ago

This moves dimension addition code to a set of mixins and an api built on top of them instead of using minecraft's custom dimension datapack loader. Adding dimensions using these mixins seems to work slightly better than using the datapack for four main reasons:

  1. When using the datapack dimension loader, Minecraft will complain to the user every time they try to create a new world or open an existing one.
  2. Customized generators specified in datapacks are forced to use a static seed for all worlds, requiring some mixin hacks to get them to use the seed of the current world.
  3. Settings for datapack dimensions will not show up in exported world settings.
  4. Datapack dimensions from mods use the same save directory structure as dimension from actual datapacks. (I know this one is small, but it can lead to some confusion.)