Plugin thread continued on Ore: Itemizer - Customs items configuration

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 :slight_smile: .

4 Likes

How can I increase my item’s damage? :sweat_smile:

(Sorry for language usage. This message I use google translate)

I m sorry, this post is old and quite deprecated, I really need to update it with the new features. if you are using the last release you can add these lines in your item configuration :

attributes : [
{
name: "generic.attackDamage"
amount : 18
operation : 0
slot : "mainhand"
}
]

This will set the damage of the item to +18 when it’s hold in main hand. you can use all attributes,operation and slot that Minecraft offer. see the wiki.

We will update this post soon with the new features.

ps : Je parle francais au cas où :wink:

1 Like

thank you so much for replying to my help. :blush::grin: