-
Notifications
You must be signed in to change notification settings - Fork 182
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
185
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
+844
−11
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]>
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 :) |
Remove Unnecessary option to set maskOpacity. Setting this Causes render bugs with the Infinity Armor Model. Removed Fallback TextureAtlasSprite. Instead it is now set to null. when an Item isn't called with cosmic properties.
I have updated some of the classes and fixed some bugs related with the Cosmic Render. |
Removed the need to convert String to Integer when setting Halo Colour for MetaItems and Material Items.
Update description of how to use these new methods, explaining how to use the new hex values. Added a method I missed for CosmicProperty.
This PR is now ready to be reviewed by someone :) |
Fixed Mod check to only allow Avaritia methods when Avaritia 1.1x Unoffical Extended Life version 3.3.0.42 or greater is installed. If you use the Covers Avaritia 1.1x these methods won't work and now the wont crash the game.
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
Test Material With green coloured halo and Pulse Effect
Recording.2025-01-24.173559.mp4
Universium With Cosmic Effect
Recording.2025-01-24.173326.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 "FF00FF00" for Max Alpha and 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
Avaritia 1.1x wont work with these renders because that version doesn't have the ability to create an item with Cosmic and Halo Effects. Avaritia 1.1x Unofficial Extended Life contains everthing required for this to work as long as the version is greater than 3.3.0.42. Don't worry, If you have Avaritia 1.1x and not Avaritia 1.1x UEL these methods do nothing and won't crash the game.