Record Class WorldGenAttemptDebugPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.WorldGenAttemptDebugPayload
- All Implemented Interfaces:
CustomPacketPayload
public record WorldGenAttemptDebugPayload(BlockPos pos, float scale, float red, float green, float blue, float alpha)
extends Record
implements CustomPacketPayload
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thealpharecord component.private final floatThe field for thebluerecord component.private final floatThe field for thegreenrecord component.static final ResourceLocationprivate final BlockPosThe field for theposrecord component.private final floatThe field for theredrecord component.private final floatThe field for thescalerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWorldGenAttemptDebugPayload(BlockPos pos, float scale, float red, float green, float blue, float alpha) Creates an instance of aWorldGenAttemptDebugPayloadrecord class.WorldGenAttemptDebugPayload(FriendlyByteBuf p_298227_) -
Method Summary
Modifier and TypeMethodDescriptionfloatalpha()Returns the value of thealpharecord component.floatblue()Returns the value of thebluerecord component.final booleanIndicates whether some other object is "equal to" this one.floatgreen()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.id()pos()Returns the value of theposrecord component.floatred()Returns the value of theredrecord component.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_301372_)
-
Field Details
-
pos
The field for theposrecord component. -
scale
private final float scaleThe field for thescalerecord component. -
red
private final float redThe field for theredrecord component. -
green
private final float greenThe field for thegreenrecord component. -
blue
private final float blueThe field for thebluerecord component. -
alpha
private final float alphaThe field for thealpharecord component. -
ID
-
-
Constructor Details
-
WorldGenAttemptDebugPayload
-
WorldGenAttemptDebugPayload
public WorldGenAttemptDebugPayload(BlockPos pos, float scale, float red, float green, float blue, float alpha) Creates an instance of aWorldGenAttemptDebugPayloadrecord class.- Parameters:
pos- the value for theposrecord componentscale- the value for thescalerecord componentred- the value for theredrecord componentgreen- the value for thegreenrecord componentblue- the value for thebluerecord componentalpha- the value for thealpharecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceCustomPacketPayload
-
id
- Specified by:
idin interfaceCustomPacketPayload
-
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 '=='. -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
red
public float red()Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
green
public float green()Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
blue
public float blue()Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-
alpha
public float alpha()Returns the value of thealpharecord component.- Returns:
- the value of the
alpharecord component
-