public class Ribbon
extends java.lang.Object
RibbonType
This is only used to store data about the ribbon given to a Pokemon.Modifier and Type | Class and Description |
---|---|
static class |
Ribbon.Builder |
Modifier and Type | Field and Description |
---|---|
protected long |
receivedDate |
protected net.minecraft.util.text.ITextComponent |
receiver |
protected MutableRibbonData |
ribbonData |
protected java.lang.String |
type |
Constructor and Description |
---|
Ribbon(java.lang.String type,
long receivedDate,
net.minecraft.util.text.ITextComponent receiver) |
Ribbon(java.lang.String type,
long receivedDate,
net.minecraft.util.text.ITextComponent receiver,
MutableRibbonData ribbonData) |
Modifier and Type | Method and Description |
---|---|
static Ribbon.Builder |
builder() |
static Ribbon.Builder |
builder(Ribbon ribbon) |
boolean |
equals(java.lang.Object o) |
static Ribbon |
fromNbt(net.minecraft.nbt.CompoundNBT nbt)
Reads a ribbon from NBT
|
long |
getReceivedDate()
The date (in milliseconds) that the ribbon was given to the pokemon
|
net.minecraft.util.text.ITextComponent |
getReceiver()
The name of the owner of the Pokemon when it was given the ribbon
|
MutableRibbonData |
getRibbonData()
The mutable data for the ribbon.
|
RegistryValue<RibbonType> |
getType()
Returns the ribbon type for the given ribbon
|
int |
hashCode() |
void |
refreshData(PixelmonEntity entity)
Updates the mutable data that will be sent to the client
This also marks the Pokemon's ribbon data as "dirty"
|
net.minecraft.nbt.CompoundNBT |
serialize()
Writes the Ribbon to an NBT compount
|
protected final java.lang.String type
protected final long receivedDate
protected final net.minecraft.util.text.ITextComponent receiver
protected MutableRibbonData ribbonData
public Ribbon(java.lang.String type, long receivedDate, net.minecraft.util.text.ITextComponent receiver)
public Ribbon(java.lang.String type, long receivedDate, net.minecraft.util.text.ITextComponent receiver, MutableRibbonData ribbonData)
public RegistryValue<RibbonType> getType()
public long getReceivedDate()
public net.minecraft.util.text.ITextComponent getReceiver()
public MutableRibbonData getRibbonData()
public void refreshData(PixelmonEntity entity)
entity
- The entity to updatepublic net.minecraft.nbt.CompoundNBT serialize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static Ribbon fromNbt(net.minecraft.nbt.CompoundNBT nbt)
nbt
- the nbt being readpublic static Ribbon.Builder builder()
public static Ribbon.Builder builder(Ribbon ribbon)