接口 EntityLookup<T extends EntityLike>

  • 类型参数:
    T - the type of indexed entity
    所有已知实现类:
    SimpleEntityLookup

    public interface EntityLookup<T extends EntityLike>
    An interface for looking up entities.

    It supports iteration, accessing by ID, or by intersection with boxes.

    Mappings:
    Namespace Name
    official cnk
    intermediary net/minecraft/class_5577
    named net/minecraft/world/entity/EntityLookup
    • 方法详细资料

      • get

        @Nullable
        T get​(int id)
        Returns an entity by its network ID, or null if none is found.
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a(I)Lcnb;
        intermediary method_31804 Lnet/minecraft/class_5577;method_31804(I)Lnet/minecraft/class_5568;
        named get Lnet/minecraft/world/entity/EntityLookup;get(I)Lnet/minecraft/world/entity/EntityLike;
      • get

        @Nullable
        T get​(UUID uuid)
        Returns an entity by its UUID, or null if none is found.
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a(Ljava/util/UUID;)Lcnb;
        intermediary method_31808 Lnet/minecraft/class_5577;method_31808(Ljava/util/UUID;)Lnet/minecraft/class_5568;
        named get Lnet/minecraft/world/entity/EntityLookup;get(Ljava/util/UUID;)Lnet/minecraft/world/entity/EntityLike;
      • iterate

        Iterable<T> iterate()
        Returns an unmodifiable iterable over all entities in this lookup.
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a()Ljava/lang/Iterable;
        intermediary method_31803 Lnet/minecraft/class_5577;method_31803()Ljava/lang/Iterable;
        named iterate Lnet/minecraft/world/entity/EntityLookup;iterate()Ljava/lang/Iterable;
      • forEach

        <U extends T> void forEach​(TypeFilter<T,​U> filter,
                                   Consumer<U> action)
        Performs an action on each entity of type U within this lookup.
        类型参数:
        U - the type of entity to perform action on
        参数:
        filter - specifies the desired type of entity
        action - the action to perform
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a(Lcni;Ljava/util/function/Consumer;)V
        intermediary method_31806 Lnet/minecraft/class_5577;method_31806(Lnet/minecraft/class_5575;Ljava/util/function/Consumer;)V
        named forEach Lnet/minecraft/world/entity/EntityLookup;forEach(Lnet/minecraft/util/TypeFilter;Ljava/util/function/Consumer;)V
      • forEachIntersects

        void forEachIntersects​(Box box,
                               Consumer<T> action)
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a(Ldlv;Ljava/util/function/Consumer;)V
        intermediary method_31807 Lnet/minecraft/class_5577;method_31807(Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
        named forEachIntersects Lnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V
      • forEachIntersects

        <U extends T> void forEachIntersects​(TypeFilter<T,​U> filter,
                                             Box box,
                                             Consumer<U> action)
        Mappings:
        Namespace Name Mixin selector
        official a Lcnk;a(Lcni;Ldlv;Ljava/util/function/Consumer;)V
        intermediary method_31805 Lnet/minecraft/class_5577;method_31805(Lnet/minecraft/class_5575;Lnet/minecraft/class_238;Ljava/util/function/Consumer;)V
        named forEachIntersects Lnet/minecraft/world/entity/EntityLookup;forEachIntersects(Lnet/minecraft/util/TypeFilter;Lnet/minecraft/util/math/Box;Ljava/util/function/Consumer;)V