Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7745d21 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsocha committed Nov 20, 2023
1 parent 5c89bde commit cf12b35
Show file tree
Hide file tree
Showing 7 changed files with 2,942 additions and 0 deletions.
6 changes: 6 additions & 0 deletions _sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- [Configuration files](/)
- [Outcomes](outcomes.md)
- [Property values](property-values.md)
- [Combined outcomes](combined-outcomes.md)
- [Custom data tags](custom-data-tags.md)
- [Add-ons](add-ons.md)
100 changes: 100 additions & 0 deletions add-ons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Add-ons

Add-ons add new blocks and items similar to the standard ones, but with custom outcomes.

## Installing

1. Run Minecraft at least once with the Lucky Block mod installed.
2. Place the add-on file/folder in `.minecraft/addons/lucky/`
3. Run Minecraft again, now with the add-on installed.

When using an add-on on a server, the add-on must installed on both the server and the client due to the custom textures.

## Creating

The file structure of an add-on is very similar to the standard [configuration files](configuration-files), but with additional assets. Add-ons can be distributed as a folder, `.zip` archive (preferred), or `.jar` archive.

```
{add-on name}{.zip,.jar,folder}
plugin_init.txt
drops.txt
sword_drops.txt
bow_drops.txt
potion_drops.txt
properties.txt
recipes.txt
natural_gen.txt
luck_crafting.txt
structures.txt
structures/...
assets/lucky/textures/blocks
assets/lucky/textures/blocks/custom_lucky_block.png
assets/lucky/textures/items/custom_lucky_bow_standby.png
assets/lucky/textures/items/custom_lucky_bow_pulling_0.png
assets/lucky/textures/items/custom_lucky_bow_pulling_1.png
assets/lucky/textures/items/custom_lucky_bow_pulling_2.png
assets/lucky/textures/items/custom_lucky_potion.png
assets/lucky/textures/items/custom_lucky_sword.png
assets/lucky/models/item/custom_lucky_bow_pulling_0.json
assets/lucky/models/item/custom_lucky_bow_pulling_1.json
assets/lucky/models/item/custom_lucky_bow_pulling_2.json
assets/lucky/models/item/custom_lucky_sword.json
assets/lucky/models/item/custom_lucky_block.json
assets/lucky/models/item/custom_lucky_bow.json
assets/lucky/models/item/custom_lucky_potion.json
assets/lucky/models/block/custom_lucky_block.json
assets/lucky/blockstates/custom_lucky_block.json
assets/lucky/lang/en_us.json
pack.mcmeta
```

**Instructions**

- Download the template add-on (below) to get started.
- Edit `plugin_init.txt` to specify the ID of the new block and (optionally) items. If an item is omitted, it won't be added to the game and you can ignore all configuration files related to it.
```
block_id=custom_lucky_block
sword_id=custom_lucky_sword
bow_id=custom_lucky_bow
potion_id=custom_lucky_potion
```
- Rename all of the files containing the word `custom` to match the new IDs.
- Edit each `.json` in `blockstates`/`models` and update the IDs within. You could potentially do a find-and-replace on the word `custom`.
- These files can also be used to create custom models.
- Open `en_us.json` and update both the IDs and in-game display names.
```
{
"block.lucky.custom_lucky_block": "Custom Lucky Block",
"item.lucky.custom_lucky_sword": "Custom Lucky Sword",
"item.lucky.custom_lucky_bow": "Custom Lucky Bow",
"item.lucky.custom_lucky_potion": "Custom Lucky Potion"
}
```
- You can also add translations for other languages.
- Update the texture `.png` files.
- Leave the file `pack.mcmeta` unchanged. Add-ons are loaded in a similar way to resource packs, and an error message will appear if this file doesn't exist. Otherwise it serves no purpose.
- Use the remaining configuration files customize the add-on as you like.
- When referencing the ID of the new block/items, use the prefix `lucky:`.

## Template add-on


<table>
<thead>
<th>Version</th>
<th>Minecraft Version</th>
<th>Lucky Block Version</th>
<th>Link</th>
</thead>
<tbody>
{{#each projects.custom-lucky-block-java}}
<!-- prettier-ignore -->
<tr>
<td>{{{this.version}}}</td>
<td>{{{this.dependencies.minecraft.formattedVersionRange}}}</td>
<td>{{{this.dependencies.lucky-block.formattedVersionRange}}}</td>
<td><a href="/instant-download/custom-lucky-block-java/{{{this.version}}}">Download</td>
</tr>
{{/each}}
</tbody>
</table>
47 changes: 47 additions & 0 deletions combined-outcomes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Combined outcomes

## Groups

Groups are simply a combination of multiple outcomes, all of which take place at the same time. Each outcome is separated by a semicolon `;`, e.g.

```
group(type=item,ID=diamond;type=entity,ID=pig)
```

You can also specify the number of outcomes that should be selected. Each outcome has an equal chance, though the same one will never be selected twice.

```
group:2:(type=item,ID=iron_sword;type=item,ID=iron_pickaxe,type=item,ID=iron_axe)
```

Groups can also be nested within groups:

```
group(ID=wooden_sword;group:1:(type=entity,ID=creeper;type=entity,ID=zombie))
```

## Luck level

- Property: `@luck`

Luck level is and additional property which describes how 'lucky' an outcome is, in the range `-2..2`. When the luck property of the source block/item/etc is increased/decreased, outcomes with a higher/lower luck level become more likely. The default luck level is `0`. Below is a rough guide for all of the levels:

- `-2`: Very unlucky. Might kill the player or do great damage.
- `-1`: Unlucky. Does something that the player would not want, or something completely useless.
- `0`: Neutral. Not bad, not useless, but fairly average.
- `1`: Lucky. Something that the player would be happy to receive.
- `2`: Very lucky. The best thing the player could hope for.

```
ID=diamond,amount=4@luck=1
```

## Chance

- Property: `@chance`

Chance is an additional property which describes how likely the outcome is to be chosen. By default, all outcomes are equally likely. Using `@chance=0.5` makes an outcome half as likely, while `@chance=4` makes it 4 times as likely.

```
type=entity,ID=Wither@luck=-2@chance=0.1
```
Loading

0 comments on commit cf12b35

Please sign in to comment.