mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Remove Only-vanilla-biomes restriction (#1373)
This commit is contained in:
parent
857090bdde
commit
7b775ca57d
@ -608,11 +608,22 @@ public final class PaperweightFaweAdapter extends CachedBukkitAdapter implements
|
||||
|
||||
@Override
|
||||
public int getInternalBiomeId(BiomeType biomeType) {
|
||||
if (biomeType.getId().startsWith("minecraft:")) {
|
||||
Biome biomeBase = CraftBlock.biomeToBiomeBase(
|
||||
MinecraftServer.getServer().registryAccess().ownedRegistryOrThrow(Registry.BIOME_REGISTRY),
|
||||
BukkitAdapter.adapt(biomeType)
|
||||
);
|
||||
return MinecraftServer.getServer().registryAccess().ownedRegistryOrThrow(Registry.BIOME_REGISTRY).getId(biomeBase);
|
||||
} else {
|
||||
WritableRegistry<Biome> biomeRegistry = MinecraftServer.getServer().registryAccess()
|
||||
.ownedRegistryOrThrow(Registry.BIOME_REGISTRY);
|
||||
|
||||
ResourceLocation resourceLocation = biomeRegistry.keySet().stream()
|
||||
.filter(resource -> resource.toString().equals(biomeType.getId()))
|
||||
.findAny().orElse(null);
|
||||
|
||||
return biomeRegistry.getId(biomeRegistry.get(resourceLocation));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user