Introduction
Itemizer is a Sponge Minecraft plugin that allow custom item creation as described in configuration files, as well as random item generation. Edit the name, the description, enchantments and crafts recipes.
The plugin implements the command /retrieve <id>
, which gives a configured item to the player.
It also implements /fetch <id>
, which gets a random item from a given item pool.
plugin development
Also, this plugin can be useful for developers. With sponges services, fetch
and retrieve
can be used in your development.
if (optionalIItemService.isPresent()) {
IItemService iItemService = optionalIItemService.get();
iItemService.retrieve(1);
iItemService.fetch(2);
}
Get started
Item registration
To register an new item just write in a configuration file named itemizer_items.conf
items = [
{
id: 1,
type: "minecraft:stone_axe",
lore: "This axe is not really efficient...\nHowever it is sharp on your finger.",
unbreakable: true,
enchants {
efficiency {level = 3}
},
miners: [
2
]
},
{
id: 2,
type: "wooden_sword",
name: "Training stick",
miners: [
1
]
}
]
Harvesting capabilities
With the minecraft adventure mode and the tool’s canMine property, this plugin can set player mining capability through his tools.
miners = [
{
id: 1,
mine_types: [
"minecraft:coal_ore",
"minecraft:iron_ore"
]
},
{
id: 2,
mine_types: [
"minecraft:gold_ore"
],
inherit: [
1
]
}
]
An item referencing miner 1 will be able to break coal and iron ore, whereas referencing miner 2 allow breaking of coal, iron and gold ore.
Items pool
If you want to add some randomness to your creation, Itemizer have an item pool system. When you ask the pool, it sends you back a random item. probability can be personalized via the configuration file.
pools = [
{
id: 1,
items: [
{
probability: 0.5,
type: "minecraft:cooked_porkchop"
},
{
probability: 0.2,
ref: 1
}
]
}
]
The first pool of item has a 50% chance of getting a porkchop, 20% chance of getting the configured item with id 1, and 30% chance of getting nothing.
Links
visit the plugin GitHub repository to learn more about how it work.
Feel free to give us feedback about your experience with Itemizer and how we could improve it .