Class ClientNPCData
java.lang.Object
com.pixelmonmod.pixelmon.entities.npcs.registry.ClientNPCData
- All Implemented Interfaces:
IEncodeable
Client-side chatting NPC data for the NPC editor.
-
Constructor Summary
ConstructorDescriptionClientNPCData
(String texture) Initializes the container.ClientNPCData
(String id, String texture) Initializes the container.ClientNPCData
(net.minecraft.network.FriendlyByteBuf buffer) Decodes data from a buffer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decodeInto
(net.minecraft.network.FriendlyByteBuf buffer) Decodes the object from a buffer.void
encodeInto
(net.minecraft.network.FriendlyByteBuf buffer) Encodes the object into a buffer.boolean
getID()
Gets the NPC data's internal ID.Gets the name of the NPC's texture.int
hashCode()
-
Constructor Details
-
ClientNPCData
Initializes the container.- Parameters:
id
- The NPC data's internal ID.texture
- The name of the NPC's texture.
-
ClientNPCData
Initializes the container.- Parameters:
texture
- The name of the NPC's texture.
-
ClientNPCData
public ClientNPCData(net.minecraft.network.FriendlyByteBuf buffer) Decodes data from a buffer.- Parameters:
buffer
- The buffer to decode from.
-
-
Method Details
-
getID
Gets the NPC data's internal ID.- Returns:
- The NPC data's internal ID.
-
getTexture
Gets the name of the NPC's texture.- Returns:
- The name of the NPC's texture.
-
encodeInto
public void encodeInto(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:IEncodeable
Encodes the object into a buffer.- Specified by:
encodeInto
in interfaceIEncodeable
- Parameters:
buffer
- The buffer to encode the object into.
-
decodeInto
public void decodeInto(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:IEncodeable
Decodes the object from a buffer.- Specified by:
decodeInto
in interfaceIEncodeable
- Parameters:
buffer
- The buffer to decode the object from.
-
hashCode
public int hashCode() -
equals
-