Skip to content

Latest commit

 

History

History
90 lines (79 loc) · 3.38 KB

File metadata and controls

90 lines (79 loc) · 3.38 KB

Repository structure

This repository is split into several modules:

bit-helper

The bit-helper module is a small library of mine that is used for compact binary (de)serialization. When I started this plug-in, I thought it was a good idea to use this, but I am starting to see its limitations. Nevertheless, it is very stable (has been used in production for more than 6 years without any failures) and its results are still quite good (although they could be improved).

ce-event-handler

This module is the (tiny) part of the plug-in that directly depends on CrazyEnchantments. Because CrazyEnchantments is compiled with Java 17 and the plug-in module needs to be compatible with Java 8, I can't just put this inside the plug-in module. Some special built steps are used to ensure that ce-event-handler will be compiled using Java 17.

custom-recipes

My module for registering and handling custom crafting/cooking/smithing recipes. It is not tightly coupled to the plug-in, and I intend to eventually publish this as a separate module to be usable by other developers as well.

editor

This module is the source code for the Editor. This is a GUI application that users must use to configure the plug-in. The users must download it and run it on their computer. Using this GUI, they can configure their custom items (choose their textures, attack damage, display name, and lots of other stuff...).

gui

This module is a small gui library that I made many years ago. When I started this custom items plug-in, I thought it was a good idea to use this library to write the Editor. After using it for a few years, I started seeing the limitations of this library: the scale of everything is based on the size of the window. This has the benefit that the editor will look the same to everyone, regardless of their screen resolution (try resizing your window to see what I mean), but has the drawback that this can cause distortion of text and images. Also, it lacks many interesting features that would have avoided the need of implementing all views myself. Switching to a different GUI library might be a good idea, but I am not so sure the amount of work is worth it.

kci-nms...

This project has many kci-nms modules. These modules take care of features that require a different implementation for each minecraft version. For instance, these modules take care of NMS and some features that were added to the Bukkit API in later minecraft versions.

The kci-nms module itself defines the interface that is implemented by all the kci-nmsXX modules. Each kci-nmsXX module implements these interfaces for minecraft 1.XX.

The modules kci-nms13plus, kci-nms16plus, kci-nms18plus, and kci-nms21plus facilitate code reuse between their corresponding minecraft version, and later versions.

plug-in

This module is the source code of the custom items plug-in itself. The plug-in essentially finds the binary configuration file generated by the Editor, deserializes it, and makes sure that everything configured in the Editor actually happens in-game.

shared-code

This module contains the code that is used by both the Editor and the plug-in.

test-custom-recipes

This module contains the unit tests for custom-recipes. Because this module relies on MockBukkit, which doesn't support Java 8, this module requires a later Java version, and thus can't be combined with the custom-recipes module itself.