-
Notifications
You must be signed in to change notification settings - Fork 180
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
Avaritia Renders for MetaItems and Materials #2683
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: DStrand1 <[email protected]>
Co-authored-by: DStrand1 <[email protected]> Co-authored-by: alongstringofnumbers <[email protected]>
Co-authored-by: ALongStringOfNumbers <[email protected]> (cherry picked from commit e4a86be)
(cherry picked from commit f149a18)
(cherry picked from commit dd6f3e3)
(cherry picked from commit 69d4e4a)
(cherry picked from commit 7799009)
Added Cosmic Effect to MetaPrefixItem Class. This allows for all Materials in GregTech to use some Renderers from Avaritia. Changes to MetaItem and MetaPrefixItem to only allow cosmic effects if Avaritia is installed Lots of Mask textures for all Material sets
…GregTech into GTHH-GregTech-2.8.10
looks very similar to the code here, and with only minor changes, but I dont see any mention of the original author |
Hmm, I should Probably ask the Owner of Avaritia for Permission to use some of there code |
I think You will need to credit them on this github page or at least Avaritia for using there methods xD. I have never done somthing like this before so ill be learning along the way! |
Cleaner Code + Credits to Avaritia Owners
added Api Files from Avaritia to fix an issue caused by them not being there
Run ./gradlew :spotlessCheck --warning-mode all --build-cache and ./gradlew :spotlessApply --warning-mode all to fix and clean code
I have received permission from Morpheus1101 to use some of Avaritia's code for this new patch. Permission5 is what they said.
Removed CosmicItemRenderer Class. This has been Replaced By CosmicHaloItemRender from Avaritia. Update Avaritia Dependencies
I have Removed the CosmicItemRenderer Class and replaced it inside my own for of Avaritia. Makes the code on your end only relate to adding the renders to MetaItems and MetaPrefixItems :) |
What
I have added some Avaritia Methods to GT MetaItems and GT Materials.
This allows for all Material items and MetaItems to use Avaritia render's like Halo's behind items and Cosmic Effect for items.
Making Materials like Infinity or Cosmic Neutronium are missing these methods inside the Material Builder To give them Halo noise, Pulse effect, Halo, Halo Colour, Item Pulsing or Cosmic Effect. These new Renders are only active when Avaritia is installed because I'm using Avaritia to render everything.
I think what I have listed above is a good enough reason to accept this PR, This is somthing that I desire and many other do too.
Implementation Details
The MetaItem, Material MaterialBuilder should be checked they are where most of the methods are but other things in this PR could be checked too.
Outcome
This Pr will add support for Avaritia Renders Such as shouldDrawHalo, haloTexture, haloColour, haloSize, shouldDrawPulse, shouldDrawCosmic/maskTexturePath and maskOpacity to MetaItems and Materials in the Material Builder.
These Methods will only become active when Avaritia Is installed, When it is not the Methods do nothing.
Additional Information
These are a couple of the new render methods for Materials and MetaItems I made using the methods stated above.
Avaritia Halo and Cosmic Effect for NotANoob Certificate
https://github.com/user-attachments/assets/fe69f436-b59a-495a-a953-cb49f0616c19
Naquadah Material With red coloured halo and Pulse Effect
Recording_2024-12-15_171620.mp4
Naquadria With Cosmic Effect
Recording_2024-12-15_171544.mp4
These are the Methods you can define inside the Material Builder.
They are all optional methods that are only active when Avaritia is installed.
.cosmic(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize, boolean shouldDrawPulse, boolean shouldDrawCosmic, Float maskOpacity)
cosmic(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize, boolean shouldDrawPulse)
cosmic(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize)
cosmic( boolean shouldDrawCosmic, Float maskOpacity)
cosmic(boolean shouldDrawPulse)
shouldDrawHalo will set a Material set to draw a Halo, This will need also need haloTexture, haloColour and haloSize to be set.
haloTexture will get the halo from "gregtech:texture/items/cosmic/String haloTexture".
haloColour What colour the Halo will be as a Hex Value "00FF00" for green
haloSize The size of the halo Max value of 10. defined as an Integer, 10 would be max size.
shouldDrawCosmic will generate the correct locations for textures of the Material Set, If the IconSet is set to DULL for instance, all Mask Textures are generated under "gregtech:textures/items/material_sets/dull/%s_mask." (%s is the item type, dust, ingot, gem).
maskOpacity Defines the opacity of the mask as a float, Max value 1.0f
These are the Methods you can define for any MetaItem.
They are all optional methods that are only active when Avaritia is installed.
.cosmicProperties(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize, boolean shouldDrawPulse, String maskTexture, float maskOpacity)
.cosmicProperties(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize, boolean shouldDrawPulse)
.cosmicProperties(boolean shouldDrawHalo, String haloTexture, String haloColour, int haloSize)
.cosmicProperties(String maskTexture, Float maskOpacity)
.cosmicProperties(boolean shouldDrawPulse)
These work the same as the Material builder accept they are on a per item basis and the mask Texture is defined as a string and will be under "gregtech:texture/items/cosmic/mask/String maskTexture".
Potential Compatibility Issues
There shouldn't be any incompatibility issues with this. I have tested it on my PC and no issue were found, well all issues I found were fixed before this pr.