Class ConsumableItem

java.lang.Object
me.fami6xx.rpuniverse.core.basicneeds.ConsumableItem

public class ConsumableItem extends Object
This class represents a consumable item in the game. Each consumable item has a food, water, health, poop, and pee value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConsumableItem​(int food, int water, int health, int poop, int pee)
    Constructs a new ConsumableItem with the given values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the food value of the item.
    int
    Returns the health value of the item.
    int
    Returns the pee value of the item.
    int
    Returns the poop value of the item.
    int
    Returns the water value of the item.
    int
    setFood​(int food)
    Sets the food value of the item and returns the new value.
    int
    setHealth​(int health)
    Sets the health value of the item and returns the new value.
    int
    setPee​(int pee)
    Sets the pee value of the item and returns the new value.
    int
    setPoop​(int poop)
    Sets the poop value of the item and returns the new value.
    int
    setWater​(int water)
    Sets the water value of the item and returns the new value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConsumableItem

      public ConsumableItem(int food, int water, int health, int poop, int pee)
      Constructs a new ConsumableItem with the given values.
      Parameters:
      food - the food value of the item
      water - the water value of the item
      health - the health value of the item
      poop - the poop value of the item
      pee - the pee value of the item
  • Method Details

    • getFood

      public int getFood()
      Returns the food value of the item.
      Returns:
      the food value
    • setFood

      public int setFood(int food)
      Sets the food value of the item and returns the new value.
      Parameters:
      food - the new food value
      Returns:
      the new food value
    • getWater

      public int getWater()
      Returns the water value of the item.
      Returns:
      the water value
    • setWater

      public int setWater(int water)
      Sets the water value of the item and returns the new value.
      Parameters:
      water - the new water value
      Returns:
      the new water value
    • getHealth

      public int getHealth()
      Returns the health value of the item.
      Returns:
      the health value
    • setHealth

      public int setHealth(int health)
      Sets the health value of the item and returns the new value.
      Parameters:
      health - the new health value
      Returns:
      the new health value
    • getPoop

      public int getPoop()
      Returns the poop value of the item.
      Returns:
      the poop value
    • setPoop

      public int setPoop(int poop)
      Sets the poop value of the item and returns the new value.
      Parameters:
      poop - the new poop value
      Returns:
      the new poop value
    • getPee

      public int getPee()
      Returns the pee value of the item.
      Returns:
      the pee value
    • setPee

      public int setPee(int pee)
      Sets the pee value of the item and returns the new value.
      Parameters:
      pee - the new pee value
      Returns:
      the new pee value