Spice of Life: Delicacy Journey

Quick rating

Community listing page, reviews here may not be monitored by the author.

Spice of Life: Delicacy Journey

No reviews yet

An addon for Spice of Life: Carrot Edition that grants configurable item rewards based on the foods a player has tasted, and add KubeJS events support of SoL:CE.

Mod Loaders
Minecraft

About

Description

Banner

Spice of Life: Delicacy Journey

An addon for Spice of Life: Carrot Edition that grants configurable item rewards based on the foods a player has tasted, and add KubeJS events support of SoL:CE.

Configuration

# Reward entries in the format threshold|namespace:item|count.
rewards = [
    "5|minecraft:apple|2",
    "10|minecraft:golden_carrot|1",
    "20|minecraft:enchanted_golden_apple|1"
]

# Send a chat message to the player when this addon grants a reward.
announceRewards = true

# Log invalid reward entries when the configuration is loaded.
logInvalidEntries = true

KubeJS

SoLDJEvents.foodVarietyChanged(event => {
  const player = event.player
  const foodId = `${event.foodId}`
  const previousCount = event.previousCount
  const newCount = event.newCount
  if (event.newCount >= 30 && foodId === 'minecraft:golden_carrot') {
    player.give('minecraft:diamond')
    player.tell('You have tasted 30 different foods and eaten a golden carrot! Here is a diamond as a reward!')
  }
})