-
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
Rework Metafluids #542
Rework Metafluids #542
Conversation
02d36c3
to
bcd0931
Compare
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.
The getMaterialTooltip
tooltip function in FluidTooltipUtil
needs to be updated for the new states
Water and Lava materials need to have FluidTypes assigned to them in their creation.
Something has broken tooltips in this PR, such that the mod name is no longer showing in tooltips. It might be one of the above comments
In addition, I received these warnings in the log, and fluids that were in machines before switching to this PR were removed upon load into the world https://pastebin.com/PkTy6bHr
src/main/java/gregtech/api/unification/material/materials/ElementMaterials.java
Outdated
Show resolved
Hide resolved
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.
There are still issues with some fluids getting the incorrect fluid names:
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.nitrogen (specified as gregtech:plasma.nitrogen) is missing from this instance - it will be removed
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.oxygen (specified as gregtech:plasma.oxygen) is missing from this instance - it will be removed
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.argon (specified as gregtech:plasma.argon) is missing from this instance - it will be removed
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.iron (specified as gregtech:plasma.iron) is missing from this instance - it will be removed
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.helium (specified as gregtech:plasma.helium) is missing from this instance - it will be removed
[13:12:28] [Server thread/ERROR] [FML]: The fluid plasma.nickel (specified as gregtech:plasma.nickel) is missing from this instance - it will be removed
src/main/java/gregtech/api/unification/crafttweaker/CTMaterialHelpers.java
Outdated
Show resolved
Hide resolved
6274a00
to
5a78d64
Compare
Crash when testing this PR when I moused over the water or distilled water fluid tile in JEI https://pastebin.com/n17munkB The length of the tooltip for the fluid still needs to be checked, as there are some materials that do not have a chemical formula |
51fda38
to
471b568
Compare
Checks are failing, rip |
Hm, seems to be something slightly wrong. Before this PR, the Lava tile in JEI had the Temperature and State shown, with this PR nothing is shown. Similarly, the Water tile in JEI showed the formula, temperature, and state, and now only shows the formula. This is probably because they are not being added in |
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.
Not a fan of how the tests were fixed, but everything else looks good to me
#649 should provide a more practical fix for I18n related tests failing |
src/main/java/gregtech/api/unification/crafttweaker/CTMaterialBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/unification/crafttweaker/MaterialPropertyExpansion.java
Show resolved
Hide resolved
d4ef449
to
5bcf155
Compare
* Grab default meta when meta exceeds allowed values for meta blocks (GregTechCEu#621) - Prevents world corrupting crash * Logic hacking for certain contexts to abide to the correct StoneType (GregTechCEu#638) * Rework Metafluids (GregTechCEu#542) * rework metafluids * add acid type to acids * improve ct fluid validation * material getter * some ct support * fluid state tooltip for each FluidType * requested changes * fix wrong fluid names * fix FluidTooltipUtil method * fix all fluid tooltips * UU matter tooltip * explicitly block plasmas in the fluid CT method * fix plasma unlocalized names * make fluid tooltips smart * fix custom acid material textures * fix vanilla fluid tooltips * fix failing tests * fix tooltip and ct error logging * undo test "fix" * more review comments * change maps * stop using lowercase * use computeIfAbsent * fix empty tooltips on items * stop trying to register all fluids twice and fix temperatures * Minor recipe and formula fixes (GregTechCEu#624) * dimethylbenzene and 3,3-dichlorobenzidine ratio fixes * fix IV Coil voltage * disable Nitrobenzene decomposition to prevent dupes * fix Butene formula * fix Ethenone and Methyl Acetate formula * fix Vinyl Acetate formula * fix Monochloramine and Allyl Chloride formula * fix Allyl Chloride properties * Make sugar C6H12O6, like an actual carbohydrate * fix Liquid Air formula Co-authored-by: bruberu <[email protected]> * Fix `drawFluidForGui` drawing incorrectly for some mods * Fix fluid prospector crash on servers (GregTechCEu#676) * fix problems with chanced outputs in jei (GregTechCEu#675) * Maintenance fix (GregTechCEu#677) * Fix muffler particles having little pos variation * Polycaprolactam processing revamp (GregTechCEu#600) * Polycaprolactam chain * Use Blast Furnace instead * Address review comments * Fix problems (again) * Update and use FluidTypes * Third time's the charm? * Change which event blocks were created in (GregTechCEu#535) * Allow Robot Arms to Supply Exact more than 1 stack (GregTechCEu#635) * Don't tick the preview world from updateFormedValid (GregTechCEu#608) * UTF-8 (GregTechCEu#678) Co-authored-by: Rongmario <[email protected]> Co-authored-by: TechLord22 <[email protected]> Co-authored-by: m2r1k5 <[email protected]> Co-authored-by: bruberu <[email protected]> Co-authored-by: DStrand1 <[email protected]> Co-authored-by: Syrcan <[email protected]> Co-authored-by: ALongStringOfNumbers <[email protected]> Co-authored-by: KilaBash <[email protected]>
What:
This PR Reworks the MetaFluids class and everything associated with it. It primarily moves the class to API, where it should be from the beginning.
It then removes the concept of
FluidState
, merging it withFluidType
. FluidType is now not a subclass of MetaFluids, and is also no longer an Enum for materials. It is used to make fluids from materials have more unique properties in a cleaner fashion.MaterialFluid was also pulled out of MetaFluids, allowing better access to it. It should allow us to add more properties to GregTech fluids in the future if desired.
Outcome:
Reworked MetaFluids
Additional info:
The way things are currently done for existing fluid properties will cause no missing fluid entries in existing worlds.