-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the CustomItemGenerators wiki, here I will explain what each entry can do in the machine.yml
file, using the EXAMPLE_GENERATOR_ID as the main example.
#key is the ID
EXAMPLE_GENERATOR_ID:
enabled: true
item:
block: SKULL_ac4970ea91ab06ece59d45fce7604d255431f2e03a737b226082c4cce1aca1c4
name: "Example Generator"
lore:
- "Generates stuff"
energy-capacity: 1024
progress-bar: DIAMOND_SHOVEL
recipe:
type: ENHANCED_CRAFTING_TABLE
grid:
- "AAA"
- "ABA"
- "CCC"
mapper:
- ['A', "BEDROCK"]
- ['B', "@MAGNET"]
- ['C', "@LEAD_INGOT"]
production:
- ["COPPER_INGOT", 10, 5]
- ["DIAMOND", 5, 20]
- ["@CARBONADO", 3, 100]
Starting from the ID:
EXAMPLE_GENERATOR_ID:
Each slimefun machine has an unique string ID, if this isn't unique the machine won't load, so you can't use a name that is already taken by core slimefun or one of the addons you are running.
enabled: true
This is pretty self explanatory, if you set this to false the plugin will skip it and not load the machine at all.
item:
block: FURNACE
name: "Example Generator"
lore:
- "Generates stuff"
This format is used to specify the block placed and the entry in the slimefun book, you can use custom colors with &
or §
and even special characters.
The block:
entry can either be a specific minecraft block or a player head, in the case it is a player head, you will need to write the head in this format:
SKULL_ac4970ea91ab06ece59d45fce7604d255431f2e03a737b226082c4cce1aca1c4
After _
there must be the id of the head from http://textures.minecraft.net/texture/
, if you insert this id in the url you will see that the head of that texture is a luckyblock. It doesn't use player names as they can always change name and skin, in that case it would break the head, this way instead, even if a bit more complex, the texture will always be the same.
energy-capacity: 1024
This is how much energy can the machine itself store, it is like the machine has its own internal battery, the capacity must be greater than the energy consumption of all recipes, otherwise it will never have enough power to craft the item, in case you forget about it, there is a console error/warning that will notify you, in case you misconfigurate something there will always be a warning/error on the console.
progress-bar: DIAMOND_SHOVEL
Each slimefun machine has a progress bar to display the progress of an ongoing recipe, this must be a tool with durability, it can be a bow, it can be a flint and steel, it can be a tool, as long as it can get damage it is a valid item.
recipe:
type: ENHANCED_CRAFTING_TABLE
grid:
- "AAA"
- "ABA"
- "CCC"
mapper:
- ['A', "BEDROCK"]
- ['B', "@MAGNET"]
- ['C', "@LEAD_INGOT"]
This is how you want the recipe to be crafted, the type:
must always be a slimefun machine, so putting something like CRAFTING_TABLE
won't work, you can add addons slimefun machines too, like KITCHEN
added by exotic garden, however this won't work if there are no existing items that use said recipe, as what the plugin internally do is:
- Get all slimefun items
- Get put each recipe type in a set
This is because as of now slimefun doesn't have a registry to keep track of what recipe types actually exist or not.
In case your type
of an addon is not registered correctly, or can't be seen by the plugin, you will be forced to read the code of the addon and copy the namespace key in its RecipeType, this is a bit more sophisticated and it shouldn't happen (unless the addon dev made a questionable design choice).
The grid:
entry is for defining the layout of a recipe, you define 3 list of exactly 3 characters that rapresent the dispenser slots.
Each character is then swapped with its corresponding item in the mapper:
entry, which can be a vanilla item like DIAMOND
or a slimefun item, in which case you need to use the @
before the slimefun item name @SILVER_INGOT
, sometimes the defined ID can be different than the actual item name, to be more precise you would need the exact name that you use to get the slimefun item with /sf give
in case this problem happens.
production:
- ["COPPER_INGOT", 10, 5]
- ["DIAMOND", 5, 20]
- ["@CARBONADO", 3, 100]
We finally reached the important part! What items do you want to generate? The rules I said before about @
refering to slimefun items is still here, and there is one more feature, if you write "COPPER_INGOT 5" then you can specify the produced amount, if there is no space and number 1 will be assumend.
This list defines each production entry a machine can have, this is what each parameter means:
- First parameter: Item type / Slimefun item to generate
- Second parameter: Time in seconds
- Third parameter: Energy consumed every 0.5s (Internally slimefun checkes machines every 0.5s)
So for instance the first entry (["COPPER_INGOT", 10, 5]
) means:
Generate COPPER_INGOT (minecraft's one, not slimefun's as there is no @
), every 10 seconds, consuming 10 energy per second or (5 every 0.5s), if you need to calculate how much energy in total this will require then you will need to do (10 * 5 * 2) = 100 J
.
If you finished reading the guide thank you, and now you are READY to create your own machines o7. You might be interested in reading the additional features.