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

@@ -21,6 +21,7 @@ package net.minecraftforge.registries;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.Random;
@@ -44,7 +45,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
public NamespacedWrapper(ForgeRegistry<T> owner)
{
super(RegistryKey.func_240904_a_(owner.getRegistryName()), Lifecycle.experimental());
super(owner.getRegistryKey(), Lifecycle.experimental());
this.delegate = owner;
}
@@ -131,6 +132,12 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
return this.delegate.getKeys();
}
@Override
public Set<Map.Entry<RegistryKey<T>, T>> func_239659_c_()
{
return this.delegate.getEntries();
}
@Override
@Nullable
public T getRandom(Random random)