How cozmycdev/jedcore works
Project’s Type and Purpose
• This is a Java-based plugin for Minecraft (specifically an addon for ProjectKorra) that extends bending abilities. Its purpose is to add, update, and refine bending abilities, along with collision detection, configurable cooldowns, and other enhancements.
• The README confirms the project is maintained as a fork of a previous plugin version and details many ability-specific changes and configuration tweaks.
File Structure and Identify Major Components
• Core Package (src/com/jedk1/jedcore):
– Contains the main plugin classes (JedCore.java, JCManager.java, JCMethods.java) that likely serve as the entry and control point.
• Ability Modules:
– Grouped by bending type (airbending, earthbending, firebending, waterbending, avatar, and chiblocking).
– Each ability is encapsulated in its own class (e.g., AirBlade.java, LavaDisc.java, FireBall.java). Also, several abilities have combo subfolders to indicate more complex chaining behavior.
• Collision and Physics:
– The 'collision' package includes classes like AABB.java, Sphere.java, CollisionDetector.java, etc., which likely define how abilities interact physically.
• Event and Listener Handling:
– The 'event' and 'listener' packages handle gameplay events (e.g., PKCommandEvent) along with ability and command listeners.
• Configuration:
– The 'configuration' package (Config.java, JedCoreConfig.java, etc.) manages the plugin’s settings, likely read from a configuration file. The plugin.yml also assists in bootstrapping the plugin.
• Command and Policy Handling:
– The 'command' package (including JedCoreCommand.java and Commands.java) takes care of user interactions and input.
– The 'policies' package (specifically removal policies) indicates the plugin’s design for properly deactivating abilities based on game state changes.
• Utility and Version Adapters:
– The 'util' package provides auxiliary classes (such as MetricsLite, BlockUtil) for miscellaneous functions and handling different Minecraft versions.
Components and Relationships
a. Main Plugin Core:
• Inside it show core management classes (JedCore.java, JCManager.java, JCMethods.java).
b. Ability Modules:
• Bending ability group as a separate component (e.g., "Air Bending Abilities", "Earth Bending Abilities", etc.) with sub-components for individual abilities and combos.
c. Event Handling and Listeners:
d. Collision/Physics Engine:
• A “Collision & Physics” block that interacts with the abilities when actions involve collision detection.
e. Command and Policy Handling:
f. Utilities and Version Adaptation:
• A “Utilities & Version Adapters” component that supports compatibility (showing ParticleAdapter, PotionEffectAdapter, etc.) ensuring abilities behave correctly across Minecraft versions.
g. External Integrations:
• A block to represent integration with external systems, such as ProjectKorra and possibly configuration files for spigot and maven (pom.xml) builds.
Instructing the Principal Software Engineer
• a. Configuration & Utilities: loaded at startup.
• b. Event & Listener: receives and forwards events to the core management.
• c. Ability Modules: list and organize each bending type (air, water, earth, fire, avatar, chi) with submodules for combos.
• d. Collision/Physics: supporting project-specific collision detection for abilities.
• e. Command Handling: responsible for user commands and administrative operations.
• f. Removal/Policies: handle the lifecycle of abilities and cleanup.
• Use annotations to indicate how configuration options (such as ability-specific options, cooldowns, and visual effects) influence behavior.