Package net.minecraftforge.network
Record Class PacketDistributor.TargetPoint
java.lang.Object
java.lang.Record
net.minecraftforge.network.PacketDistributor.TargetPoint
- Enclosing class:
PacketDistributor<T>
public static record PacketDistributor.TargetPoint(@Nullable ServerPlayer excluded, double x, double y, double z, double r2, ResourceKey<Level> dim)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceKey
<Level> The field for thedim
record component.private final @Nullable ServerPlayer
The field for theexcluded
record component.private final double
The field for ther2
record component.private final double
The field for thex
record component.private final double
The field for they
record component.private final double
The field for thez
record component. -
Constructor Summary
ConstructorDescriptionTargetPoint
(double x, double y, double z, double r2, ResourceKey<Level> dim) A target point without excluded entityTargetPoint
(@Nullable ServerPlayer excluded, double x, double y, double z, double r2, ResourceKey<Level> dim) Creates an instance of aTargetPoint
record class. -
Method Summary
Modifier and TypeMethodDescriptiondim()
Returns the value of thedim
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable ServerPlayer
excluded()
Returns the value of theexcluded
record component.final int
hashCode()
Returns a hash code value for this object.double
r2()
Returns the value of ther2
record component.final String
toString()
Returns a string representation of this record class.double
x()
Returns the value of thex
record component.double
y()
Returns the value of they
record component.double
z()
Returns the value of thez
record component.
-
Field Details
-
excluded
The field for theexcluded
record component. -
x
private final double xThe field for thex
record component. -
y
private final double yThe field for they
record component. -
z
private final double zThe field for thez
record component. -
r2
private final double r2The field for ther2
record component. -
dim
The field for thedim
record component.
-
-
Constructor Details
-
TargetPoint
A target point without excluded entity -
TargetPoint
public TargetPoint(@Nullable @Nullable ServerPlayer excluded, double x, double y, double z, double r2, ResourceKey<Level> dim) Creates an instance of aTargetPoint
record class.- Parameters:
excluded
- the value for theexcluded
record componentx
- the value for thex
record componenty
- the value for they
record componentz
- the value for thez
record componentr2
- the value for ther2
record componentdim
- the value for thedim
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
excluded
Returns the value of theexcluded
record component.- Returns:
- the value of the
excluded
record component
-
x
public double x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public double y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
z
public double z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
r2
public double r2()Returns the value of ther2
record component.- Returns:
- the value of the
r2
record component
-
dim
Returns the value of thedim
record component.- Returns:
- the value of the
dim
record component
-