Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdev/reorganization #1772

Open
wants to merge 1 commit into
base: 1.21
Choose a base branch
from
Open

Sdev/reorganization #1772

wants to merge 1 commit into from

Conversation

stanieldev
Copy link
Member

What

I unified names between the API, Common, and Data sections.

Implementation Details

I'd take a look at how it is structured. It's not perfectly done yet, but the 3 folders are mostly complete, so we can make tweaks.

Outcome

It makes the system pretty easy: API, Common, Data.
Very linear and makes it easier to find. Should help with integration of other mods. New folders would have to be added for new additions, like a armor/ folder in each section for new armors.
ALSO, IT RUNS AND HAS NO ISSUES I'VE ENCOUNTERED

Additional Information

Inside the folders are pretty messy rn, and a lot of refactoring is needed for actual code, but that would take ages and would be a bitch to merge.

Potential Compatibility Issues

My structure may not best fit the style of most people. I think the idea is pretty sound though.


./com/gregtechceu/gtceu/

Folder Description
API Contains code relating to the functionality of GregTech and its addons/integrations. Functions contained in these files should be written to be atomic, meaning that they serve 1 purpose and then combined in order to achieve higher-level complexity to the code. Also allows for reusability wrappers in ./addons and ./integrations.
common Contains code for Java Object Classes that have analogues in Minecraft. This is the storage of resources of the mod, so that it is accessible to ./data (GregTech), ./addons (GregTech Addons) and ./integrations (Outside Mods).
data Holds instancing code for GregTech only, as expected in the base mod without addons. These files utilize code from ./common for Object Classes and ./API for behaviors.
addon Holds instancing code for Addons only, including wrappers for Addons to access.
integration Holds instancing code for External Integration with GTM.

Note: Addons & Integrations should not have access directly to API or Common code. Instead, wrapper functions should be used that call API and Common functionalities.
I.e. No one outside of GTM developers should have to reference API or Common code directly.

./api, ./common, ./data, ./addon

Folder Description
advancement
block
blockentity
compass
cover
damagesource
effect (+ medicalcondition)
entity
fluid
gui
item
lang
machine
material (chemical)
multiblock
particle
pipenet/pipelike
recipe
registry
sound
tag
worldgen

./integration

Folder Description
ae2 Contains code for integrating GregTech with AE2.
create Contains code for integrating GregTech with Create.
emi Contains code for integrating GregTech with EMI.
jei Contains code for integrating GregTech with JEI.
kjs Contains code for integrating GregTech with KJS.
rei Contains code for integrating GregTech with REI.
tip Contains code for integrating GregTech with TOP.
jade Contains code for integrating GregTech with Jade.

@stanieldev stanieldev requested review from a team as code owners August 18, 2024 20:57
@stanieldev stanieldev added Do Not Merge DO NOT MERGE THIS PR YET! 1.21 type: refactor Suggestion to refactor a section of code labels Aug 18, 2024
@screret
Copy link
Member

screret commented Aug 18, 2024

Change target branch to 1.21

@stanieldev stanieldev changed the base branch from 1.20.1 to 1.21 August 18, 2024 21:02
@stanieldev
Copy link
Member Author

Change target branch to 1.21

Fixed thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Do Not Merge DO NOT MERGE THIS PR YET! type: refactor Suggestion to refactor a section of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants