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

public class PokeDollarsRequirement extends AbstractRequirement
Should parse an amount of pokedollars to take from the user
Since:
25/06/2022
  • 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)
      Description copied from interface: DayCareRequirement
      Reads the breeding requirement from JSON
      Parameters:
      gson - The GSON instance
      json - The JSON element to be parsed
    • hasMetRequirement

      public boolean hasMetRequirement(net.minecraft.server.level.ServerPlayer player, DayCareBox box)
      Description copied from interface: DayCareRequirement
      Determines if the player has met the given requirement
      Parameters:
      player - The player
      box - The box in relation to
      Returns:
      True if met, false if not
    • takeFrom

      public void takeFrom(net.minecraft.server.level.ServerPlayer player, DayCareBox box)
      Description copied from interface: DayCareRequirement
      The logic for taking the items from the player
      Parameters:
      player - The player
    • write

      public void write(net.minecraft.nbt.CompoundTag nbt)
      Description copied from interface: DayCareRequirement
      Writes the requirement to NBT
      Parameters:
      nbt - The NBT being written to
    • read

      public void read(net.minecraft.nbt.CompoundTag nbt)
      Description copied from interface: DayCareRequirement
      Reads the requirement from NBT
      Parameters:
      nbt - The NBT being read from
    • getAmount

      public double getAmount()