Class PacketDistributor.TargetPoint

java.lang.Object
net.minecraftforge.network.PacketDistributor.TargetPoint
Enclosing class:
PacketDistributor<T>

public static final class PacketDistributor.TargetPoint extends Object
  • Field Details

    • excluded

      private final ServerPlayer excluded
    • x

      private final double x
    • y

      private final double y
    • z

      private final double z
    • r2

      private final double r2
    • dim

      private final ResourceKey<Level> dim
  • Constructor Details

    • TargetPoint

      public TargetPoint(ServerPlayer excluded, double x, double y, double z, double r2, ResourceKey<Level> 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, ResourceKey<Level> dim)
      A target point without excluded entity
      Parameters:
      x - X
      y - Y
      z - Z
      r2 - Radius
      dim - DimensionType
  • Method Details

    • p

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