Class ItemFactory

java.lang.Object
com.csse3200.game.entities.factories.ItemFactory

public class ItemFactory extends Object
Factory to create an item
  • Method Details

    • getItemSupplier

      public static Supplier<Entity> getItemSupplier(String itemName)
      Returns the supplier function for the item with the given unique name.
      Parameters:
      itemName - Name of the item to get the supplier of
      Returns:
      Supplier for the item
      Throws:
      NoSuchElementException - If an item with the given name does not exist
    • createBaseItem

      public static Entity createBaseItem()
      Create a base item entity with physics, a hitbox, and ItemActions.
      Returns:
      a base item entity
    • createShovel

      public static Entity createShovel()
      Creates a shovel item
      Returns:
      shovel
    • createHoe

      public static Entity createHoe()
      Creates a hoe item
      Returns:
      hoe
    • createWateringcan

      public static Entity createWateringcan()
      Creates a watering-can item
      Returns:
      watering can
    • createScythe

      public static Entity createScythe()
      Creates a scythe item
      Returns:
      scythe
    • createSword

      public static Entity createSword()
      Creates a sword item
      Returns:
      sword
    • createGun

      public static Entity createGun()
      Creates a gun item
      Returns:
      gun
    • createMilk

      public static Entity createMilk()
      Creates a milk item
      Returns:
      milk item
    • createEgg

      public static Entity createEgg()
      Creates an egg item
      Returns:
      egg item
    • createGoldenEgg

      public static Entity createGoldenEgg()
      Creates a golden egg item
      Returns:
      golden egg item
    • createClueItem

      public static Entity createClueItem()
      Creates a Map Clue item
      Returns:
      Map Item
    • createFertiliser

      public static Entity createFertiliser()
      Creates a fertiliser item
      Returns:
      fertiliser
    • createAloeVeraSeed

      public static Entity createAloeVeraSeed()
      Creates an 'aloe vera seed' item
      Returns:
      aloe vera seed
    • createAloeVeraLeaf

      public static Entity createAloeVeraLeaf()
      Creates an 'Aloe Vera Leaf' item.
      Returns:
      Aloe Vera Leaf
    • createAtomicAlgaeSeed

      public static Entity createAtomicAlgaeSeed()
      Creates an 'atomic algae seed' item
      Returns:
      atomic algae seed
    • createCosmicCobSeed

      public static Entity createCosmicCobSeed()
      Creates a 'cosmic cob seed' item
      Returns:
      cosmic cob seed
    • createCosmicCobEar

      public static Entity createCosmicCobEar()
      Creates an 'Ear of Cosmic Cob' item.
      Returns:
      Ear of Cosmic Cob
    • createDeadlyNightshadeSeed

      public static Entity createDeadlyNightshadeSeed()
      Creates a 'deadly nightshade seed' item
      Returns:
      deadly nightshade seed
    • createDeadlyNightshadeBerry

      public static Entity createDeadlyNightshadeBerry()
      Creates a 'Nightshade Berry' item.
      Returns:
      Nightshade Berry
    • createHammerPlantSeed

      public static Entity createHammerPlantSeed()
      Creates a 'hammer plant seed' item
      Returns:
      hammer plant seed
    • createHammerFlower

      public static Entity createHammerFlower()
      Creates a 'Hammer Flower' item.
      Returns:
      Hammer Flower
    • createSpaceSnapperSeed

      public static Entity createSpaceSnapperSeed()
      Creates a 'space snapper seed' item
      Returns:
      space snapper seed
    • createBeef

      public static Entity createBeef()
      Creates a beef item
      Returns:
      beef item
    • createChickenMeat

      public static Entity createChickenMeat()
      Creates a chicken item
      Returns:
      chicken item
    • createFenceItem

      public static Entity createFenceItem()
      Creates a fence item that allows the player to place fences
      Returns:
      the fence item
    • createGateItem

      public static Entity createGateItem()
      Creates a gate item that allows the player to place gates
      Returns:
      the gate item
    • createSprinklerItem

      public static Entity createSprinklerItem()
      Creates a sprinkler item that allows the player to place sprinklers
      Returns:
      the sprinkler item
    • createPumpItem

      public static Entity createPumpItem()
      Creates a Pump item that allows the player to power sprinklers
      Returns:
      the sprinkler item
    • createChestItem

      public static Entity createChestItem()
      Creates a chest item that allows the player to place chests
      Returns:
      the chest item
    • createLightItem

      public static Entity createLightItem()
      Makes a item that when used places a item
      Returns:
    • createShipPart

      public static Entity createShipPart()
      Creates a ship part item that can be used to repair the ship
      Returns:
      ship part
    • createFishingRod

      public static Entity createFishingRod()
      Creates a tool that one use can get fish from the ocean or lava
      Returns:
      a fishing rod
    • createLavaEel

      public static Entity createLavaEel()
      Creates a fish item
      Returns:
      a lava eel (food item)
    • createSalmon

      public static Entity createSalmon()
      Creates a fish item
      Returns:
      a salmon (food item)
    • createYak3

      public static Entity createYak3()
      Creates a fish item
      Returns:
      a yak3 (food item)
    • createNetty

      public static Entity createNetty()
      Creates a fish item
      Returns:
      a netty (food item)
    • createLola

      public static Entity createLola()
      Creates a fish item
      Returns:
      a lola (food item)
    • createLarry

      public static Entity createLarry()
      Creates a fish item
      Returns:
      a larry (food item)
    • createBraydan

      public static Entity createBraydan()
      Creates a fish item
      Returns:
      a Braydan (food item)
    • createHarry

      public static Entity createHarry()
      Creates a fish item
      Returns:
      a Harry (food item)
    • createMrKrabs

      public static Entity createMrKrabs()
      Creates a fish item
      Returns:
      a mr Krabs fish (food item)
    • createPharLap

      public static Entity createPharLap()
      Creates a fish item
      Returns:
      a Phar Lap (food item)
    • createBryton

      public static Entity createBryton()
      Creates a fish item
      Returns:
      a Bryton fish (food item)
    • createSanders

      public static Entity createSanders()
      Creates a fish item
      Returns:
      a Sanders (food item)
    • createChurchill

      public static Entity createChurchill()
      Creates a fish item
      Returns:
      a Winston Churchill (food item)
    • createGoldenFish

      public static Entity createGoldenFish()
      Creates a fish item
      Returns:
      a yellow fish
    • createTeleportDevice

      public static Entity createTeleportDevice()
      Creates a teleportation device.
      Returns:
      a device that will teleport you to the ship