Package net.minecraft.util
Interface TypeFilter<B,T extends B>
- Type Parameters:
B- the base type that's the input to the filterT- the desired type of this filter
- All Known Implementing Classes:
EntityType
public interface TypeFilter<B,T extends B>
A filter that determines if an object of some supertype
B can be
treated as an object of some subtype T.- Mappings:
Namespace Name named net/minecraft/util/TypeFilterintermediary net/minecraft/class_5575official eqx
-
Method Summary
Modifier and TypeMethodDescriptionChecks if the argument can be converted to the typeTand returns the argument, ornullotherwise.static <B,T extends B>
TypeFilter<B, T> Creates a filter whose filtering condition is whether the object's class is equal to the given class.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.
-
Method Details
-
instanceOf
Creates a filter whose filtering condition is whether the object is an instance of the given class.- Mappings:
Namespace Name Mixin selector named instanceOfLnet/minecraft/util/TypeFilter;instanceOf(Ljava/lang/Class;)Lnet/minecraft/util/TypeFilter;intermediary method_31795Lnet/minecraft/class_5575;method_31795(Ljava/lang/Class;)Lnet/minecraft/class_5575;official aLeqx;a(Ljava/lang/Class;)Leqx;
-
equals
Creates a filter whose filtering condition is whether the object's class is equal to the given class.- Mappings:
Namespace Name Mixin selector named equalsLnet/minecraft/util/TypeFilter;equals(Ljava/lang/Class;)Lnet/minecraft/util/TypeFilter;intermediary method_55374Lnet/minecraft/class_5575;method_55374(Ljava/lang/Class;)Lnet/minecraft/class_5575;official bLeqx;b(Ljava/lang/Class;)Leqx;
-
downcast
Checks if the argument can be converted to the typeTand returns the argument, ornullotherwise.- Mappings:
Namespace Name Mixin selector named downcastLnet/minecraft/util/TypeFilter;downcast(Ljava/lang/Object;)Ljava/lang/Object;intermediary method_31796Lnet/minecraft/class_5575;method_31796(Ljava/lang/Object;)Ljava/lang/Object;official aLeqx;a(Ljava/lang/Object;)Ljava/lang/Object;
-
getBaseClass
- Mappings:
Namespace Name Mixin selector named getBaseClassLnet/minecraft/util/TypeFilter;getBaseClass()Ljava/lang/Class;intermediary method_31794Lnet/minecraft/class_5575;method_31794()Ljava/lang/Class;official aLeqx;a()Ljava/lang/Class;
-