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
(CompoundTag pTag, RegistryAccess pRegistryAccess, ResourceKey<? extends Registry<T>> pRegistryKey) static <T> void
writeVariant
(CompoundTag pTag, 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(CompoundTag pTag, RegistryAccess pRegistryAccess, ResourceKey<? extends Registry<T>> pRegistryKey)
-