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>> registryKey) static <T> Holder<T> getDefaultOrAny(RegistryAccess registryAccess, ResourceKey<T> key) readVariant(CompoundTag tag, RegistryAccess registryAccess, ResourceKey<? extends Registry<T>> registryKey) static <T> voidwriteVariant(CompoundTag tag, Holder<T> variant)
-
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>> registryKey) -
writeVariant
-
readVariant
public static <T> Optional<Holder<T>> readVariant(CompoundTag tag, RegistryAccess registryAccess, ResourceKey<? extends Registry<T>> registryKey)
-