added wiki page

This commit is contained in:
2025-05-15 00:20:15 +02:00
parent cb848460c0
commit 77f31f7777
11 changed files with 6662 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
+26
View File
@@ -0,0 +1,26 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Enchantio Wiki',
social: [{ icon: 'github', label: 'GitHub', href: 'https://github.com/YouHaveTrouble/Enchantio' }],
sidebar: [
{
label: 'Documentation',
autogenerate: { directory: 'documentation' },
},
{
label: 'Configuration',
items: [
{ label: 'Reference', slug: 'configuration/reference' },
{ label: 'Input types', slug: 'configuration/input-types' },
],
},
],
}),
],
});
+6281
View File
File diff suppressed because it is too large Load Diff
+17
View File
@@ -0,0 +1,17 @@
{
"name": "docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.34.3",
"astro": "^5.6.1",
"sharp": "^0.32.5"
}
}
+7
View File
@@ -0,0 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
@@ -0,0 +1,21 @@
---
title: Input types
description: How to specify common input types in configuration
---
## Tags
There are 2 types of tags that can be used in the configuration:
- `minecraft:item_name` - For specific items, use namespaced vanilla item id. If namespace is not provided, `minecraft` is assumed.
- `#minecraft:item_tag_name` - For <a href="https://minecraft.wiki/w/Item_tag_(Java_Edition)" target="_blank">item tags</a>,
use namespaced tag id. If namespace is not provided, `minecraft` is assumed. Custom tags from other plugins and
datapacks are also supported.
## Slot types
- `ANY` - Any slot.
- `MAINHAND` - Main hand slot.
- `OFFHAND` - Offhand slot.
- `ARMOR` - Any armor slot.
- `HELMET` - Helmet slot.
- `CHESTPLATE` - Chestplate slot.
- `LEGGINGS` - Leggings slot.
- `BOOTS` - Boots slot.
@@ -0,0 +1,143 @@
---
title: Configuration reference
description: Comprehensive reference of all configuration options available in Enchantio
---
## Common options
Options that are available for all (or most) enchantments and are required for the enchantment to work.
### anvilCost
- **Type**: `int`
Cost that will be added to the item when adding the enchantment to it in anvil.
### weight
- **Type**: `int`
Weight of the enchantment. Used if `canGetFromEnchantingTable` is set to true. Higher numbers mean it will come up more
frequently in the enchanting table.
### minimumCost
Minimum cost that will be required for the enchantment to show up in the enchanting table. **This is NOT levels**.
#### base
- **Type**: `int`
Base cost of the enchant.
#### perLevel
- **Type**: `int`
Cost to add per level of the enchantment.
### maximumCost
Maximum cost that will be required for the enchantment to show up in the enchanting table. **This is NOT levels**.
#### base
- **Type**: `int`
Base cost of the enchant.
#### perLevel
- **Type**: `int`
Cost to add per level of the enchantment.
#### canGetFromEnchantingTable
- **Type**: `boolean`
If true, the enchantment can be obtained from the enchanting table. If false, it will not show up in the enchanting
table. Item needs to be *enchantable* for any enchantment to show up for it in the enchanting table.
#### supportedItemTags
- **Type**: `string[]`
[Items and/or item tags](/configuration/input-types#tags) that the enchantment can be applied to.
#### activeSlots
- **Type**: `string[]`
[Slots](/configuration/input-types#slot-types) that the enchantment will be active in.
#### enabled
- **Type**: `boolean`
Decides if the enchantment is registered or not.
:::caution[WARNING]
If you disable an enchantment that is already on an item, it will be removed from the item when it's loaded.
It will also come with warnings in the console. It's not recommended to disable enchantments after they are already in
use.
:::
#### maxLevel
- **Type**: `int`
Maximum level of the enchantment. If set to 1, the enchantment will be a single level enchantment. If this option is not
in the configuration section for specific enchantment, it means it's locked to a single level enchantment, because logic
of the enchantment does not support multiple levels.
### Executioner
#### maxDamageHpThreshold
- **Type**: `double`
Health threshold under which the enchantment will deal more damage.
#### damageMultiplierPerLevel
- **Type**: `double`
Multiplier that will be applied to the damage dealt by the enchantment. Value of the multiplier is added to 1.0, so if
you want to deal 2x damage, set this to 1.0. If you want to deal 3x damage, set this to 2.0 and so on. This is additive.
### Airbag
#### damageReductionPerLevel
- **Type**: `double`
Damage reduction that will be applied to the damage dealt by the enchantment. Value of the multiplier is added to 1.0,
so if you want to reduce damage by 50%, set this to 0.5. If you want to reduce damage by 75%, set this to 0.25 and so
on. This is additive.
### Cloaking
#### ticksToActivate
- **Type**: `int`
Amount of ticks player needs to be sneaking in place for the enchantment to activate.
### Volley
#### additionalArrowsPerLevel
- **Type**: `int`
Amount of arrows to shoot additionally per shot. This is additive, so if you want to shoot 3 arrows, set this to 2.
### Panic
#### panicChancePerLevel
- **Type**: `double`
Chance of the enchantment to activate when player takes damage.
@@ -0,0 +1,80 @@
---
title: Enchantment list
description: A complete list of enchantments available in Enchantio
---
## Enchantments
### Soulbound
**Translation key**: `enchantio.enchantment.soulbound`
**Description**:
Keep the item in your inventory after death.
### Replanting
**Translation key**: `enchantio.enchantment.replanting`
**Description**:
Replants broken crops using seeds in your inventory or from the loot of the crop if no seeds are available in players inventory.
### Telepathy
**Translation key**: `enchantio.enchantment.telepathy`
**Description**:
Teleports dropped items to players location and makes them immediately pickuppable.
### Executioner
**Translation key**: `enchantio.enchantment.executioner`
**Description**:
Items enchanted with executioner will deal more damage to entities under specific health threshold.
### Beheading
**Translation key**: `enchantio.enchantment.beheading`
**Description**:
Adds a chance to drop the head of the entity killed (if entity has a head item available).
### Smelting
**Translation key**: `enchantio.enchantment.smelting`
**Description**:
Automatically smelts drops from mined blocks.
### Airbag
**Translation key**: `enchantio.enchantment.airbag`
**Description**:
Reduces damage from hitting a wall while flying with elytra.
### Homecoming
**Translation key**: `enchantio.enchantment.homecoming`
**Description**:
When totem of undying is activated, player is teleported to their spawn point. If spawn point is not set, player is teleported to world spawn.
### Cloaking
**Translation key**: `enchantio.enchantment.cloaking`
**Description**:
Gives invisibility effect when player is sneaking and not moving.
## Curses
### Curse of Panic
**Translation key**: `enchantio.enchant.panic_curse`
**Description**:
When player takes damage, there is a chance that their hotbar items will be scrambled.
### Curse of Vampirism
**Translation key**: `enchantio.enchant.vampirism_curse`
**Description**:
Player is set on fire when exposed to direct sunlight.
### Curse of Insomnia
**Translation key**: `enchantio.enchant.insomnia_curse`
**Description**:
Player will not count as sleeping for the purpose of skipping the night/thunderstorm.
+27
View File
@@ -0,0 +1,27 @@
---
title: Enchantio Wiki
description: Documentation for Enchantio plugin
template: splash
hero:
tagline: Everything you need to know about Enchantio
actions:
- text: Enchant list
link: /documentation/enchant-list
icon: right-arrow
- text: Configuration reference
link: /configuration/reference
icon: right-arrow
---
import { Card, CardGrid } from '@astrojs/starlight/components';
## Quick links
<CardGrid>
<Card title="Download the plugin" icon="download">
Enchantio is available to download on <a href="https://modrinth.com/plugin/enchantio" target="_blank">Modrinth</a>.
</Card>
<Card title="Get support" icon="discord">
Join the <a href="https://discord.youhavetrouble.me" target="_blank">Discord server</a> to get support.
</Card>
</CardGrid>
+5
View File
@@ -0,0 +1,5 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}