Record Class ServerPackets.ErrorStyle
java.lang.Object
java.lang.Record
org.quiltmc.qsl.frozenblock.core.registry.impl.sync.ServerPackets.ErrorStyle
- All Implemented Interfaces:
net.fabricmc.fabric.api.networking.v1.FabricPacket
- Enclosing class:
ServerPackets
public static record ServerPackets.ErrorStyle(net.minecraft.network.chat.Component errorHeader, net.minecraft.network.chat.Component errorFooter, boolean showError)
extends Record
implements net.fabricmc.fabric.api.networking.v1.FabricPacket
This packet sets failure text look/properties.
Requires protocol version 3 or newer.
{
Text Header: Text (String)
Text Footer: Text (String)
Show Details: bool
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.fabricmc.fabric.api.networking.v1.PacketType<ServerPackets.ErrorStyle> -
Constructor Summary
ConstructorsConstructorDescriptionErrorStyle(@NotNull net.minecraft.network.FriendlyByteBuf buf) ErrorStyle(net.minecraft.network.chat.Component errorHeader, net.minecraft.network.chat.Component errorFooter, boolean showError) Creates an instance of aErrorStylerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.chat.ComponentReturns the value of theerrorFooterrecord component.net.minecraft.network.chat.ComponentReturns the value of theerrorHeaderrecord component.net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()final inthashCode()Returns a hash code value for this object.booleanReturns the value of theshowErrorrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull net.minecraft.network.FriendlyByteBuf buf)
-
Field Details
-
PACKET_TYPE
public static final net.fabricmc.fabric.api.networking.v1.PacketType<ServerPackets.ErrorStyle> PACKET_TYPE
-
-
Constructor Details
-
ErrorStyle
public ErrorStyle(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) -
ErrorStyle
public ErrorStyle(net.minecraft.network.chat.Component errorHeader, net.minecraft.network.chat.Component errorFooter, boolean showError) Creates an instance of aErrorStylerecord class.- Parameters:
errorHeader- the value for theerrorHeaderrecord componenterrorFooter- the value for theerrorFooterrecord componentshowError- the value for theshowErrorrecord component
-
-
Method Details
-
write
public void write(@NotNull @NotNull net.minecraft.network.FriendlyByteBuf buf) - Specified by:
writein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
getType
public net.fabricmc.fabric.api.networking.v1.PacketType<?> getType()- Specified by:
getTypein interfacenet.fabricmc.fabric.api.networking.v1.FabricPacket
-
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 '=='. -
errorHeader
public net.minecraft.network.chat.Component errorHeader()Returns the value of theerrorHeaderrecord component.- Returns:
- the value of the
errorHeaderrecord component
-
showError
public boolean showError()Returns the value of theshowErrorrecord component.- Returns:
- the value of the
showErrorrecord component
-