Interface PropertyFactory<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PropertyFactory<T>
Functional interface responsible for instantiating configuration properties at runtime. Utilized by the dynamic registry to construct properties from deserialized network or disk definitions.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String resourceName, Group group, Object defaultValue, Object min, Object max, com.mojang.serialization.Codec<?> codec)
    Constructs a specialized property instance matching structural coordinates.
  • Method Details

    • create

      Property<T> create(String resourceName, Group group, Object defaultValue, Object min, Object max, com.mojang.serialization.Codec<?> codec)
      Constructs a specialized property instance matching structural coordinates.
      Parameters:
      resourceName - The exact registry identifier of the property.
      group - The parent group structural binding.
      defaultValue - The baseline value applied prior to network sync or disk loading.
      min - The lower validation boundary. Nullable depending on implementation constraints.
      max - The upper validation boundary. Nullable depending on implementation constraints.
      codec - The codec required for serialization and deserialization.
      Returns:
      A dynamically allocated configuration property instance.