Class WolfVariantBiomeRegistry

java.lang.Object
net.frozenblock.lib.entity.api.WolfVariantBiomeRegistry

public class WolfVariantBiomeRegistry extends Object
A tool to easily add a WolfVariant to a biome without impacting data-driven content.

Multiple WolfVariants can be added to a single biome, which will result in a random WolfVariant being picked each spawn.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull Optional<net.minecraft.world.entity.animal.WolfVariant>
    get(@NotNull net.minecraft.core.RegistryAccess registryManager, net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome)
    Returns a registered WolfVariant in a biome, if possible.
    static @NotNull Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.animal.WolfVariant>>
    get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome)
    Returns a registered WolfVariant in a biome, if possible, in ResourceKey form.
    static void
    register(@NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome, @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.entity.animal.WolfVariant> wolfVariant)
    Registers a WolfVariant to a biome.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WolfVariantBiomeRegistry

      public WolfVariantBiomeRegistry()
  • Method Details

    • register

      public static void register(@NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome, @NotNull @NotNull net.minecraft.resources.ResourceKey<net.minecraft.world.entity.animal.WolfVariant> wolfVariant)
      Registers a WolfVariant to a biome.
      Parameters:
      biome - The biome to register the WolfVariant to.
      wolfVariant - the WolfVariant to be added.
    • get

      @NotNull public static @NotNull Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.animal.WolfVariant>> get(net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome)
      Returns a registered WolfVariant in a biome, if possible, in ResourceKey form.
      Parameters:
      biome - The biome to check for a registered WolfVariant in.
      Returns:
      the found WolfVariant, if possible, in ResourceKey form.
    • get

      @NotNull public static @NotNull Optional<net.minecraft.world.entity.animal.WolfVariant> get(@NotNull @NotNull net.minecraft.core.RegistryAccess registryManager, net.minecraft.resources.ResourceKey<net.minecraft.world.level.biome.Biome> biome)
      Returns a registered WolfVariant in a biome, if possible.
      Parameters:
      biome - The biome to check for a registered WolfVariant in.
      Returns:
      the found WolfVariant, if possible.