Package net.frozenblock.lib.entity.api
Class WolfVariantBiomeRegistry
java.lang.Object
net.frozenblock.lib.entity.api.WolfVariantBiomeRegistry
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic @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 registeredWolfVariantin 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 registeredWolfVariantin a biome, if possible, inResourceKeyform.static voidregister(@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 aWolfVariantto a biome.
-
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 aWolfVariantto a biome.- Parameters:
biome- The biome to register theWolfVariantto.wolfVariant- theWolfVariantto 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 registeredWolfVariantin a biome, if possible, inResourceKeyform.- Parameters:
biome- The biome to check for a registeredWolfVariantin.- Returns:
- the found
WolfVariant, if possible, inResourceKeyform.
-
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 registeredWolfVariantin a biome, if possible.- Parameters:
biome- The biome to check for a registeredWolfVariantin.- Returns:
- the found
WolfVariant, if possible.
-