Class EntitySelector


  • public class EntitySelector
    extends java.lang.Object
    • Field Detail

      • maxResults

        private final int maxResults
      • includesEntities

        private final boolean includesEntities
      • worldLimited

        private final boolean worldLimited
      • predicate

        private final java.util.function.Predicate<Entity> predicate
      • position

        private final java.util.function.Function<Vector3d,​Vector3d> position
      • order

        private final java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> order
      • currentEntity

        private final boolean currentEntity
      • playerName

        @Nullable
        private final java.lang.String playerName
      • entityUUID

        @Nullable
        private final java.util.UUID entityUUID
      • type

        @Nullable
        private final EntityType<?> type
      • usesSelector

        private final boolean usesSelector
    • Constructor Detail

      • EntitySelector

        public EntitySelector​(int p_i50800_1_,
                              boolean p_i50800_2_,
                              boolean p_i50800_3_,
                              java.util.function.Predicate<Entity> p_i50800_4_,
                              MinMaxBounds.FloatBound p_i50800_5_,
                              java.util.function.Function<Vector3d,​Vector3d> p_i50800_6_,
                              @Nullable
                              AxisAlignedBB p_i50800_7_,
                              java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> p_i50800_8_,
                              boolean p_i50800_9_,
                              @Nullable
                              java.lang.String p_i50800_10_,
                              @Nullable
                              java.util.UUID p_i50800_11_,
                              @Nullable
                              EntityType<?> p_i50800_12_,
                              boolean p_i50800_13_)
    • Method Detail

      • getMaxResults

        public int getMaxResults()
      • includesEntities

        public boolean includesEntities()
      • isSelfSelector

        public boolean isSelfSelector()
      • isWorldLimited

        public boolean isWorldLimited()
      • checkPermissions

        private void checkPermissions​(CommandSource p_210324_1_)
                               throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • findSingleEntity

        public Entity findSingleEntity​(CommandSource p_197340_1_)
                                throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • findEntities

        public java.util.List<? extends Entity> findEntities​(CommandSource p_197341_1_)
                                                      throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • addEntities

        private void addEntities​(java.util.List<Entity> p_197348_1_,
                                 ServerWorld p_197348_2_,
                                 Vector3d p_197348_3_,
                                 java.util.function.Predicate<Entity> p_197348_4_)
      • findSinglePlayer

        public ServerPlayerEntity findSinglePlayer​(CommandSource p_197347_1_)
                                            throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • findPlayers

        public java.util.List<ServerPlayerEntity> findPlayers​(CommandSource p_197342_1_)
                                                       throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • getPredicate

        private java.util.function.Predicate<Entity> getPredicate​(Vector3d p_197349_1_)
      • sortAndLimit

        private <T extends Entity> java.util.List<T> sortAndLimit​(Vector3d p_197345_1_,
                                                                  java.util.List<T> p_197345_2_)