mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-12 18:54:01 +00:00
Remove Only-vanilla-biomes restriction (#1373)
This commit is contained in:
parent
857090bdde
commit
7b775ca57d
worldedit-bukkit/adapters
adapter-1_17_1/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_17_R1_2
adapter-legacy/src/main/resources
@ -608,11 +608,22 @@ public final class PaperweightFaweAdapter extends CachedBukkitAdapter implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInternalBiomeId(BiomeType biomeType) {
|
public int getInternalBiomeId(BiomeType biomeType) {
|
||||||
Biome biomeBase = CraftBlock.biomeToBiomeBase(
|
if (biomeType.getId().startsWith("minecraft:")) {
|
||||||
MinecraftServer.getServer().registryAccess().ownedRegistryOrThrow(Registry.BIOME_REGISTRY),
|
Biome biomeBase = CraftBlock.biomeToBiomeBase(
|
||||||
BukkitAdapter.adapt(biomeType)
|
MinecraftServer.getServer().registryAccess().ownedRegistryOrThrow(Registry.BIOME_REGISTRY),
|
||||||
);
|
BukkitAdapter.adapt(biomeType)
|
||||||
return MinecraftServer.getServer().registryAccess().ownedRegistryOrThrow(Registry.BIOME_REGISTRY).getId(biomeBase);
|
);
|
||||||
|
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
|
@Override
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user