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'.
|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|
This will drop a gold block as an item.
This will drop a red tulip. Without the damage, a poppy would be dropped.
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"))
This will drop a diamond with the display name 'Lucky Diamond'. The 'Name' value specifies the display name of the item.
This will drop an orange tulip with the display name 'Happy Flower', in dark purple. See 3.2 Hash Variables for more information.
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.
NBT Tag Format: NBTTag=(ench=[(id=integer,lvl=integer),(...),(...)])
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.
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.
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),(...),(...)])
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.
This will drop a potion that appears as a Potion of Regeneration II, with the following effects:
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