接口 TypeFilter<B,T extends B>
-
- 类型参数:
B- the base type that's the input to the filterT- the desired type of this filter
- 所有已知实现类:
EntityType
public interface TypeFilter<B,T extends B>A filter that determines if an object of some supertypeBcan be treated as an object of some subtypeT.- Mappings:
Namespace Name official cniintermediary net/minecraft/class_5575named net/minecraft/util/TypeFilter
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 Tdowncast(B obj)Checks if the argument can be converted to the typeTand returns the argument, ornullotherwise.Class<? extends B>getBaseClass()static <B,T extends B>
TypeFilter<B,T>instanceOf(Class<T> cls)Creates a filter whose filtering condition is whether the object is an instance of the given class.
-
-
-
方法详细资料
-
instanceOf
static <B,T extends B> TypeFilter<B,T> instanceOf(Class<T> cls)
Creates a filter whose filtering condition is whether the object is an instance of the given class.- Mappings:
Namespace Name Mixin selector official aLcni;a(Ljava/lang/Class;)Lcni;intermediary method_31795Lnet/minecraft/class_5575;method_31795(Ljava/lang/Class;)Lnet/minecraft/class_5575;named instanceOfLnet/minecraft/util/TypeFilter;instanceOf(Ljava/lang/Class;)Lnet/minecraft/util/TypeFilter;
-
downcast
@Nullable T downcast(B obj)
Checks if the argument can be converted to the typeTand returns the argument, ornullotherwise.- Mappings:
Namespace Name Mixin selector official aLcni;a(Ljava/lang/Object;)Ljava/lang/Object;intermediary method_31796Lnet/minecraft/class_5575;method_31796(Ljava/lang/Object;)Ljava/lang/Object;named downcastLnet/minecraft/util/TypeFilter;downcast(Ljava/lang/Object;)Ljava/lang/Object;
-
-