Record Class CheckExtensibleEnums.EnumEntry
java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.configuration.CheckExtensibleEnums.EnumEntry
- Enclosing class:
CheckExtensibleEnums
public static record CheckExtensibleEnums.EnumEntry(String className, net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheck, Optional<CheckExtensibleEnums.ExtensionData> data)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for theclassName
record component.private final Optional
<CheckExtensibleEnums.ExtensionData> The field for thedata
record component.private final net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck
The field for thenetworkCheck
record component.static final net.minecraft.network.codec.StreamCodec
<io.netty.buffer.ByteBuf, CheckExtensibleEnums.EnumEntry> -
Constructor Summary
ConstructorsConstructorDescriptionEnumEntry
(String className, net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheck, Optional<CheckExtensibleEnums.ExtensionData> data) Creates an instance of aEnumEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassName
record component.data()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
boolean
boolean
net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck
Returns the value of thenetworkCheck
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
className
The field for theclassName
record component. -
networkCheck
private final net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheckThe field for thenetworkCheck
record component. -
data
The field for thedata
record component. -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,CheckExtensibleEnums.EnumEntry> STREAM_CODEC
-
-
Constructor Details
-
EnumEntry
public EnumEntry(String className, net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheck, Optional<CheckExtensibleEnums.ExtensionData> data) Creates an instance of aEnumEntry
record class.- Parameters:
className
- the value for theclassName
record componentnetworkCheck
- the value for thenetworkCheck
record componentdata
- the value for thedata
record component
-
-
Method Details
-
isClientbound
public boolean isClientbound() -
isServerbound
public boolean isServerbound() -
isExtended
public boolean isExtended() -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
className
Returns the value of theclassName
record component.- Returns:
- the value of the
className
record component
-
networkCheck
public net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheck()Returns the value of thenetworkCheck
record component.- Returns:
- the value of the
networkCheck
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-