Finalised wolves

This commit is contained in:
OakLoaf
2025-06-19 21:44:24 +01:00
parent d71c6bb25f
commit 5446b729f9
3 changed files with 12 additions and 12 deletions
@@ -95,14 +95,15 @@ public class CommonListener implements Listener {
NamespacedKey biomeKey = wolf.getWorld().getBiome(wolf.getLocation()).getKey();
pack.getBiomeProvider().stream()
.filter(biome -> ((BukkitPlatformBiome) biome.getPlatformBiome()).getHandle()
.getKey().equals(biomeKey))
.filter(biome -> {
NamespacedKey key = ((BukkitPlatformBiome) biome.getPlatformBiome()).getContext()
.get(BukkitBiomeInfo.class)
.biomeKey();
return key.equals(biomeKey);
})
.findFirst()
.ifPresent(biome -> {
NamespacedKey vanillaBiomeKey = ((BukkitPlatformBiome) biome.getPlatformBiome()).getContext()
.get(BukkitBiomeInfo.class)
.vanillaBiomeKey();
NamespacedKey vanillaBiomeKey = ((BukkitPlatformBiome) biome.getPlatformBiome()).getHandle().getKey();
switch(vanillaBiomeKey.toString()) {
case "minecraft:snowy_taiga" -> wolf.setVariant(Variant.ASHEN);
case "minecraft:old_growth_pine_taiga" -> wolf.setVariant(Variant.BLACK);
@@ -5,4 +5,4 @@ import com.dfsek.terra.api.properties.Properties;
import org.bukkit.NamespacedKey;
public record BukkitBiomeInfo(NamespacedKey vanillaBiomeKey) implements Properties {}
public record BukkitBiomeInfo(NamespacedKey biomeKey) implements Properties {}