Class SimpleQueryPayload
java.lang.Object
net.neoforged.neoforge.network.custom.payload.SimpleQueryPayload
- All Implemented Interfaces:
CustomQueryAnswerPayload
,CustomQueryPayload
,ICustomQueryPayloadWithBuffer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
private final int
private final FriendlyByteBuf
-
Constructor Summary
ModifierConstructorDescriptionprivate
SimpleQueryPayload
(byte[] payload, int packetIndex, ResourceLocation id) private
SimpleQueryPayload
(FriendlyByteBuf byteBuf, int packetIndex, ResourceLocation id) -
Method Summary
Modifier and TypeMethodDescriptionbuffer()
The buffer that created the query payload.boolean
int
hashCode()
@NotNull ResourceLocation
id()
static SimpleQueryPayload
inbound
(FriendlyByteBuf byteBuf) static SimpleQueryPayload
inbound
(FriendlyByteBuf byteBuf, ResourceLocation verifiableId) static SimpleQueryPayload
outbound
(byte[] payload, int packetIndex, ResourceLocation id) static SimpleQueryPayload
outbound
(FriendlyByteBuf byteBuf, int packetIndex, ResourceLocation id) int
The internal packet processing index for the query.payload()
toString()
void
write
(FriendlyByteBuf p_295179_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.network.ICustomQueryPayloadWithBuffer
getDirection
-
Field Details
-
payload
-
packetIndex
private final int packetIndex -
id
-
-
Constructor Details
-
SimpleQueryPayload
-
SimpleQueryPayload
-
-
Method Details
-
outbound
-
outbound
public static SimpleQueryPayload outbound(FriendlyByteBuf byteBuf, int packetIndex, ResourceLocation id) -
inbound
-
inbound
-
write
- Specified by:
write
in interfaceCustomQueryAnswerPayload
- Specified by:
write
in interfaceCustomQueryPayload
-
buffer
Description copied from interface:ICustomQueryPayloadWithBuffer
The buffer that created the query payload.- Specified by:
buffer
in interfaceICustomQueryPayloadWithBuffer
- Returns:
- The buffer
-
packetIndex
public int packetIndex()Description copied from interface:ICustomQueryPayloadWithBuffer
The internal packet processing index for the query.- Specified by:
packetIndex
in interfaceICustomQueryPayloadWithBuffer
- Returns:
- The packet index.
-
payload
-
id
- Specified by:
id
in interfaceCustomQueryPayload
-
equals
-
hashCode
public int hashCode() -
toString
-