Lucky Block Documentation

Contents

2.2 Items

2.2 Items


The item type is used to indicate that the Lucky Block will drop an item when harvested. This is the most basic type of drop, and it is used as the default type of drop when no other type is specified. It can be specified as by setting the type property to 'item'.

Properties

Property Value Type Default Value Example Description
ID* numerical ID/text ID - type=item,ID=diamond_sword OR type=item,ID=276 Used to specify the ID of the item that is being dropped. Both numerical and text IDs are supported, however text IDs are recommended.
damage positive integer 0 type=item,ID=dye,damage=6 Used to specify the 'damage' of the item. This value is used to store additional data of an item, such as how damaged a tool is, or the color of dye. All damage values can be found here.
NBTTag See 4. NBT Tags - type=item,ID=potion,NBTTag=(...) Used to specify the NBT Tag of an item. This property stores additional data about the item, a full list of item NBT Tags can be found here.
All base properties See 2.1 Base Properties See 2.1 Base Properties See 2.1 Base Properties See 2.1 Base Properties

* Required

 

Basic Examples


type=item,ID=gold_block

This will drop a gold block as an item.

type=item,ID=red_flower,damage=4

This will drop a red tulip. Without the damage, a poppy would be dropped.

ID=wooden_pickaxe,damage=30

This will drop a wooden pickaxe that has mined 30 blocks, therefore affecting its durability bar. Note the lack of the type property. It will still work as item is the default type.

 

Display Name Examples


NBT Tag Format: NBTTag=(display=(Name="text"))

type=item,ID=diamond,NBTTag=(display=(Name="Lucky Diamond"))

This will drop a diamond with the display name 'Lucky Diamond'. The 'Name' value specifies the display name of the item.

type=item,ID=red_flower,damage=5,NBTTag=(display=(Name="$5Happy Flower"))

This will drop an orange tulip with the display name 'Happy Flower', in dark purple. See 3.2 Hash Variables for more information.

 

Book Examples


NBT Tag Format: NBTTag=(title="text",author="text",pages=["text","text","text"...])

type=item,ID=written_book,NBTTag=(title="Lucky Block Book",author="Player In Distress",pages=["Hope you're enjoying","configuring custom","books!"])

This will drop a Written Book with the title 'Lucky Block Book' written by 'PlayerInDistress'. The three pages will read: 'Hope you're enjoying', 'configuring custom', 'books'. title is the title of the book, author is the name of the player who wrote the book and each page is a separate string in the pages tag list.

type=item,ID=writable_book,NBTTag=(pages=["$c$lred bold\n$9$oblue italics\n$a$ngreen underlined\n\n$6$l$o$ngold everything!"])

This will drop a Book and Quill, with the title and author not specified, as the book is not yet 'signed'. The single page will read, on separate lines: 'red bold', '>blue italics', 'green underlined', 'gold everything!'. The '\n' character is used to indicate a new line. The last line will be two new lines below the previous line, as two '\n' characters are used. Each line of text has specific formatting codes applied to it, see 3.2 Hash Variables for more information.

 

Enchanting Examples


NBT Tag Format: NBTTag=(ench=[(id=integer,lvl=integer),(...),(...)])

type=item,ID=diamond_sword,NBTTag=(ench=[(id=16,lvl=4),(id=20,lvl=2)])

This will drop a diamond sword with Sharpness IV (id=16,lvl=4) and Fire Aspect II (id=20,lvl=2). Each tag within the ench tag list represents an enchantment. id is the ID of the enchantment, representing the type of enchantment, and lvl is the level of the enchantment. In game, the maximum level depends on the enchantment, but never exceeds 5 (V). Higher levels can be specified, however they will not be displayed correctly.

type=item,ID=golden_chestplate,NBTTag=(ench=[(id=0,lvl=2),(id=3,lvl=4),(id=4,lvl=1),(id=7,lvl=3)])

This will drop a golden chestplate with Protection II (id=0,lvl=2), Blast Protection IV (id=3,lvl=4), Projectile Protection I (id=4,lvl=1) and Thorns III (id=7,lvl=3). There is no limit to the amount of enchantments that can be added. A full list of enchantments can be found here.

 

Potion Examples


type=item,ID=potion,damage=8226

This will drop a Potion of Swiftness II. The damage determines the type of potion. Instructions on how damage is determined can be found here. Alternatively, a table of damage values for all potions can be found here. To add multiple effects to a potion, an NBT Tag is required.

 

NBT Tag Format: NBTTag=(CustomPotionEffects=[(Id=integer,Amplifier=integer,Duration=integer),(...),(...)])

type=item,ID=potion,damage=16388,NBTTag=(CustomPotionEffects=[(Id=19,Duration=2400),(Id=7,Amplifier=1)])

This will drop a potion that appears as a Splash Potion of Poison, with the Poison effect lasting for 2:00 minutes (Id=19,Duration=2400) and the Instant Damage effect causing 12 (6 hearts) damage (Id=7,Amplifier=1). The damage does not affect the effects the potion will give, however it does determine the name of the potion, look of the potion and whether it is a regular or splash potion. Each tag withing the CustomPotionEffects tag list represents an effect. Id is the ID of the effect. Amplifier determines how 'strong' the effect is, acting differently with on effect. The Amplifier does not need to be specified, defaulting to 0, and on some effects it makes no difference. A list of effect IDs and how they are affected by the Amplifier (Strength) can be found here.

 

Finally, Duration is the amount of time, in ticks, the effect will last. There are 20 ticks in a second, therefore the duration is specified as the desired length in seconds * 20. Some effect which occur instantly do not require the Duration to be specified, defaulting it to 0.

type=item,ID=potion,damage=16388,NBTTag=(CustomPotionEffects=[(Id=0,Amplifier=2,Duration=5400),(Id=6,Amplifier=2),(Id=11,Amplifier=1,Duration=2400),(Id=14,Duration=3600)])

This will drop a potion that appears as a Potion of Regeneration II, with the following effects:

  • Speed increasing speed by 60% and lasting for 4:30 minutes (Id=0,Amplifier=2,Duration=5400)
  • Instant Health healing 16 (8 hearts) health (Id=6,Amplifier=2)
  • Resistance reducing damage by 40% and lasting for 2:00 minutes (Id=11,Amplifier=1,Duration=2400)
  • Invisibility lasting for 3:00 (Id=14,Duration=3600)

Note that Regeneration will not be included as an effect, even though it will appear in the potion's name and texture. There is no limit to the amount of effects that can be added.

Back Forward

Copyright Minecraft Ascending 2015