I’ve created a custom enchantment system, and started to implement some of it. Currently only the “Smite” enchantment is implemented. I figured I’d share what I’ve got so far, so here’s a proof of concept video:
For anyone interested in how it’s done, the basic idea is that there are 2 implementable elements, Enchantment Handlers and Event Processors. The Enchantment handlers, obviously enough, handle enchantments, and function as doctored event listener type things. Event Processors are responsible for determining whether or not a certain event should be considered, and for obtaining all the enchanted items associated with the event.
The Smite enchantment implementation can be found below:
This won’t be possible without a client-side API. In almost all cases, the server sends enchantment ids to the client, which requires them to be registered client-side.