mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-01 15:37:24 +00:00
Corrected checks
This commit is contained in:
parent
d8524603c6
commit
d71c6bb25f
@ -95,12 +95,14 @@ public class CommonListener implements Listener {
|
|||||||
|
|
||||||
NamespacedKey biomeKey = wolf.getWorld().getBiome(wolf.getLocation()).getKey();
|
NamespacedKey biomeKey = wolf.getWorld().getBiome(wolf.getLocation()).getKey();
|
||||||
pack.getBiomeProvider().stream()
|
pack.getBiomeProvider().stream()
|
||||||
.map(biome -> ((BukkitPlatformBiome) biome.getPlatformBiome()).getContext()
|
.filter(biome -> ((BukkitPlatformBiome) biome.getPlatformBiome()).getHandle()
|
||||||
.get(BukkitBiomeInfo.class)
|
.getKey().equals(biomeKey))
|
||||||
.vanillaBiomeKey())
|
|
||||||
.filter(biomeKey::equals)
|
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresent(vanillaBiomeKey -> {
|
.ifPresent(biome -> {
|
||||||
|
NamespacedKey vanillaBiomeKey = ((BukkitPlatformBiome) biome.getPlatformBiome()).getContext()
|
||||||
|
.get(BukkitBiomeInfo.class)
|
||||||
|
.vanillaBiomeKey();
|
||||||
|
|
||||||
switch(vanillaBiomeKey.toString()) {
|
switch(vanillaBiomeKey.toString()) {
|
||||||
case "minecraft:snowy_taiga" -> wolf.setVariant(Variant.ASHEN);
|
case "minecraft:snowy_taiga" -> wolf.setVariant(Variant.ASHEN);
|
||||||
case "minecraft:old_growth_pine_taiga" -> wolf.setVariant(Variant.BLACK);
|
case "minecraft:old_growth_pine_taiga" -> wolf.setVariant(Variant.BLACK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user