public class PokeDollarsRequirement extends AbstractRequirement
Modifier and Type | Field and Description |
---|---|
protected double |
amount |
error, typeId
Constructor and Description |
---|
PokeDollarsRequirement() |
Modifier and Type | Method and Description |
---|---|
double |
getAmount() |
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 |
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
|
getError, getTypeId, setError
public void read(com.google.gson.Gson gson, com.google.gson.JsonElement json)
DayCareRequirement
gson
- The GSON instancejson
- The JSON element to be parsedpublic boolean hasMetRequirement(net.minecraft.entity.player.ServerPlayerEntity player, DayCareBox box)
DayCareRequirement
player
- The playerbox
- The box in relation topublic void takeFrom(net.minecraft.entity.player.ServerPlayerEntity player, DayCareBox box)
DayCareRequirement
player
- The playerpublic void write(net.minecraft.nbt.CompoundNBT nbt)
DayCareRequirement
nbt
- The NBT being written topublic void read(net.minecraft.nbt.CompoundNBT nbt)
DayCareRequirement
nbt
- The NBT being read frompublic double getAmount()