public interface DayCareRequirement
Pokemon| Modifier and Type | Method and Description |
|---|---|
net.minecraft.util.text.ITextComponent |
getError()
Gets the error message for when the requirement isn't met
|
java.lang.String |
getTypeId()
Gets the unique identifier of the breeding requirement type for use in datapacks
|
boolean |
hasMetRequirement(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box)
Determines if the player has met the given requirement
|
void |
read(net.minecraft.nbt.CompoundNBT nbt)
Reads the requirement from NBT
|
void |
read(com.google.gson.Gson gson,
com.google.gson.JsonElement json)
Reads the breeding requirement from JSON
|
void |
setError(net.minecraft.util.text.ITextComponent error)
Sets the error message displayed in the GUI to the player
|
void |
takeFrom(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box)
The logic for taking the items from the player
|
void |
write(net.minecraft.nbt.CompoundNBT nbt)
Writes the requirement to NBT
|
java.lang.String getTypeId()
net.minecraft.util.text.ITextComponent getError()
void setError(net.minecraft.util.text.ITextComponent error)
error - The errorvoid read(com.google.gson.Gson gson,
com.google.gson.JsonElement json)
throws java.lang.RuntimeException
gson - The GSON instancejson - The JSON element to be parsedjava.lang.RuntimeExceptionboolean hasMetRequirement(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box)
player - The playerbox - The box in relation tovoid takeFrom(net.minecraft.entity.player.ServerPlayerEntity player,
DayCareBox box)
player - The playervoid write(net.minecraft.nbt.CompoundNBT nbt)
nbt - The NBT being written tovoid read(net.minecraft.nbt.CompoundNBT nbt)
nbt - The NBT being read from