Class PokeDollarsRequirement
java.lang.Object
com.pixelmonmod.pixelmon.api.daycare.impl.requirement.AbstractRequirement
com.pixelmonmod.pixelmon.api.daycare.impl.requirement.PokeDollarsRequirement
- All Implemented Interfaces:
DayCareRequirement
Should parse an amount of pokedollars to take from the user
- Since:
- 25/06/2022
-
Field Summary
FieldsFields inherited from class com.pixelmonmod.pixelmon.api.daycare.impl.requirement.AbstractRequirement
error, typeId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleList<net.minecraft.world.item.ItemStack> getIcon()Gets an icon representing the requirementbooleanhasMetRequirement(net.minecraft.server.level.ServerPlayer player, DayCareBox box) Determines if the player has met the given requirementvoidread(com.google.gson.Gson gson, com.google.gson.JsonElement json, net.minecraft.core.HolderLookup.Provider registryAccess) Reads the breeding requirement from JSONvoidread(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registryAccess) Reads the requirement from NBTvoidtakeFrom(net.minecraft.server.level.ServerPlayer player, DayCareBox box) The logic for taking the items from the playervoidwrite(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registryAccess) Writes the requirement to NBTMethods inherited from class com.pixelmonmod.pixelmon.api.daycare.impl.requirement.AbstractRequirement
getError, getTypeId, setError
-
Field Details
-
amount
protected double amount
-
-
Constructor Details
-
PokeDollarsRequirement
public PokeDollarsRequirement()
-
-
Method Details
-
read
public void read(com.google.gson.Gson gson, com.google.gson.JsonElement json, net.minecraft.core.HolderLookup.Provider registryAccess) Description copied from interface:DayCareRequirementReads the breeding requirement from JSON- Parameters:
gson- The GSON instancejson- The JSON element to be parsed
-
getIcon
Description copied from interface:DayCareRequirementGets an icon representing the requirement- Returns:
- The icon
-
hasMetRequirement
Description copied from interface:DayCareRequirementDetermines if the player has met the given requirement- Parameters:
player- The playerbox- The box in relation to- Returns:
- True if met, false if not
-
takeFrom
Description copied from interface:DayCareRequirementThe logic for taking the items from the player- Parameters:
player- The player
-
write
public void write(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registryAccess) Description copied from interface:DayCareRequirementWrites the requirement to NBT- Parameters:
nbt- The NBT being written to
-
read
public void read(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider registryAccess) Description copied from interface:DayCareRequirementReads the requirement from NBT- Parameters:
nbt- The NBT being read from
-
getAmount
public double getAmount()
-