Skip to main content

Creating New Items

Introduction to itemsโ€‹

LifestealCore has three types of items, the hearts, the sacrificial scrolls and the revive beacons. Items can be edited through items.yml.

All items are fully configurable, as per display names, lore, material (supports custom skulls and custom models), material data, item flags, glow and crafting recipe. Each item category has its own sub-settings, which will be analysed further down. You can edit the default item types or add new ones (simply copy an existing section and paste it).

Quick breakdown:

  • Hearts: Increase the total amount of hearts when consumed.
  • Sacrificial Scrolls: Sacrifice hearts and provide a temporary boost (potion effects).
  • Revive Beacons: Resurrect eliminated players over a period of time.

Heartsโ€‹

  • Hearts can be consumed by players to increase their total health. Hearts will be consumed even if their addition exceeds the heart limit (e.g The heart limit is set to 100, a player has 99 hearts and consumes a heart that gives them +3 hearts. The heart will be consumed but only 1 extra heart will be added, the rest will be lost). If a player has max hearts, they can't use the 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โ€‹

  • Sacrificial Scrolls (effect hearts) can be consumed by players to give them temporary boosts (potion effects), while sacrificing some of their hearts. Sacrificing means that those hearts are removed, not damaged. Players will not be able to consume a sacrificial scroll if the hearts required are more or equal to the current hearts the player has.

๐Ÿ“• 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 items (must be blocks that can be placed down), that allow players to revive their eliminated friends. Beacons require to be bound first, this can be achieved by using the /bind <player> command (configurable) while holding a beacon in your hand. The player must not necessarily be an online player, but the selected player must have been on the server before.

๐Ÿ“• 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"