Item
The format of items
Introduction
The item configuration format is a standardized system. Designed with versatility in mind, this format can be utilized in any context where items are needed. Common applications of this format include fishing loot, fishing rods, fishing baits, and even within market GUIs
The items within the configuration are structured around keys. Each key contains a set of parameters that determine the characteristics and behavior of the item. The given example, "common_bait", illustrates how a typical item is structured.
Key:
The identifier for the item. In the provided example, the key is "common_bait".
Material: (1.17-latest)
This defines the base material or the type of the item. For "common_bait", the material is set to "paper".
Example:
Display: (1.17-latest)
This section provides the visual and descriptive aspects of the item.
Name: Determines the displayed name of the item. In this case, the name is "Common lures", and it's styled using color codes and text formatting.
Example:
Lore: This is a list of descriptive lines that provide more information about the item. Each line can be formatted and colored, similar to the name.
Example:
Custom Model Data: (1.17-latest)
This parameter is used to assign a unique model data to the item. It can be especially useful when developers want to provide custom item textures or models in games.
Example:
Amount: (1.17-latest)
The quantity of the item that is being defined.
Example:
Tag: (1.17-latest)
Allows the addition of a Custom Fishing tag to the item. This tag is quite important for the plugin to identify items from CustomFishing. Disabling this might cause some issues.
Example:
Unbreakable: (1.17-latest)
Dictates whether the item is unbreakable
Example:
Item Flags: (1.17-1.20.4)
Lists specific flags altering the item's appearance or behavior. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/ItemFlag.html
Example:
Max Durability: (1.17-latest)
Sets the item's custom durability. This option would turn the item into a custom durability item. If you prefer the new custom durability system introduced in 1.20.5, see the components section below.
Example:
Random Durability: (1.17-latest)
Decides if the item's durability is set randomly when acquired. This works for both vanilla durability and plugin's custom druability.
Example:
NBT: (1.17-latest)
Enables further customization using Named Binary Tags. If the tag value type is not specified, it might throw errors in some rare cases.
You can manually add the type to fix it for instance:
Available value types: (Int) (Byte) (String) (Float) (String) (Double) (Short) (Long) (UUID) (Boolean) (IntArray) (ByteArray)
Example:
Components: (1.20.5-latest)
This is one of the most incredible updates to the plugin since 2.2.0. This section allows you to use any component type provided by Minecraft. Here are some examples to help you understand how to configure the component in CustomFishing configs. https://minecraft.wiki/w/Data_component_format#Item_format
Example1:
Example2:
Example3: (Official custom durability system introduced in 1.20.5)
Price: (1.17-latest)
Description: Determines the item's price.
Base: Initial price of the item.
Bonus: Multiplier applied based on size.
Example:
Stackable: (1.17-latest)
Indicates if the item can be stacked with similar items.
Example:
Placeable: (1.17-latest)
Allows the item (Player Head) to be placed
Example:
Head64: (1.17-latest)
Points to a base64 encoded string, generally utilized for custom player head textures. https://minecraft-heads.com/custom-heads/
Example:
(Stored) Enchantments: (1.17-latest)
Details enchantments that are directly applied to the item.
Example:
Random (Stored) Enchantments: (1.17-latest)
Enumerates possible enchantments that might be applied randomly upon the item's retrieval. Each potential enchantment is associated with a level and a chance of being applied.
Example:
(Stored) Enchantment Pool: (1.17-latest)
Enchantment pool provides the ability to control the amount of enchantments on one item instead of trying applying each configurated enchantment by probability. Plugin would not allow conflict enchantments to exist at the same time and EcoEnchants is totally compatible.
From the example, we can infer that player has 60% chance of getting 1 enchantment, 30% chance of getting 2 and 10% chance of getting 3.
1
6
60%
2
3
30%
3
1
10%
Now we assume that player can get 2 enchantments.
First enchantment
unbreaking
3
1
2.5%
unbreaking
2
3
7.5%
unbreaking
1
6
15%
sharpness
3
1
2.5%
sharpness
2
3
7.5%
sharpness
1
6
15%
efficiency
3
2
5%
efficiency
2
6
15%
efficiency
1
12
30%
Second enchantment (Assuming the first enchantment is sharpness)
unbreaking
3
1
3.33%
unbreaking
2
3
10%
unbreaking
1
6
20%
sharpness
3
1
0%
sharpness
2
3
0%
sharpness
1
6
0%
efficiency
3
2
6.67%
efficiency
2
6
20%
efficiency
1
12
40%
Last updated