Interface TypeFilter<B,T extends B>

Type Parameters:
B - the base type that's the input to the filter
T - 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
official dmy
intermediary net/minecraft/class_5575
named net/minecraft/util/TypeFilter
  • Method Summary

    Modifier and Type
    Method
    Description
    downcast(B obj)
    Checks if the argument can be converted to the type T and returns the argument, or null otherwise.
    Class<? extends B>
     
    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.
    static <B, T extends B>
    TypeFilter<B,T>
    method_55374(Class<T> class2)
     
  • Method Details

    • 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 a Ldmy;a(Ljava/lang/Class;)Ldmy;
      intermediary method_31795 Lnet/minecraft/class_5575;method_31795(Ljava/lang/Class;)Lnet/minecraft/class_5575;
      named instanceOf Lnet/minecraft/util/TypeFilter;instanceOf(Ljava/lang/Class;)Lnet/minecraft/util/TypeFilter;
    • method_55374

      static <B, T extends B> TypeFilter<B,T> method_55374(Class<T> class2)
      Mappings:
      Namespace Name Mixin selector
      official b Ldmy;b(Ljava/lang/Class;)Ldmy;
      intermediary method_55374 Lnet/minecraft/class_5575;method_55374(Ljava/lang/Class;)Lnet/minecraft/class_5575;
      named method_55374 Lnet/minecraft/util/TypeFilter;method_55374(Ljava/lang/Class;)Lnet/minecraft/util/TypeFilter;
    • downcast

      @Nullable T downcast(B obj)
      Checks if the argument can be converted to the type T and returns the argument, or null otherwise.
      Mappings:
      Namespace Name Mixin selector
      official a Ldmy;a(Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_31796 Lnet/minecraft/class_5575;method_31796(Ljava/lang/Object;)Ljava/lang/Object;
      named downcast Lnet/minecraft/util/TypeFilter;downcast(Ljava/lang/Object;)Ljava/lang/Object;
    • getBaseClass

      Class<? extends B> getBaseClass()
      Mappings:
      Namespace Name Mixin selector
      official a Ldmy;a()Ljava/lang/Class;
      intermediary method_31794 Lnet/minecraft/class_5575;method_31794()Ljava/lang/Class;
      named getBaseClass Lnet/minecraft/util/TypeFilter;getBaseClass()Ljava/lang/Class;