类 DataMapValueRemover.Default<T,R>

java.lang.Object
net.neoforged.neoforge.registries.datamaps.DataMapValueRemover.Default<T,R>
类型参数:
T - the type of the data
R - the registry type
所有已实现的接口:
DataMapValueRemover<R,T>
封闭接口:
DataMapValueRemover<R,T>

public static class DataMapValueRemover.Default<T,R> extends Object implements DataMapValueRemover<R,T>
A remover that completely removes the value.
  • 字段详细资料

  • 构造器详细资料

    • Default

      private Default()
  • 方法详细资料

    • defaultRemover

      public static <T, R> DataMapValueRemover.Default<T,R> defaultRemover()
    • codec

      public static <T, R> com.mojang.serialization.Codec<DataMapValueRemover.Default<T,R>> codec()
    • remove

      public Optional<T> remove(T value, Registry<R> registry, com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> source, R object)
      从接口复制的说明: DataMapValueRemover
      Remove the entry specified in this remover from the value.
      指定者:
      remove 在接口中 DataMapValueRemover<T,R>
      参数:
      value - the data to remove. Do NOT mutate this object. You should return copies instead, if you need to
      registry - the registry
      source - the source of the data
      object - the object to remove the data from
      返回:
      the remainder. If an empty optional, the value will be removed completely. Otherwise, this method returns the new value of the attached data.