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 StringThe field for theclassNamerecord component.private final Optional<CheckExtensibleEnums.ExtensionData> The field for thedatarecord component.private final net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheckThe field for thenetworkCheckrecord component.static final 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 aEnumEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassNamerecord component.data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanbooleannet.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheckReturns the value of thenetworkCheckrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
className
The field for theclassNamerecord component. -
networkCheck
private final net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheckThe field for thenetworkCheckrecord component. -
data
The field for thedatarecord component. -
STREAM_CODEC
public static final 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 aEnumEntryrecord class.- Parameters:
className- the value for theclassNamerecord componentnetworkCheck- the value for thenetworkCheckrecord componentdata- the value for thedatarecord 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 theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
networkCheck
public net.neoforged.fml.common.asm.enumextension.NetworkedEnum.NetworkCheck networkCheck()Returns the value of thenetworkCheckrecord component.- Returns:
- the value of the
networkCheckrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-