-
Notifications
You must be signed in to change notification settings - Fork 612
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
Refactor CraftingUnitType for easier add-on extensibility #6277
Refactor CraftingUnitType for easier add-on extensibility #6277
Conversation
Yes this is good stuff. That'll make it far easier for addons, I always hated the enum we had 😁 |
Don't you also want to expose the model rendering? That's still using an enum. |
This is still a draft specifically for that reason. Once that's figured out and done I'll mark it as ready. |
This reverts commit 135c192.
Fixes constantly returning null due to init order when using prior ctor param
Most of what I wanted to abstract has been abstracted enough now to allow for relatively painless crafting CPU implementation without any use of Mixin whatsoever. I still have qualms, however, with the approach taken for model rendering — |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! Left a few remarks.
src/main/java/appeng/blockentity/crafting/CraftingStorageBlockEntity.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/blockentity/crafting/CraftingBlockEntity.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
Outdated
Show resolved
Hide resolved
src/main/java/appeng/client/render/crafting/AbstractCraftingUnitModelProvider.java
Outdated
Show resolved
Hide resolved
Sorted. |
src/main/java/appeng/me/cluster/implementations/CraftingCPUCluster.java
Outdated
Show resolved
Hide resolved
* Initial crafting storage attempt see AppliedEnergistics/Applied-Energistics-2#6277 * Remove custom BE classes in favour of instantiating AE2's own * Remove redundant custom block classes * ditto * Optimise textures * Use switch statement to retrieve item for block entity Fixes constantly returning null due to init order * Try to fix model rendering? * Add block drops and crafting recipes * Move material definitions to provider class * Add 4 co-processing threads to MEGA accelerator * Terminology change * Too many subpackages * Fix incorrect monitor blockmodel * Add missing client init, finally render CPUs properly as cutout * Change formed colour scheme to full-black they looked more like massive footballs prior to this * Final(?) tweaks for PR * Update mods.toml * Update dependencies
Up until now most add-ons attempting to add higher tiers of crafting storage have had to do so through heavy use of mixins or other hacks due to much of the code that makes use of the CraftingUnitType being fairly hard-coded. This PR should hopefully turn it into something more extensible to make use of more cleanly.