接口 DataMapValueRemover<R,T>

类型参数:
R - the type of the registry this remover is for
T - the data type
所有已知实现类:
DataMapValueRemover.Default
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface DataMapValueRemover<R,T>
An interface used to remove values from registry data maps. This allows "decomposing" the data and removing only a specific part of it (like a specific key in the case of map-based data).
API Note:
This is only useful for AdvancedDataMapType.
  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    static class 
    A remover that completely removes the value.
  • 方法概要

    修饰符和类型
    方法
    说明
    remove(T value, Registry<R> registry, com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> source, R object)
    Remove the entry specified in this remover from the value.
  • 方法详细资料

    • remove

      Optional<T> remove(T value, Registry<R> registry, com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>> source, R object)
      Remove the entry specified in this remover from the value.
      参数:
      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.