接口 DataMapValueRemover<R,T>
- 类型参数:
R
- the type of the registry this remover is forT
- the data type
- 所有已知实现类:
DataMapValueRemover.Default
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
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
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 thevalue
.- 参数:
value
- the data to remove. Do NOT mutate this object. You should return copies instead, if you need toregistry
- the registrysource
- the source of the dataobject
- 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.
-