java.lang.Object
org.cyclops.cyclopscore.infobook.pageelement.RewardItem
All Implemented Interfaces:
IReward

public class RewardItem extends Object implements IReward
An item reward.
  • Field Details

  • Constructor Details

    • RewardItem

      public RewardItem(net.minecraft.world.item.ItemStack itemStack)
  • Method Details

    • canObtain

      public boolean canObtain(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IReward
      If the given player in its current state is able to obtain this reward.
      Specified by:
      canObtain in interface IReward
      Parameters:
      player - The player.
      Returns:
      If it can obtain this.
    • obtain

      public void obtain(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IReward
      The logic for obtaining this reward. Will only be called server-side.
      Specified by:
      obtain in interface IReward
      Parameters:
      player - The player.
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface IReward
      Returns:
      The gui width/
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface IReward
      Returns:
      The gui height.
    • constructRewardClient

      public IRewardClient constructRewardClient()
      Specified by:
      constructRewardClient in interface IReward
    • getItemStack

      public net.minecraft.world.item.ItemStack getItemStack()