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 pRegistryAccess, ResourceKey<? extends Registry<T>> pRegistryKey) static <T> Holder
<T> getDefaultOrAny
(RegistryAccess pRegistryAccess, ResourceKey<T> pKey) readVariant
(ValueInput pInput, ResourceKey<? extends Registry<T>> pRegistryKey) static <T extends PriorityProvider<SpawnContext,
?>>
Optional<Holder.Reference<T>> selectVariantToSpawn
(SpawnContext pContext, ResourceKey<Registry<T>> pRegistryKey) static <T> void
writeVariant
(ValueOutput pOutput, Holder<T> pVariant)
-
Field Details
-
TAG_VARIANT
- See Also:
-
-
Constructor Details
-
VariantUtils
public VariantUtils()
-
-
Method Details
-
getDefaultOrAny
-
getAny
public static <T> Holder<T> getAny(RegistryAccess pRegistryAccess, ResourceKey<? extends Registry<T>> pRegistryKey) -
writeVariant
-
readVariant
public static <T> Optional<Holder<T>> readVariant(ValueInput pInput, ResourceKey<? extends Registry<T>> pRegistryKey) -
selectVariantToSpawn
public static <T extends PriorityProvider<SpawnContext,?>> Optional<Holder.Reference<T>> selectVariantToSpawn(SpawnContext pContext, ResourceKey<Registry<T>> pRegistryKey)
-