Enchantments Concept

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:

1 Like

It would be quite nice if Sponge had a custom enchantment API.

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.

I think @DotDash means ‘fake’ enchantments, that run server side and stuff, but are independent of Minecraft’s actual enchantment system.

I mean, that’s how what I did works in the first place… Still trying to make the items shiny though…

2 Likes