You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ There are no automated tests in this project.
25
25
26
26
### Entry Points
27
27
28
-
-**`VanillaPlusBootstrap`** — `PluginBootstrap` implementation. Runs before plugin enable. Creates item tags (`vanillaplus:tools`, `vanillaplus:weapons`, `vanillaplus:tools_weapons`, `vanillaplus:blaze_rods`), registers eleven custom enchantments into Paper's registry via `RegistryEvents.ENCHANTMENT`, then tags all eleven as tradeable, non-treasure, and in-enchanting-table via `LifecycleEvents.TAGS.postFlatten`.
28
+
-**`VanillaPlusBootstrap`** — `PluginBootstrap` implementation. Runs before plugin enable. Creates item tags (`vanillaplus:tools`, `vanillaplus:weapons`, `vanillaplus:tools_weapons`, `vanillaplus:blaze_rods`), registers twelve custom enchantments into Paper's registry via `RegistryEvents.ENCHANTMENT`, then tags all twelve as tradeable, non-treasure, and in-enchanting-table via `LifecycleEvents.TAGS.postFlatten`.
29
29
-**`VanillaPlus`** — `JavaPlugin` main class. On enable: validates server version, registers all recipes, registers all modules, then calls `ManaManager.startRegenTask()` to begin the shared mana regeneration loop. All modules are active by default (`enabled` defaults to `true` on `ModuleInterface`); override `enabled` to `false` in a specific module to disable it at compile time.
30
30
31
31
### Module System
@@ -44,7 +44,7 @@ Custom enchantments implement **`EnchantmentInterface`** and are registered in `
44
44
-**`invoke(builder)`** — override to configure the enchantment's registry entry (description, anvil cost, level range, weight, slot group, etc.). The default implementation is a no-op pass-through.
45
45
-**`get()`** — looks up and returns the live `Enchantment` instance from the registry after bootstrap.
46
46
47
-
Event handling is done via ordinary `@EventHandler` methods in each enchantment object — there is no generic event type on the interface. Eleven enchantments are actively registered and tagged as tradeable, non-treasure, and in-enchanting-table:
47
+
Event handling is done via ordinary `@EventHandler` methods in each enchantment object — there is no generic event type on the interface. Twelve enchantments are actively registered and tagged as tradeable, non-treasure, and in-enchanting-table:
SilkTouch and FeatherFalling exist as implementations but are not currently registered in the bootstrap.
64
65
65
-
**Mana system:** All five Blaze Rod spell enchantments (Inferno, Skysunder, Witherbrand, Frostbind, Voidpull) and Tempest share a single mana pool stored in `PlayerPDC.mana`. All five are mutually exclusive with each other via `exclusiveWith`. `ManaManager` owns the bossbar display (`showManaBar`), regen scheduler (`startRegenTask`), and the no-mana sound (`NO_MANA_SOUND`). The bossbar uses the **Spellbite** gradient (`#832466 → #BF4299 → #832466`) with `NOTCHED_10` overlay. Frostbind tags its `Snowball`projectiles with a `NamespacedKey`(`frostbind_projectile`) and resolves the hit in `ProjectileHitEvent`.
66
+
**Mana system:** All seven Blaze Rod spell enchantments (Inferno, Skysunder, Witherbrand, Frostbind, Tempest, Voidpull, Bloodpact) share a single mana pool stored in `PlayerPDC.mana`. All seven are mutually exclusive with each other via `exclusiveWith`. `ManaManager` owns the bossbar display (`showManaBar`), regen scheduler (`startRegenTask`), and the no-mana sound (`NO_MANA_SOUND`). The bossbar uses the **Spellbite** gradient (`#832466 → #BF4299 → #832466`) with `NOTCHED_10` overlay. Unlike other spells, Bloodpact does not call `ManaManager.consumeMana` — it manually validates the left-click and trades player health for mana directly. Frostbind and Voidpull tag their projectiles with a `NamespacedKey`and resolve hits in `ProjectileHitEvent`. Projectile trail effects are created via `ScheduleUtils.spawnProjectileTrail`, which schedules a per-tick particle task that self-cancels when the entity is no longer valid.
66
67
67
68
### PDCs (Persistent Data Containers)
68
69
@@ -74,16 +75,16 @@ Recipe objects implement **`RecipeInterface`** and are listed in `VanillaPlus.on
Copy file name to clipboardExpand all lines: docs/enchantments.md
+58-43Lines changed: 58 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Enchantments
2
2
3
-
VanillaPlus adds **8 custom enchantments** and **extends 2 vanilla enchantments**. All are obtainable through the enchanting table, anvil and villager trades (tradeable, non-treasure).
3
+
VanillaPlus adds **9 custom enchantments** and **extends 2 vanilla enchantments**. All are obtainable through the enchanting table, anvil and villager trades (tradeable, non-treasure).
4
4
5
5
---
6
6
@@ -79,12 +79,12 @@ When a fully grown crop is harvested with a Verdance hoe, the crop block is rese
79
79
80
80
> Launches a fireball on left-click with a Blaze Rod.
Left-clicking with an enchanted Blaze Rod fires a small fireball in the direction you are looking. Fireballs deal no block damage (`yield = 0`) and leave a trail of flame and lava particles. Requires mana; displays the shared **Spellbite** mana bar on cast. Only usable in Survival or Adventure mode.
90
90
@@ -94,79 +94,94 @@ Left-clicking with an enchanted Blaze Rod fires a small fireball in the directio
94
94
95
95
> Calls down a lightning bolt on left-click with a Blaze Rod.
Left-clicking with a Skysunder Blaze Rod ray-traces up to 30 blocks in the direction you are looking. A real lightning bolt (dealing damage) strikes the first block hit, or the maximum range point if no block is found. Bursts `ELECTRIC_SPARK` particles at the strike location. Draws from the shared **Spellbite** mana pool (costs twice as much as Inferno). Only usable in Survival or Adventure mode.
106
106
107
107
---
108
108
109
109
### Voidpull
110
110
111
-
> Yanks a targeted entity to you on left-click with a Blaze Rod.
111
+
> Shoots an ender pearl that pulls the struck entity to you on left-click with a Blaze Rod.
Left-clicking with a Voidpull Blaze Rod ray-traces up to 30 blocks for an entity. The first entity hit is teleported directly in front of the player. Portal particles burst at both the origin and arrival location. Requires mana; draws from the shared **Spellbite** mana pool. Only usable in Survival or Adventure mode.
120
+
Left-clicking with a Voidpull Blaze Rod fires an ender pearl (no gravity) in the direction you are looking. While in flight the pearl trails portal and reverse-portal particles. When the pearl strikes an entity, that entity is teleported directly in front of the player. Portal particles burst at both the origin and arrival location. Requires mana; draws from the shared **Spellbite** mana pool. Only usable in Survival or Adventure mode.
122
121
123
122
---
124
123
125
124
### Frostbind
126
125
127
126
> Launches a freezing snowball on left-click with a Blaze Rod.
Left-clicking with a Frostbind Blaze Rod fires a snowball in the direction you are looking. On hit, the struck entity is frozen solid for several seconds (set to full freeze ticks, decaying naturally outside powder snow). Bursts snowflake particles at the impact location. Requires mana; draws from the shared **Spellbite** mana pool. Only usable in Survival or Adventure mode.
135
+
Left-clicking with a Frostbind Blaze Rod fires a snowball (no gravity) in the direction you are looking. On hit, the struck entity is frozen solid for several seconds (set to full freeze ticks, decaying naturally outside powder snow). The snowball trails snowflake and snowball particles in flight. Bursts snowflake particles at the impact location. Requires mana; draws from the shared **Spellbite** mana pool. Only usable in Survival or Adventure mode.
137
136
138
137
---
139
138
140
139
### Tempest
141
140
142
141
> Launches a burst of wind charges on left-click with a Blaze Rod.
Left-clicking with a Tempest Blaze Rod fires three wind charges in a horizontal spread. Each charge knocks back anything it hits on explosion. Requires mana; the highest mana cost of all Blaze Rod spells. Only usable in Survival or Adventure mode.
150
+
Left-clicking with a Tempest Blaze Rod fires three wind charges in a horizontal spread. Each charge trails gust and cloud particles and knocks back anything it hits on explosion. Requires mana; the highest mana cost of all Blaze Rod spells. Only usable in Survival or Adventure mode.
152
151
153
152
---
154
153
155
154
### Witherbrand
156
155
157
156
> Launches a wither skull on left-click with a Blaze Rod.
Left-clicking with a Witherbrand Blaze Rod fires an uncharged wither skull in the direction you are looking. The skull applies the Wither effect on hit and leaves a trail of soul and ash particles. Requires mana; draws from the shared **Spellbite** mana pool. Only usable in Survival or Adventure mode.
167
166
168
167
---
169
168
169
+
### Bloodpact
170
+
171
+
> Sacrifice health to restore mana on left-click with a Blaze Rod.
Left-clicking with a Bloodpact Blaze Rod drains 2 hearts and immediately restores 40 mana. Blocked if the player's health would drop to zero or below, or if mana is already full — both play the no-mana sound as feedback. Damage indicator and crimson spore particles burst from the player on a successful cast. Unlike other Blaze Rod spells, Bloodpact produces mana rather than consuming it, making it a dedicated mana recovery tool at the cost of survivability. Only usable in Survival or Adventure mode.
182
+
183
+
---
184
+
170
185
## Extended vanilla enchantments
171
186
172
187
These enchantments already exist in vanilla Minecraft. VanillaPlus adds extra behaviour on top of their normal effects. The extended behaviour is togglable in [PlayerModule config](modules/player.md).
0 commit comments