Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added rarities #69

Merged
merged 3 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/all-plugins/the-item-lookup-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ sidebar_position: 3

## What is the Item Lookup System?

The item lookup system is how items are loaded from configs. It's designed to be extremely flexible and intuitive, allowing you to use custom items, stacks, enchantments, etc. wherever you want, without having to worry about
what plugin they're from.
The item lookup system is how items are loaded from configs. It's designed to be extremely flexible and intuitive, allowing you to use custom items, stacks, enchantments, etc. wherever you want, without having to worry about what plugin they're from.

## Crafting Recipes

Expand Down Expand Up @@ -39,17 +38,26 @@ In each string is the key for an item. A key looks one of a few ways
- An exact item NBT tag: (e.g. `{id:"stone",Count:3,tag:{Name:"your name"}}`)
- An item tag: (e.g. `#talismans:talisman` or `#items_axes`)

#### Vanilla Materials
### Vanilla Materials

By default, a vanilla material (e.g. `diamond_pickaxe`) will not accept custom items with the same material. For example, if you have an EcoItems item with `diamond_pickaxe` as its base material,
then that item will not be recognised as a `diamond_pickaxe`.

If you want custom items to be accepted, place a `*` at the start, so `"diamond_pickaxe"` becomes `"*diamond_pickaxe"`. Outside of crafting recipes, most plugins use `*` items in their
default configs for performance reasons.

#### Item Tags
### Item Tags

Item tags are groups of items. A list of vanilla tags can be found [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Tag.html), and you can use them with `#tag`, e.g. `#signs`.
Item tags are groups of items. A list of vanilla tags can be found [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Tag.html), and you can use them with `#tag`, e.g. `#signs`. These are especially useful in filters and recipes where you may use the same lists of items in different places.

You can create your own tags in [tags.yml](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#item-tags) too, use `libreforge:#<tag_id>` to reference these.
```yaml
tags:
- id: example_tag # The ID, used in the item-lookup-system.
items: # The item's contained in the tag.
- "netherite_sword"
- "diamond_sword"
```

A list of custom item tags can be found later in this page.

Expand All @@ -75,10 +83,10 @@ Items can have modifiers applied to them. For example, lets say you're configur
- **Custom Model Data:** You can specify custom model data with `custom_model_data:<id>`
- **Spawner Entity:** You can specify the spawner entity with `entity:<id>`
- **Leather Armor Color:** You can specify the leather armor color with `color:#hex`, e.g. `color:#303030`
- **Armor Trims:** You can specify armor trims with `trim:<material>:<pattern>`, e.g. `trim:emerald:snout`

These modifiers are only available on Paper 1.21+:
These modifiers are only available on **Paper 1.21+**:

- **Armor Trims:** You can specify armor trims with `trim:<material>:<pattern>`, e.g. `trim:emerald:snout`
- **Fire Resistance:** You can make an item fire resistant with `fire_resistant`
- **Enchantment Glint:** You can give an enchantment glint with `glint`
- **Item Name:** You can set the item name (different to display name) with `item_name:<name>`
Expand Down
77 changes: 77 additions & 0 deletions docs/ecoitems/additional-configuration-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Additional Configuration Options
sidebar_position: 2
---

## How to add additional recipes
Each recipe is its own config file, placed in the `/recipes/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!

The ID of the recipe is the file name. These currently do not have function, just make sure they're unique.
ID's must be lowercase letters, numbers, and underscores only.

Additional recipes can be used for EcoItems but also for items from other plugins, such as additional recipes for Pet Spawn Eggs from EcoPets, or creating a recipe for Enchanted Golden Apples.
## Example Recipe Config
```yaml
result: ecoitems:enchanted_emerald 9 # The item to give, read here for more: https://plugins.auxilor.io/all-plugins/the-item-lookup-system

recipe: # The recipe, read here for more: https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes
- ""
- emerald_block 32
- ""
- emerald_block 32
- emerald_block 32
- emerald_block 32
- ""
- emerald_block 32
- ""

permission: "ecoitems.craft.enchanted_emerald_block_craft" # (Optional) The permission required to craft this recipe.
```

### Understanding all the sections

**result:** The item(s) being crafted, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system).

**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes)

**permission:** (Optional) The permission required to craft the recipe.

## How to add rarities
Each rarity is its own config file, placed in the `/rarities/` folder, and you can add or remove them as you please. There's an example config called `_example.yml` to help you out!

The ID of the rarity is the file name. This is what you use in the EcoItem configs, read here for more: [How to make an Item](https://plugins.auxilor.io/ecoitems/how-to-make-a-custom-item).
ID's must be lowercase letters, numbers, and underscores only.

Rarities in EcoItems are a system for categorizing items based on their rarity level. Each rarity is defined by a specific tag in lore to show players which items are harder to obtain and/or which loot items are better.

## Example Rarity Config

```yaml
# The ID of the rarity is the name of the .yml file,
# for example common.yml has the ID of common
# You can place rarities anywhere in this folder,
# including in subfolders if you want to organize your rarity configs
# _example.yml is not loaded.

# The lore added to items with this rarity
lore:
- "&a&lCOMMON"

# The weight of the rarity. Higher weights take precedence over lower weights,
# so if an item has multiple rarities, the one with the highest weight will be used.
weight: 1

# The items that have this rarity
# Read here: https://plugins.auxilor.io/all-plugins/the-item-lookup-system
# EcoItems items should specify the rarity in their config rather than here
items:
- diamond
```

### Understanding all the sections

**lore:** The lore added to the item with this rarity. Options for this can be found in [config.yml](https://github.com/Auxilor/EcoItems/blob/master/eco-core/core-plugin/src/main/resources/config.yml).

**weight:** The weight of the rarity. If an item has multiple rarities, the one with the highest weight will be shown.

**items:** The items to have this rarity, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system). For EcoItems, you should specify it in the item config.
4 changes: 2 additions & 2 deletions docs/ecoitems/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "API"
sidebar_position: 4
title: API
sidebar_position: 5
---

## Source Code
Expand Down
4 changes: 2 additions & 2 deletions docs/ecoitems/commands-and-permissions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Commands and Permissions"
sidebar_position: 3
title: Commands and Permissions
sidebar_position: 4
---

## `/ecoitems give` (Give players items)
Expand Down
2 changes: 1 addition & 1 deletion docs/ecoitems/ecoitems-effects/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Effects System",
"position": 2
"position": 3
}
39 changes: 6 additions & 33 deletions docs/ecoitems/how-to-make-a-custom-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ slot: mainhand
base-damage: 12 # (Optional) The item base damage
base-attack-speed: 1.5 # (Optional) The item base attack speed

# (Optional) The rarity of the item
rarity: rare

# The effects of the item (i.e. the functionality)
# See here: https://plugins.auxilor.io/effects/configuring-an-effect
effects:
Expand Down Expand Up @@ -80,7 +83,7 @@ conditions:

**crafting-permission:** (Optional) The permission required to craft the recipe.

**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes)
**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes). You can create additional recipes, read here for more: [How to add additional recipes](https://plugins.auxilor.io/ecoitems/additional-configuration-options#how-to-add-additonal-recipes).

**recipe-give-amount:** The amount of items to give when crafted.

Expand All @@ -90,6 +93,8 @@ conditions:

**base-attack-speed:** the item base attack speed. You can find the vanilla attack speed values on the [Minecraft Wiki](https://minecraft.wiki/w/Damage#Dealing_damage).

**rarity:** The rarity of the item, read here for more: [Rarities](https://plugins.auxilor.io/ecoitems/additional-configuration-options#how-to-add-rarities).

### Effects & Conditions

The effects section is the core functionality of the EcoItem. You can configure effects, conditions, filters, mutators and triggers in this section to run whilst the item is held or used.
Expand All @@ -98,35 +103,3 @@ Check out [Configuring an Effect](https://plugins.auxilor.io/effects/configuring

For more advanced users or setups, you can configure chains in this section to string together different effects under one trigger. Check out [Configuring an Effect Chain](https://plugins.auxilor.io/effects/configuring-a-chain) for more info.


## How to add additional recipes
Recipes work the same - they are each config files placed in the `/recipes/` folder, and you can add or remove them as you please. There's also an example config called `_example.yml` to help you out!

The ID of the recipe is the file name. This currently doesn't have a function but make sure it is unique.
ID's must be lowercase letters, numbers, and underscores only.

## Example Recipe Config
```yaml
result: ecoitems:enchanted_emerald 9 # The item to give, read here for more: https://plugins.auxilor.io/all-plugins/the-item-lookup-system

recipe: # The recipe, read here for more: https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes
- ""
- emerald_block 32
- ""
- emerald_block 32
- emerald_block 32
- emerald_block 32
- ""
- emerald_block 32
- ""

permission: "ecoitems.craft.enchanted_emerald_block_craft" # (Optional) The permission required to craft this recipe.
```

## Understanding all the sections

**result:** The item(s) being crafted, read here for more: [Item Lookup System](https://plugins.auxilor.io/all-plugins/the-item-lookup-system).

**recipe:** The recipe, read here for more info: [Crafting Recipes](https://plugins.auxilor.io/all-plugins/the-item-lookup-system#crafting-recipes)

**permission:** (Optional) The permission required to craft the recipe.
2 changes: 1 addition & 1 deletion docs/effects/all-conditions/above_xp_level.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ Requires the player to be above a certain xp level
```yaml
- id: above_xp_level
args:
levels: 100 # The minimum XP level
level: 100 # The minimum XP level
```
Loading