public class ItemDropPacket extends AbstractPixelmonPacket
| Modifier and Type | Field and Description |
|---|---|
net.minecraft.util.text.TranslationTextComponent |
customTitle
The custom Title
|
boolean |
hasCustomTitle
Whether there is a custom title
|
DroppedItem[] |
items
The items dropped by the opponent.
|
ItemDropMode |
mode
the item drop type, for display
|
| Constructor and Description |
|---|
ItemDropPacket()
Empty constructor for packet registration.
|
ItemDropPacket(ItemDropMode mode,
java.util.List<DroppedItem> givenDrops)
Initializes the drop information holder.
|
ItemDropPacket(ItemDropMode mode,
net.minecraft.util.text.TranslationTextComponent customTitle,
java.util.List<DroppedItem> drops)
Initializes the drop information holder.
|
ItemDropPacket(net.minecraft.util.text.TranslationTextComponent customTitle,
java.util.ArrayList<DroppedItem> drops)
Initializes the drop information holder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(net.minecraft.network.PacketBuffer buffer)
Decodes the information from the buffer to the packet instance
|
void |
encode(net.minecraft.network.PacketBuffer buffer)
Encodes the buffer with the packet information
|
protected void |
handlePacket(net.minecraftforge.fml.network.NetworkEvent.Context context) |
handle, replypublic DroppedItem[] items
public boolean hasCustomTitle
public ItemDropMode mode
public net.minecraft.util.text.TranslationTextComponent customTitle
public ItemDropPacket()
public ItemDropPacket(ItemDropMode mode, java.util.List<DroppedItem> givenDrops)
mode - The source of the dropped items.givenDrops - The items dropped by the opponent.public ItemDropPacket(ItemDropMode mode, net.minecraft.util.text.TranslationTextComponent customTitle, java.util.List<DroppedItem> drops)
mode - The source of the dropped items.customTitle - Custom text to label the drop GUI with.drops - The items dropped by the opponent.public ItemDropPacket(net.minecraft.util.text.TranslationTextComponent customTitle,
java.util.ArrayList<DroppedItem> drops)
customTitle - Custom text to label the drop GUI with.drops - The items dropped by the opponent.public void decode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacketdecode in interface PixelmonPacketdecode in class AbstractPixelmonPacketbuffer - The buffer being decodedpublic void encode(net.minecraft.network.PacketBuffer buffer)
PixelmonPacketencode in interface PixelmonPacketencode in class AbstractPixelmonPacketbuffer - The buffer being encodedprotected void handlePacket(net.minecraftforge.fml.network.NetworkEvent.Context context)
handlePacket in class AbstractPixelmonPacket