Custom enchantments actually do stuff now!
I worked on making a standard system to trigger the effects each enchantment should have when taking actions such as attacking, breaking a block, or taking damage. This should make it much easier to add new enchantments in the future!
I started by setting up the basic structure of the plugin.
First, I created a way to register custom enchantments. Paper plugins allow you to actually register custom enchantments as if they were vanilla enchantments, so I set up a system to allow me to easily add more enchantments in the future (wow that’s a lot of “enchantments” in one sentence!). This did take me quite a while to figure out, as messing with registries is quite messy and a little bit confusing (who would’ve thought!).
The brunt of this 10 hours, was spent trying to replicate the vanilla enchanting table system in my plugin. This is necessary because I want to be able to add special requirements to the enchant selection process and modify the process as a whole to fit the plugin (as it is meant to be a complete revamp of the vanilla enchanting system).
I had many hardships with passing data between events, figuring out how to modify what is shown in the enchanting table and how to make those enchantments actually go on the item you enchant, and simply understanding the whole process.
The Minecraft wiki was very helpful and informative, but the whole process, from calculating the enchanting level to picking the enchants is quite complicated (though also quite interesting, I recommend reading the article if you have time) (https://minecraft.wiki/w/Enchanting_table_mechanics).
In the end, I was able to completely replicate the vanilla behavior and add my first custom enchant modifiers🎉🎉.
A lot of bugs came up with trying to remove old cooldown bars when switching Essences and rejoining. Most of the errors were coming from trying to hide the cooldown bars while they were being modified by the task that decreases their progress as times goes on. I ended up being able to fix it, so it should work now!
I also created this awesome Cover Art for the project!
New Skeleton Essence Type!
This was the first new Essence type I’ve added. All of the work I did at the beginning of the project to make it easy to add new Essences later on really paid off, because it was quite friction-less to register this new Essence type and make it work with the plugin!
This new Essence Type is dropped by Skeletons and has 3 new powers:
Skeletal Grasp: The next opponent you shoot with an arrow will be frozen in place by a Skeletal Grasp for 15 seconds!
Enchanted Quiver: While this ability is active, all arrows that you shoot contain a random negative potion effect!
Sniper: SNIPE! Skeletons are master snipers. If you indeed inherit their good aim, your arrows will increase in damage for each 10 blocks they travel before hitting their target!
I accidentally deleted the project and some progress, so that was fun! (Thank god for GitHub)
In this update, I added some essentials that I’d forgotten such as a crafting recipe for the Essence Switcher (shown below), new Name/Lore for Essence Crystal, and a ton of QOL patches!
I also just cleaned up some code internally which was much needed!
Fixed Necromancer Lord Power + Forced Resource Pack to be Downloaded Upon Joining
Improving Admin Commands