Wrap vanilla's 'default' biome registry in ForgeRegistry.

This should allow registering mod dimensions like in 1.16.1, while the data driven system is fleshed out.
This commit is contained in:
LexManos committed 2020-08-26 09:49:41 -07:00
1 parent 600e68cace
commit d8eaeabf3c
10 files changed
+104 -16

No files matched your search

@@ -56,6 +56,7 @@ import net.minecraft.util.registry.DefaultedRegistry;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.SimpleRegistry;
import net.minecraft.village.PointOfInterestType;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.ChunkStatus;
import net.minecraft.world.gen.DebugChunkGenerator;
import net.minecraft.world.gen.blockplacer.BlockPlacerType;
@@ -171,6 +172,9 @@ public class GameData
makeRegistry(FOLIAGE_PLACER_TYPES, c(FoliagePlacerType.class)).disableSaving().disableSync().create();
makeRegistry(TREE_DECORATOR_TYPES, c(TreeDecoratorType.class)).disableSaving().disableSync().create();
// Dynamic Worldgen
makeRegistry(BIOMES, Biome.class).create();
// Custom forge registries
makeRegistry(DATA_SERIALIZERS, DataSerializerEntry.class, 256 /*vanilla space*/, MAX_VARINT).disableSaving().disableOverrides().addCallback(SerializerCallbacks.INSTANCE).create();
makeRegistry(LOOT_MODIFIER_SERIALIZERS, c(GlobalLootModifierSerializer.class)).disableSaving().disableSync().create();