mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-19 07:11:14 +00:00
Finalised wolves
This commit is contained in:
+7
-6
@@ -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);
|
||||
|
||||
+1
-1
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user