Skip to main content

Creating New Items

Introduction to itemsโ€‹

LifestealCore includes three distinct types of items: hearts, sacrificial scrolls, and revive beacons. These items can all be customized and configured via the items.yml file.

Each item is fully configurable, allowing you to adjust various attributes such as display names, lore, material type (including support for custom skulls and models), material data, item flags, glow, and crafting recipes. Additionally, each item category has its own unique sub-settings, which can be modified as needed.

You have the flexibility to edit the default item types or add new ones to suit your needs. To create a new item type, simply copy an existing section and paste it, then customize the settings as desired.

To provide a quick breakdown of the different item types, the hearts increase the total amount of hearts when consumed, the sacrificial scrolls allow you to sacrifice hearts for a temporary boost (such as potion effects), and the revive beacons enable you to resurrect eliminated players over a specified period of time.

Heartsโ€‹

In LifestealCore, players can consume hearts to increase their total health. However, it's worth noting that hearts will still be consumed even if their addition would exceed the player's heart limit. For example, if the heart limit is set to 100 and a player has 99 hearts, consuming a heart that would give them +3 hearts would still result in the heart being consumed, but only 1 extra heart would be added, while the rest would be lost.

Furthermore, if a player has reached their maximum heart limit, they will not be able to use any additional heart items.

๐Ÿ“• Configurable options for hearts:

  • hearts - Amount of hearts added when consumed.
  • cooldown - Cooldown, this is a global heart item cooldown. (e.g You can't spam-consume different types of hearts).
  • dropchance - Drop Chance, chance to drop heart type when a player kills another player (and dropAsItem is set to true in config.yml).
  • recipe - Toggle and define a crafting recipe for the item.

๐Ÿ“• Example configuration:

      heart_tier1:
item:
name: '<SOLID:ff0000>Heart &7[Tier &fI&7]'
lore:
- ''
- '&7Consume to gain <SOLID:ff0000>โค &7extra heart!'
- ''
- '&cยป &7You can steal hearts from other players'
- '&7by killing them, find them in event crates or'
- '&7purchase them directly from the webstore!'
- ''
- '&e(store.yourserver.com)'
- ''
- '&8[Click to use]'
# Note: To use custom skulls use "CUSTOM_SKULL-<URL>". 1.14.4+ ONLY.
# Note: You can find custom skull URLs at https://minecraft-heads.com/custom-heads
material: 'CLOCK'
materialData: 0
# Note: Custom Model Data 1.14.4+ ONLY.
customModelData: 1
glow: false
itemFlags:
- 'HIDE_ATTRIBUTES'
- 'HIDE_ENCHANTS'
- 'HIDE_PLACED_ON'
- 'HIDE_DESTROYS'
- 'HIDE_DYE'
- 'HIDE_POTION_EFFECTS'
- 'HIDE_UNBREAKABLE'
# Note: How the item shows up in give commands, etc.
typeName: '<SOLID:ff0000>Heart &7[Tier &fI&7]'
settings:
hearts: 1
cooldown: 10
# Note: Chance to drop this heart when a player gets killed.
dropchance: 80
effects:
onConsume:
effect: 'HEART'
amount: 10
recipe:
enabled: true
layout:
- '*-*'
- '-+-'
- '*-*'
items:
"*":
material: "IRON_INGOT"
"+":
material: "LANTERN"
"-":
material: "GOLDEN_APPLE"

Sacrificial Scrollsโ€‹

Players can use Sacrificial Scrolls in LifestealCore to gain temporary boosts in the form of potion effects, while also sacrificing a portion of their hearts. It's important to note that sacrificing hearts means that they will be completely removed, rather than simply being damaged.

However, it's worth noting that players will not be able to use a Sacrificial Scroll if the hearts required for the sacrifice are equal to or greater than the player's current heart count. This ensures that players cannot inadvertently sacrifice all of their hearts and ban themselves.

๐Ÿ“• Configurable options for sacrificial scrolls:

  • effects - Effects applied when sacrificial heart is consumed.
  • cooldown - Cooldown, this is a per heart type cooldown.
  • heartCost - The heart cost (how many hearts are taken away from the player).
  • recipe - Toggle and define a crafting recipe for the item.

๐Ÿ“• Example configuration:

      scroll_escape:
item:
name: '<SOLID:bafcff>Sacrificial Escape Scroll &7(<SOLID:ff0000>-โค&7)'
lore:
- ''
- '&7Consume to gain a temporary "<SOLID:bafcff>Escape" &7buff!'
- ''
- '&f&lBuff: &bSpeed & Invisibility (10s)'
- ''
- '<SOLID:bafcff>ยป &7You can craft sacrificial scrolls, find them'
- '&7in event crates or purchase them directly'
- '&7from the webstore!'
- ''
- '&e(store.yourserver.com)'
- ''
- '&8[Click to use]'
# Note: To use custom skulls use "CUSTOM_SKULL-<URL>". 1.14.4+ ONLY.
# Note: You can find custom skull URLs at https://minecraft-heads.com/custom-heads
material: 'CLOCK'
materialData: 0
# Note: Custom Model Data 1.14.4+ ONLY.
customModelData: 4
glow: false
itemFlags:
- 'HIDE_ATTRIBUTES'
- 'HIDE_ENCHANTS'
- 'HIDE_PLACED_ON'
- 'HIDE_DESTROYS'
- 'HIDE_DYE'
- 'HIDE_POTION_EFFECTS'
- 'HIDE_UNBREAKABLE'
# Note: How the item shows up in give commands, etc.
typeName: '<SOLID:bafcff>Sacrificial Escape Scroll'
settings:
# Note: Effect format -> EFFECT:LEVEL:DURATION
# Note: Find potion effect names by googling "<Server Version> Potion Effect Enum"
effects:
- 'SPEED:1:10'
- 'INVISIBILITY:1:10'
# Note: Cooldown is in seconds.
cooldown: 600
heartCost: 1
effects:
onConsume:
effect: 'SMOKE_LARGE'
amount: 10
recipe:
enabled: true
layout:
- '-+-'
- '+*+'
- '-+-'
items:
"+":
material: "PAPER"
"-":
material: "FEATHER"
"*":
material: "HEART_TIER1"

Revive Beaconsโ€‹

Revive beacons are objects that players can use to bring their fallen comrades back to life. To use a beacon, players must first bind it to a specific player by holding the beacon in their hand and using the /bind <player> command (which can be configured). It's important to note that the selected player does not necessarily need to be online, but they must have joined the server at least once before. Once a beacon is bound, it can be placed on the ground to initiate the revival process.

๐Ÿ“• Configurable options for revive beacons:

  • Settings:
    • reviveTime - Time it takes (in seconds) for the player to be revived.
    • durability - Amount of breaks the beacon (placed block) can take before breaking and cancelling the resurrection.
    • cooldown - Cooldown (in seconds) for the player to use any revive beacon again.
  • Effects:
    • duringResurrection -> effect - Particle effect coming out of beacon during resurrection.
    • duringResurrection -> amount - Amount of particles spawning.
    • onFinish -> effect - Particle effect coming out of beacon when resurrection is finished or cancelled.
    • onFinish -> amount - Amount of particles spawning.
  • Holograms:
    • layout - Contents of the holograms.
    • updateLines - Define the lines that contain placeholders that require to be updated. Keep in mind that lines start from 0 and not 1.
    • offset - Define the hologram location offset based from the placed block.
  • recipe - Toggle and define a crafting recipe for the item.

๐Ÿ“• Example configuration:

      beacon_Tier1:
item:
name: '<SOLID:b5abaa>Revive Beacon [Tier I]'
lore:
- ''
- '<SOLID:b5abaa>ยท &fInformation:'
- ' <SOLID:827a79>ยป &7Revive Time: <SOLID:b5abaa>120s'
- ' <SOLID:827a79>ยป &7Cooldown: <SOLID:b5abaa>2h'
- ' <SOLID:827a79>ยป &7Durability: <SOLID:b5abaa>5'
- ''
- '<SOLID:b5abaa>ยท &fUsage:'
- ' <SOLID:827a79>ยป &7Place this beacon down to revive an'
- ' &7eliminated player. You must protect the'
- ' &7beacon during the resurrection process!'
- ''
- '<SOLID:b5abaa>ยท &fBound to:'
- ' <SOLID:827a79>ยป &7{PLAYER}'
- ''
- '<SOLID:b5abaa>ยท &c&nWarning:&r &7Location will be broadcasted upon usage!'
- ''
- '&8[Place down to use]'
# Note: To use custom skulls use "CUSTOM_SKULL-<URL>". 1.14.4+ ONLY.
# Note: You can find custom skull URLs at https://minecraft-heads.com/custom-heads
material: 'CUSTOM_SKULL-17ee3377f507ef255108e7f229f0f735455a6d9ce9673b6574bfd46ae8008853'
materialData: 0
# Note: Custom Model Data 1.14.4+ ONLY.
customModelData: 0
glow: true
itemFlags:
- 'HIDE_ATTRIBUTES'
- 'HIDE_ENCHANTS'
- 'HIDE_PLACED_ON'
# Note: How the item shows up in give commands, etc.
typeName: '<SOLID:b5abaa>Revive Beacon [Tier I]'
settings:
# Note: Amount of time (in seconds) to finish the resurrection process.
reviveTime: 120
# Note: Amount of times the beacon can be broken before breaking entirely.
durability: 5
cooldown: 7200
# Note: Whether or not there will be a broadcast when using the revive beacon.
silent: false
effects:
duringResurrection:
effect: 'SMOKE_LARGE'
amount: 10
onFinish:
effect: 'EXPLOSION_LARGE'
amount: 5
hologram:
# Placeholders: {0} = player, {1} = time left, {2} = durability
layout:
- '<SOLID:b5abaa>Revive Beacon [Tier I]'
- ''
- '&8[&cโ˜ &8] <SOLID:ff1c55>{0}'
- '&7Resurrecting the dead... &f(<SOLID:ff1c55>{1}&f)'
- '<SOLID:ff1c55>โš  &fDurability left: &4{2} breaks'
# Note: Select which lines to update (with placeholders). It is more efficient than updating the whole placeholder.
updateLines: [2,3,4]
offset:
X: 0.5
Y: 2.5
Z: 0.5
recipe:
enabled: true
layout:
- '-*-'
- '&+&'
- '-*-'
items:
"*":
material: "SOUL_LANTERN"
"+":
material: "BEACON"
"-":
material: "IRON_INGOT"
"&":
material: "HEART_TIER1"