Class VariantUtils
java.lang.Object
net.minecraft.world.entity.variant.VariantUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Holder<T> getAny(RegistryAccess registryAccess, ResourceKey<? extends Registry<T>> registryId) static <T> Holder<T> getDefaultOrAny(RegistryAccess registryAccess, ResourceKey<T> id) readVariant(ValueInput input, ResourceKey<? extends Registry<T>> registryId) static <T extends PriorityProvider<SpawnContext, ?>>
Optional<Holder.Reference<T>> selectVariantToSpawn(SpawnContext context, ResourceKey<Registry<T>> variantRegistry) static <T> voidwriteVariant(ValueOutput output, Holder<T> holder)
-
Field Details
-
TAG_VARIANT
- See Also:
-
-
Constructor Details
-
VariantUtils
public VariantUtils()
-
-
Method Details
-
getDefaultOrAny
-
getAny
public static <T> Holder<T> getAny(RegistryAccess registryAccess, ResourceKey<? extends Registry<T>> registryId) -
writeVariant
-
readVariant
public static <T> Optional<Holder<T>> readVariant(ValueInput input, ResourceKey<? extends Registry<T>> registryId) -
selectVariantToSpawn
public static <T extends PriorityProvider<SpawnContext, ?>> Optional<Holder.Reference<T>> selectVariantToSpawn(SpawnContext context, ResourceKey<Registry<T>> variantRegistry)
-