Lucky Block add-ons allow for the installation of custom lucky blocks. An add-on will add a separate block to the game which acts similarly to a lucky block, though with custom properties
When an add-on file is downloaded, it can be easily installed in a very similar way to mods and recourse packs. First, however, the game should be run with only the original Lucky Block installed. This will make sure that the mod works and will create the required folders. Then, the add-on file can be placed in .minecraft/addons/lucky_block folder. When Minecraft is restarted, the add-on will be installed and will add a new block to the inventory.
When using an add-on on a server, the add-on must installed on both the server and the client. While most of the configuration is server-side, the texture must be on the client-side.
Creating Add-ons (Automatically)
The files required for Add-ons to function can be generated automatically using the tool below. Extract the program, run the .jar file and enter a 'keyword' for the Add-on. This will generate a folder with the name of your Add-on, and pre-configured files inside. Next, edit the textures and the configuration files (drops.txt, etc.) in the generated Add-on folder. Finally, to finish the Add-on, put the contents of the Add-on folder into a .zip/.jar.
Download Add-on Generator (1.9)
Download Add-on Generator (1.8)
Creating Add-ons (Manually)
The files inside an add-on are arranged in the exact same way as in the .minecraft/config/lucky_block/version-X.X.X folder, but also contain a variety of different files needed for the add-on. A lucky block add-on file is structured in the following way.
- Add-on Name.zip/.jar/folder
Firstly, the add-on is contained either within a folder, .zip file or .jar file. Inside are the files needed to configure the add-on. Most of them are identical to the files used for configuring the default Lucky Block properties, but others are different. Below are instructions for configuring the add-on. Note that because add-ons add new blocks, a fair amount of file configuration is first required. This should not be difficult, however, if the instructions are followed carefully.
- Download an add-on template to simplify the process. You can use the one below:
Download Template Add-on
- Open plugin_init.txt. Inside is a single line containing the ID of the custom add-on luck block (As of the Combat Update, Lucky Item IDs are included). In the template, this will be lucky_block_custom, but it must be changed to avoid add-on conflict. This is the ID that will be used in commands and many other places, and must be unique. It should only contain lowercase letters and underscores. An example of a possible ID is below.
// (Combat Update)
- Rename all of the files named lucky_block_custom to the new ID (The same applies for Combat Update Lucky Items). In this example, it would be lucky_block_red. If the name is not changed, the files will not be recognized.
- Open each .json file that was renamed (i.e. all except the texture .png file) and replace the text 'lucky_block_custom' with the new ID, in this case lucky_block_red (Do the same for Lucky Items). This is the only text that should be changed within the files. These files are used for the model and state of the block, more information about the format can be found here. If desired, the model of the block can be configured using these files, but otherwise it is only relevant to replace the IDs.
- Open en_US.lang. This file contains the in-game name of the block (And Lucky Items). Note that multiple files could be added in this directory containing the name in different languages (e.g. fr_FR.lang for French), but this is not necessary. Two things need to be changed in the file. Firstly, tile.luckyBlockCustom.name needs to contain the new ID, but in a different different format. Instead of underscores, each word is capitalized except the first. Therefore, lucky_block_red becomes luckyBlockRed. Secondly, the text which specifies the in-game name should be changed to anything desired. An example is below.
tile.luckyBlockRed.name=Lucky Block Red
// (Combat Update)
item.redLuckySword.name=Red Lucky Sword
item.redLuckyBow.name=Red Lucky Bow
item.redLuckyPotion.name=Red Lucky Potion
- The texture used by the add-on block (and Lucky Items) should be changed. Note that the texture is now contained in the file name lucky_block_red.png. The texture should be 16x16 pixels, but may be a larger resolution if desired (must be a power of two: 16, 32, 64, 128 etc.). The new texture may be anything, though in this case could likely be a red re-colored version of the original Lucky Block.
- Ignore the pack.mcmeta file. Add-ons are loaded in a similar way to resource packs, and therefore an error message will appear if this file doesn't exist. However, it serves no purpose, and can be left as it is.
- The add-on setup is now complete. It should be tested at this stage, and if it does not work, the files should be checked over to make sure that the ID re-naming has been done correctly.
- If everything works, all of the configuration files (such as drops.txt) can be modified to create a unique Lucky Block. Refer to the documentation for information on configuring all of the properties.
Note that when using the ID of the new Lucky Block in commands, it must be prefixed with lucky:, similarly to the regular Lucky Block.
/give PlayerName lucky:lucky_block_red