biome tagging debugging

This commit is contained in:
dfsek
2022-04-04 18:04:26 -07:00
parent 7d03d5a26b
commit 4b8efd1a36
2 changed files with 12 additions and 5 deletions

View File

@@ -118,11 +118,18 @@ public final class FabricUtil {
map.put(pair.getFirst(), new ArrayList<>(pair.getSecond().stream().toList())),
HashMap::putAll);
TERRA_BIOME_MAP.forEach((vanilla, terra) -> getEntry(registry, vanilla.getKey().orElseThrow().getValue()).orElseThrow()
.streamTags()
.forEach(tag -> collect.computeIfAbsent(tag, t -> new ArrayList<>()).add(getEntry(registry, terra.getKey().orElseThrow().getValue()).orElseThrow())));
TERRA_BIOME_MAP.forEach((vanilla, terra) -> {
RegistryEntry<net.minecraft.world.biome.Biome> entry = getEntry(registry,
vanilla.getKey().orElseThrow().getValue())
.orElseThrow();
logger.info(entry.getKey().orElseThrow().getValue() + " (vanilla for " + terra.getKey().orElseThrow().getValue() + ": " +
vanilla.streamTags().toList());
entry.streamTags()
.forEach(tag -> collect.computeIfAbsent(tag, t -> new ArrayList<>())
.add(getEntry(registry, terra.getKey().orElseThrow().getValue()).orElseThrow()));
});
registry.clearTags();
registry.populateTags(ImmutableMap.copyOf(collect));
registry.streamEntries()

View File

@@ -37,7 +37,7 @@ public class ProtoPlatformBiome implements PlatformBiome {
}
public RegistryEntry<Biome> get(Registry<net.minecraft.world.biome.Biome> registry) {
return registry.getOrCreateEntry(registry.getKey(registry.get(identifier)).orElseThrow());
return FabricUtil.getEntry(registry, identifier).orElseThrow();
}
@Override