Class PacketDistributor.TargetPoint

  • Enclosing class:
    PacketDistributor<T>

    public static final class PacketDistributor.TargetPoint
    extends java.lang.Object
    • Field Detail

      • x

        private final double x
      • y

        private final double y
      • z

        private final double z
      • r2

        private final double r2
    • Constructor Detail

      • TargetPoint

        public TargetPoint​(ServerPlayerEntity excluded,
                           double x,
                           double y,
                           double z,
                           double r2,
                           RegistryKey<World> dim)
        A target point with excluded entity
        Parameters:
        excluded - Entity to exclude
        x - X
        y - Y
        z - Z
        r2 - Radius
        dim - DimensionType
      • TargetPoint

        public TargetPoint​(double x,
                           double y,
                           double z,
                           double r2,
                           RegistryKey<World> dim)
        A target point without excluded entity
        Parameters:
        x - X
        y - Y
        z - Z
        r2 - Radius
        dim - DimensionType
    • Method Detail

      • p

        public static java.util.function.Supplier<PacketDistributor.TargetPoint> p​(double x,
                                                                                   double y,
                                                                                   double z,
                                                                                   double r2,
                                                                                   RegistryKey<World> dim)
        Helper to build a TargetPoint without excluded Entity
        Parameters:
        x - X
        y - Y
        z - Z
        r2 - Radius
        dim - DimensionType
        Returns:
        A TargetPoint supplier