Overview
I made the Item Generator Script for Aegorin.de, a Minecraft Roleplay Server.
In the concept it was only supposed to be made to generate goods in a chest for a town as an upgrade so they have a daily supply of their chosen materials. What they should get was pre defined so i could have made the output static in the code. But, i engineered it, so you can modify it at any time with any items, with any percentages and amounts, and be used versatile for other use aswell. (E.g. Lootspawns in certain parts of the world)
Which is quite important in a community/team environment where concepts change and are prone to reworks.
Documentation
Description
This Script is part of a bigger system, that is called „Town System“ which consists of a concept with multiple scripts, aswell as regulations like a ruleset for players.
Permissions
aegorin.script.itemgen
= Allows access to the itemgen command, which includes all subcommands and enables destroying item generators.
Commands
/itemgen
Base command
Alias: /ig
Permission: aegorin.script.itemgen
/itemgen create <typename>
Command to create a generator type.
/itemgen delete <typename>
Command to delete a generator type.
/itemgen edit <typename> addItem <weight>
Adds the item you’re currently holding to a generator type with the specified weight.
/itemgen edit <typename> removeItem <itemname>
Removes an item from a generator type.
/itemgen edit <typename> amount <minimum> <maximum>
Sets the number of items per day per player that should/can be generated in the city.
/itemgen set <typename>
Turns the chest you’re currently looking at into a generator of the specified type.
Only works if the chest is located on a city chunk and you are standing no more than 7 blocks away.
/itemgen list <typename>
Displays a list of the settings and configured items for the specified generator type.
/itemgen generate
Manually triggers loot generation for one day for the generator you’re currently looking at.
With:
/ex flag server generator.util.maintenance
You can disable loot generation in all generators if issues occur.
