public class SetTrainerData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
greeting
The NPC Trainer's messages.
|
int |
id
The NPC Trainer's ID.
|
java.lang.String |
lose
The NPC Trainer's messages.
|
java.lang.String |
name
The NPC Trainer's name.
|
BattleRules |
rules
The rules that the NPC Trainer uses in battle.
|
java.lang.String |
win
The NPC Trainer's messages.
|
int |
winMoney
The money won upon the NPC Trainer's defeat.
|
net.minecraft.item.ItemStack[] |
winnings
The items won upon the NPC Trainer's defeat.
|
Constructor and Description |
---|
SetTrainerData()
Empty constructor used for registering the packet.
|
SetTrainerData(NPCTrainer trainer,
java.lang.String localization)
Initializes the NPC Trainer data.
|
SetTrainerData(java.lang.String name,
java.lang.String greeting,
java.lang.String win,
java.lang.String lose,
int winMoney,
net.minecraft.item.ItemStack[] winnings)
Initializes the NPC Trainer data.
|
SetTrainerData(java.lang.String name,
java.lang.String greeting,
java.lang.String win,
java.lang.String lose,
int winMoney,
net.minecraft.item.ItemStack[] winnings,
BattleRules rules)
Initializes the NPC Trainer data.
|
Modifier and Type | Method and Description |
---|---|
void |
decodeInto(net.minecraft.network.PacketBuffer buffer)
Decodes the data from a buffer.
|
void |
encodeInto(net.minecraft.network.PacketBuffer buffer)
Encodes the data into a buffer.
|
public java.lang.String name
public java.lang.String greeting
public java.lang.String win
public java.lang.String lose
public net.minecraft.item.ItemStack[] winnings
public int id
public int winMoney
public BattleRules rules
public SetTrainerData()
public SetTrainerData(java.lang.String name, java.lang.String greeting, java.lang.String win, java.lang.String lose, int winMoney, net.minecraft.item.ItemStack[] winnings)
name
- The name of the NPC Trainer.greeting
- The greeting said by the NPC Trainer when starting a battle.win
- The message said by the NPC Trainer upon victory.lose
- The message said by the NPC Trainer upon losing.winMoney
- The amount of PokeDollars won when the NPC Trainer is defeated.winnings
- The items won when the NPC Trainer is defeated.public SetTrainerData(java.lang.String name, java.lang.String greeting, java.lang.String win, java.lang.String lose, int winMoney, net.minecraft.item.ItemStack[] winnings, BattleRules rules)
name
- The name of the NPC Trainer.greeting
- The greeting said by the NPC Trainer when starting a battle.win
- The message said by the NPC Trainer upon victory.lose
- The message said by the NPC Trainer upon losing.winMoney
- The amount of PokeDollars won when the NPC Trainer is defeated.winnings
- The items won when the NPC Trainer is defeated.rules
- The rules that the NPC Trainer uses in battle, or null if they should not be sent in the packet.public SetTrainerData(NPCTrainer trainer, java.lang.String localization)
trainer
- The NPC Trainer to get data from.localization
- The localization code for the lang file to translate data from.public void encodeInto(net.minecraft.network.PacketBuffer buffer)
buffer
- The buffer to encode the data into.public void decodeInto(net.minecraft.network.PacketBuffer buffer)
buffer
- The buffer to decode the data from.