Class ItemRewardTemplate

java.lang.Object
com.minecolonies.core.quests.rewards.ItemRewardTemplate
All Implemented Interfaces:
IQuestRewardTemplate

public class ItemRewardTemplate extends Object implements IQuestRewardTemplate
Item based quest reward.
  • Constructor Details

    • ItemRewardTemplate

      public ItemRewardTemplate(net.minecraft.world.item.ItemStack item)
      Setup the item reward.
      Parameters:
      item - the item.
  • Method Details

    • createReward

      public static IQuestRewardTemplate createReward(@NotNull net.minecraft.core.HolderLookup.Provider provider, com.google.gson.JsonObject jsonObject)
      Create the reward.
      Parameters:
      jsonObject - the json to read from.
      Returns:
      the reward object.
    • applyReward

      public void applyReward(IColony colony, net.minecraft.world.entity.player.Player player, IQuestInstance colonyQuest)
      Description copied from interface: IQuestRewardTemplate
      Apply the reward to colony and player.
      Specified by:
      applyReward in interface IQuestRewardTemplate
      Parameters:
      colony - the involved colony.
      player - the involved player.
      colonyQuest - the related quest.