Skip to content

Instantly share code, notes, and snippets.

@jaskarth
Last active June 6, 2020 14:57
Show Gist options
  • Save jaskarth/511e038714fb5f4fb59c06a8aa6c0281 to your computer and use it in GitHub Desktop.
Save jaskarth/511e038714fb5f4fb59c06a8aa6c0281 to your computer and use it in GitHub Desktop.
1.16 update guide

Hey! I was inspired by williewuss's primer to create a guide on what is changing in 1.16, from mostly a worldgen perspective. This guide is just an overview on what Mojang changed, not what Forge changed.
However, I know that not everyone makes worldgen mods so I'll also include a section on non-worldgen stuff.
For the Forge people, this guide uses Yarn names! You can find the conversion at the bottom.
If you have more info, feel free to contact me and I'll add it to this list.

Cheers, SuperCoder79

Last updated: 6/6/2020, 1.16-pre2

Not worldgen

  • There is now a new type of Identifier called a RegistryKey, which is a mapping of a registry to an Identifier.
  • Block and BlockState have been split into an abstract class and their implementation.
  • BlockPos and BlockPos.Mutable have been refactored quite a bit, and BlockPos.PooledMutable has been deleted.
  • The advancement format has changed, there was a minecraft.net article about it a while ago (TODO add that here)
  • Most uses for Dynamic<?> for serialization has been replaced with Codec<?>. It's a pretty technical change so I'll have to make a bigger explanation on that eventually
  • Entity Attributes have been made much more generic than they were before, and they're now stored in a central location (needs more info).
  • GUIs have been changed slightly to use the new rendering system with MatrixStacks.
  • Gamerule stuff has been changed a little bit.
  • There is now a new world interface! Yaaaaaaay! It's called ServerWorldAccess and it's literally just WorldAccess with a getSeed() function. That's it.
  • LevelProperties has been given the world treatment, as they are now split into multiple interfaces.
  • Some AI stuff changed, noteably with the hoglins and piglins, as they use helper classes filled with static methods (great programming, i know) instead of the old AI system for certain things.

Worldgen

There have been a lot of worldgen changes. Basically, if you touched anything with worldgen you have work to do.

Features

  • The parameters for features have changed a bit, as they now take in a ServerWorldAccess instead of an WorldAccess/IWorld and the have a new field, for a StructureAccessor.
  • The StructureAccessor parameter allows you to detect the structures in the current chunk. Vanilla uses this to stop lake generation in chunks with villages.

Structures

  • Structure gen has recieved a pretty major overhaul, with them becoming more distinct from normal features. They don't even extend Feature anymore!
  • Most of the user facing functions haven't changed much, but some of the legacy stuff like getRadius() and getName() has been removed.
  • Some stuff has been streamlined as well, such as the shouldStartAt method, as it assumes that structure can fit in biome instead of needing an explicit check unless it's a massive structure (mansions and monuments)
  • Registration has also changed, as biomes now just set the structure with a setStructure call, using a wrapper class for configs.
  • Generally speaking, structure gen has been streamlined a bit.

Tree Generation

  • Tree generation has been changed.... again.
  • Essentially, it's been flattened and split into FoliagePlacers, TrunkPlacers, and FeatureSizes.
  • First, the tree's FeatureSize checks if it can spawn in a given position.
  • TrunkPlacerss then generate the trunk and then generate places for leaves to generate through TreeNodes.
  • For each TreeNode, the tree's FoliagePlacer generates it's leaves.
  • If you have FoliagePlacers from 1.15, my advice to you is to throw it out and rewrite it. Unless you're a tree gen god it's probably faster and easier that way.

Biomes

  • Nether Biomes! Yay!
  • Biomes' water color and water fog color parameters have now been moved to a new class called BiomeEffects, where you can now specify other things as well, such as particles, fog color, and sounds.
  • Fog color specified in the effects will only work in the Nether. It won't work in the Overworld.
  • You can now have particles spawn in biomes, this works for both the nether and the overworld. You can make some cool stuff with this, like flying sand in desert biomes.
  • Sounds can also be specified per biome, and you can specify 3 different sound types.
  • Loop sounds are continously played when a player is in the biome (useful for ocean waves on beaches).
  • Mood sounds are played when the player is in an area with 0 sky light and less than 7 light. Overworld biomes use the cave sounds as mood sounds while the nether biomes have their own unique variants.
  • Additions sounds have a 1.1% chance to play every tick. The nether biomes use these to add to their atmosphere, but you can probably use them for other stuff in the overworld, like bird sounds or something.
  • Now have a new field for MixedNoisePoints, which are theoretical points on a 4d plane used for biome calculation in the Nether. I know that sounds really confusing but it's not that bad, keep reading to find out how they're used.

Biome Sources

  • Now have most of the location stuff built in, so you don't need to copy it from the overworld one anymore.
  • The nether uses a new type of biome generator, which has 4 perlin noise generators calculating the values for each plane. The biome with the closest MixedNoisePoint to the calculated value is the chosen biome.
  • For reference, this is how the Alpha and Beta biome generation used to work, but instead of temperature and rainfall there are now 4 values.
  • This does come with a lot of caveats however: if two biomes use the same MixedNoisePoint, one of them will be overwritten. In addition, every biome added to the nether makes everything smaller - so nether biome mod incompatibility may become a real problem.
  • For the record, this generation is NOT 3D!!!! It's 2D generation that is slightly magnified and distorted in a 3D fashion, so while certain bits of the nether are 3D, it only happens on biome edges.

Chunk Generators

  • SurfaceChunkGenerator has been completely refactored and made final. All of the data passed to it now is now controlled by data classes, making it much more limited.
  • If you want to keep vanilla's look and feel while doing more unique stuff, your only choice now is to copy the entire class.
  • ChunkGenerators now need to implement a getColumnSample method, which returns a BlockView/IBlockReader implementation of all of the blocks in a given column, usually through a VerticalBlockSample.
  • This is needed for ruined portals as well as fossils to properly generate.

Dimensions

  • Dimensions are gone. No, seriously. Dimensions have been replaced by a single DimensionType class, which has a constructor with booleans for stuff you can toggle. Anything else and you're gonna need mixin/forge hooks for stuff.
  • This is because of the 20w21a change with infinite dimensions available to map creators.

MCP Conversion

MCP Warning!
  • Identifier -> ResourceLocation
  • WorldAccess -> IWorld
  • LevelProperties -> WorldInfo
  • MatrixStack -> PoseStack
  • SurfaceChunkGenerator -> NoiseChunkGenerator
  • BiomeSource -> BiomeProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment