-
Notifications
You must be signed in to change notification settings - Fork 178
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
Open
jude123412
wants to merge
167
commits into
GregTechCEu:master
Choose a base branch
from
jude123412:GTHH-GregTech-2.8.10
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: DStrand1 <[email protected]>
Co-authored-by: DStrand1 <[email protected]> Co-authored-by: alongstringofnumbers <[email protected]>
(cherry picked from commit 3d94434)
Co-authored-by: Weblate <[email protected]> Co-authored-by: Western01 <[email protected]> (cherry picked from commit a706c39)
Co-authored-by: TechLord22 <[email protected]> (cherry picked from commit 52c835c)
(cherry picked from commit ae88e46)
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.