Skip to content
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

Convert from ASM to Mixins #2192

Merged
merged 46 commits into from
Jun 20, 2024
Merged

Convert from ASM to Mixins #2192

merged 46 commits into from
Jun 20, 2024

Conversation

ALongStringOfNumbers
Copy link
Contributor

@ALongStringOfNumbers ALongStringOfNumbers commented Nov 24, 2023

What

Converts our ASM in the project to Mixins, for ease of maintainability, and hopefully fixing up some compat.

Mixins and MixinExtras is being pulled from MixinBooter specifically.

A new Package has been created, that being gregtech.mixins and after all ASM has been converted to Mixins, I am planning on moving GregTechLoadingPlugin into this package.

Where applicable, I am just calling the existing Hooks class from the Mixin. Although this can be changed.

For debugging purposes during this conversion, I have the gradle.properties option enableCoreModDebug set to true. This should definitely be set to false before merging. For those interested, this option outputs all transformed classes into run/CLASSLOADER_TEMP, and can be used to compare the code transformed by our ASM and by our Mixins. This does not currently work for inner classes.

  • JEI Transformer: There is currently a Mixin present for replicating the JEI Transformer, although it needs to be tested to ensure that all information is shown in the tooltip, in the same place that it was previously.
  • Concrete Powder Transformer: Works.
  • Layer Custom Head Visitor: Should work fine, Just needs verification (in game and in the debug outputs)
  • Special Armor Apply Transformer: Should work fine, just needs verification
  • Layer Armor Base Transformer: Should work, just needs verification
  • Region Render Cache Builder Transformer: Should work, needs verification
  • Render Chunk Transformer: Does not currently work I believe
  • Entity Renderer Transformer: Needs verification
  • Block Transformer: Should work, needs to be tested with and without CTM, and put in a separate Refmap, so we can queue it if CTM is not loaded
  • World Transformer: (This corresponds to the RenderGlobal Mixin) Should work fine, just needs verification
  • Model CTM Transformer: Needs Implementation
  • Abstract CTM Baked Model Transformer: Needs Implementation
  • Little Tile Transformer: Implemented, needs verification
  • CCL Transformer: Works
  • NuclearCraft Transformer: Considering Removing these, as we broke compat more than what the existing ASM was fixing, so much so that we have to tell people to disable the compat right now
  • Render Item Transformer: Got the Lamps part done. Need to implement durability bars
  • Recipe Repair Transformer: Needs Verification
  • Damage Source Transformer: Implemented, was apparently causing issues though
  • The One Probe Transformer: Implemented, should work. For this one though, we need to check if we actually need this any more, especially after the rewrite of our machine/block harvest levels and tools, and the implementation of our tool classes
  • Minecraft Transformer: Implemented, work fine. It puts the text in a different place than it was with the ASM, which is a pretty minor thing that someone can work on if they want
  • Model Loader Registry Transformer: Implemented, needs verification
  • Enchantment Application Transformer: Needs Implementation, going to be somewhat hard

Potential Compatibility Issues

Should be no compat issues, if everything is working correctly

@ALongStringOfNumbers ALongStringOfNumbers added the type: feature New feature or request label Nov 24, 2023
@ALongStringOfNumbers ALongStringOfNumbers added this to the 2.9 milestone Nov 24, 2023
@IntegerLimit
Copy link
Contributor

Note on the NC Mixin/ASM: We implemented a proper fix in Nomi-Labs. Might want to pull that in to GT. (Made with help from @YoungOnionMC)

Mixin

Logic

Hope this helps!

Copy link
Contributor

@ghzdude ghzdude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found some issues with RecipeRepairItemMixin:

  • gregtechCEu$matches applies, but passes in the same parameter twice
  • gregtechCEu$getCraftingResultFirst fails to apply
  • gregtechCEu$getCraftingResultSecond fails to apply
  • gregtechCEu$getRemainingItemsInject fails to apply

these mixins seem to apply properly:

  • JEITooltipMixin
  • LayerCustomHeadMixin
  • LayerArmorBaseMixin
  • RegionRenderCacheBuilderMixin
  • RenderChunkMixin
  • EntityRendererMixin
  • AbstractCTMBakedModelMixin
  • CCLDescriptionMixin
  • RenderItemMixin
  • DamageSourceMixin
  • TheOneProbeMixin
  • MinecraftMixin
  • ModelLoaderRegistryMixin

the other mixins that weren't mentioned i haven't tested yet

@TechLord22 TechLord22 merged commit 5ff7cdb into master Jun 20, 2024
3 checks passed
@TechLord22 TechLord22 deleted the alson-to-mixins branch June 20, 2024 00:55
tekcay added a commit to tekcay/GTCEu-tkcy that referenced this pull request Jul 7, 2024
* Remove NuclearCraft ASM (GregTechCEu#2467)

* Update zh_cn.lang (GregTechCEu#2445)

* Allow polarizing block -> magnetic block (GregTechCEu#2469)

* Fusion bloom fix & other bloom effect API modifications (GregTechCEu#2470)

* Inital Vintagium Support (GregTechCEu#2463)

* Fix Ore Dict Ingredients When Changing OreDicts with CT & GS (GregTechCEu#2456)

* Fix the large turbine rotor texture (GregTechCEu#2485)

* Small QoL Bee Update (GregTechCEu#2458)

* Fix excessive packets & re-renders with AEHostable parts (GregTechCEu#2487)

* Allow dynamic hatch placement on Distillation Tower (GregTechCEu#2477)

* Add a faster recipe for drilling fluid with distilled water (GregTechCEu#2484)

* Fix input busses saying "Item Auto-Output Enabled" instead of "Item Auto-Input Enabled" (GregTechCEu#2489)

* fix pyrolyse speed (GregTechCEu#2449)

* Brute-force Fix of RAM Usage Problem When Using Alfheim (GregTechCEu#2475)

* Clean up AEHostable part fix (GregTechCEu#2488)

* Various Cleanroom Improvements (GregTechCEu#2480)

* Updating bees using the new Mutation Condition (GregTechCEu#2486)

* Allow MTEs / recipe map workables to directly control their JEI categories (GregTechCEu#2479)

* Rounds energy displayed by TOP (GregTechCEu#1063)

* dependency updates

* Allow recipe logic to set EU/t and speed discounts (GregTechCEu#2496)

* Convert from ASM to Mixins (GregTechCEu#2192)

* Glass tube recycling (GregTechCEu#2509)

* Improve assembly line laser render (GregTechCEu#2495)

* Dynamically change the direction of the arrow in "Manual IO Mode" to reflect the direction of the "IO Mode" (GregTechCEu#2491)

* Support Creative Mode Pick Block (GregTechCEu#2428)

* Add Polybenzimidazole Block Conversion Recipes (GregTechCEu#2511)

* GroovyScript 1.1.0  (GregTechCEu#2506)

* Update build script version to 1720106721 (GregTechCEu#2503)

* workaround GHA bug for tests workflow

* Fix liquid and gas registry key functions overlapping (GregTechCEu#2514)

* Namespaced MTE Registries (GregTechCEu#2505)

* Split assembler and circuit assembler textures (GregTechCEu#2388)

* bump GHA versions (GregTechCEu#2516)

* Fix failing builds due to Vintagium (GregTechCEu#2519)

* Fix Mixin Warnings About `maxShiftBy` (GregTechCEu#2520)
tekcay added a commit to tekcay/GTCEu-tkcy that referenced this pull request Nov 27, 2024
* Remove NuclearCraft ASM (GregTechCEu#2467)

* Update zh_cn.lang (GregTechCEu#2445)

* Allow polarizing block -> magnetic block (GregTechCEu#2469)

* Fusion bloom fix & other bloom effect API modifications (GregTechCEu#2470)

* Inital Vintagium Support (GregTechCEu#2463)

Co-authored-by: kumquat-ir <[email protected]>

* Fix Ore Dict Ingredients When Changing OreDicts with CT & GS (GregTechCEu#2456)

* Fix the large turbine rotor texture (GregTechCEu#2485)

* Small QoL Bee Update (GregTechCEu#2458)

* Fix excessive packets & re-renders with AEHostable parts (GregTechCEu#2487)

* Allow dynamic hatch placement on Distillation Tower (GregTechCEu#2477)

* Add a faster recipe for drilling fluid with distilled water (GregTechCEu#2484)

* Fix input busses saying "Item Auto-Output Enabled" instead of "Item Auto-Input Enabled" (GregTechCEu#2489)

* fix pyrolyse speed (GregTechCEu#2449)

* Brute-force Fix of RAM Usage Problem When Using Alfheim (GregTechCEu#2475)

* Clean up AEHostable part fix (GregTechCEu#2488)

* Various Cleanroom Improvements (GregTechCEu#2480)

* Updating bees using the new Mutation Condition (GregTechCEu#2486)

* Allow MTEs / recipe map workables to directly control their JEI categories (GregTechCEu#2479)

* Rounds energy displayed by TOP (GregTechCEu#1063)

Co-authored-by: bruberu <[email protected]>

* dependency updates

* Allow recipe logic to set EU/t and speed discounts (GregTechCEu#2496)

* Convert from ASM to Mixins (GregTechCEu#2192)

Co-authored-by: serenibyss <[email protected]>
Co-authored-by: Ghzdude <[email protected]>

* Glass tube recycling (GregTechCEu#2509)

* Improve assembly line laser render (GregTechCEu#2495)

* Dynamically change the direction of the arrow in "Manual IO Mode" to reflect the direction of the "IO Mode" (GregTechCEu#2491)

* Support Creative Mode Pick Block (GregTechCEu#2428)

* Add Polybenzimidazole Block Conversion Recipes (GregTechCEu#2511)

* GroovyScript 1.1.0  (GregTechCEu#2506)

* Update build script version to 1720106721 (GregTechCEu#2503)

Co-authored-by: ALongStringOfNumbers <[email protected]>

* workaround GHA bug for tests workflow

* Fix liquid and gas registry key functions overlapping (GregTechCEu#2514)

Co-authored-by: TechLord22 <[email protected]>

* Namespaced MTE Registries (GregTechCEu#2505)

* Split assembler and circuit assembler textures (GregTechCEu#2388)

* bump GHA versions (GregTechCEu#2516)

* Fix failing builds due to Vintagium (GregTechCEu#2519)

* Fix Mixin Warnings About `maxShiftBy` (GregTechCEu#2520)

* fix invalid actions files

* Improvement to DT hatch logic (GregTechCEu#2524)

* Update ru_RU lang for 2.8.9 (GregTechCEu#2523)

Co-authored-by: Weblate <[email protected]>
Co-authored-by: Western01 <[email protected]>

* Update Gradle and related files (GregTechCEu#2522)

Co-authored-by: TechLord22 <[email protected]>

* Fix the lighter behaviour (GregTechCEu#2526)

* Fix EUt usage of HPCA with custom higher tier Components (GregTechCEu#2512)

* bump GRS and CT versions in gradle (GregTechCEu#2528)

* Fix Miner Pipe Deleting TileEntities (GregTechCEu#2529)

* Make drums no longer require a Material (GregTechCEu#2527)

* fix crash with Forestry integration (GregTechCEu#2531)

* fix MTE data fixer registry conflicts (GregTechCEu#2515)

* Adjust EV coil recipe & texture (GregTechCEu#2518)

* Add Overload to `where()` in FactoryBlockPattern (GregTechCEu#2538)

* Update to MUI 2.5.0-RC1 (GregTechCEu#2544)

* fix most gases using the wrong translation key (GregTechCEu#2545)

* Sub-tick OC and long EUt in recipe logic (GregTechCEu#2432)

* MTE registries datafixer for BQu (GregTechCEu#2547)

* Titanium Tweaks (GregTechCEu#2366)

Co-authored-by: TechLord22 <[email protected]>

* SimpleMachineMetaTileEntity makes it easy to change the logo (GregTechCEu#2289)

Co-authored-by: tier940 <[email protected]>

* Fix Spray Can offhand tooltip applying to Solvent (GregTechCEu#2546)

* Add addElement() to material event class (GregTechCEu#2560)

* Fix Output Bus not Notifying in Certain Conditions (GregTechCEu#2558)

* Override getItem in BlockMachine.class (GregTechCEu#2555)

* Improve material element api (GregTechCEu#2561)

* fission: natural uranium and plutonium (GregTechCEu#2562)

* Update zh_cn.lang (GregTechCEu#2552)

* Fix PA & Cleanroom Sync Issues (GregTechCEu#2566)

* Fix the no distinct buses button (GregTechCEu#2577)

* fission: hafnium and zirconium (GregTechCEu#2563)

* remove usages of NonNullList (GregTechCEu#2581)

* Add Missing Side Only Annotations (GregTechCEu#2579)

* Fix Legacy Filter NBT Reading (GregTechCEu#2570)

* Update build script version to 1723428048 (GregTechCEu#2532)

Co-authored-by: TechLord22 <[email protected]>
Co-authored-by: alongstringofnumbers <[email protected]>

* Fission Reactor's ShapeInfo support for Relative Directions (GregTechCEu#2576)

* Fix incorrect pipe material (GregTechCEu#2589)

* fix duplicate assembly line research entries (GregTechCEu#2584)

* Give MTEs a owner on placement (GregTechCEu#2540)

* Add OCing past MAX and fix multi Laser and Substation Hatch support (GregTechCEu#2611)

* unbind framebuffer object after use in renderFullImageInFBO (GregTechCEu#2614)

* Fix MTE Initial Sync sending the wrong data (GregTechCEu#2587)

* Fix Issues with Filter Label and MTE Owner Overloads (GregTechCEu#2613)

* Remove mui0 null returns (GregTechCEu#2621)

* Make Ender Cover and Virtual Registry Abstract (GregTechCEu#2510)

* Update ru_ru.lang and Initial Ukranian langluage (GregTechCEu#2602)

Co-authored-by: Western01 <[email protected]>
Co-authored-by: German Khris <[email protected]>

* Update zh_cn.lang (GregTechCEu#2593)

* Add a config option for the magnet's attraction delay (GregTechCEu#2616)

* Attempt to fix tools from addon materials (GregTechCEu#2585)

* Port the GT5u ME hatch wirecutter behavior (GregTechCEu#2618)

* clean up recipe property storage (GregTechCEu#2607)

* fix recipes having null cleanrooms (GregTechCEu#2625)

* tierByVoltage optimizations (GregTechCEu#2617)

Co-authored-by: M-W-K <[email protected]>
Co-authored-by: kross <[email protected]>

* move MAX+ tiers into VOCN and VOCNF arrays (GregTechCEu#2615)

* fix tierByVoltage MAX tier off by one (GregTechCEu#2626)

* Fix hover texture not being applied to button theme (GregTechCEu#2623)

* Update PropertyContainer.java (GregTechCEu#2627)

* restored neodymium physical properties

---------

Co-authored-by: froot <[email protected]>
Co-authored-by: iouter <[email protected]>
Co-authored-by: ALongStringOfNumbers <[email protected]>
Co-authored-by: Tictim <[email protected]>
Co-authored-by: htmlcsjs <[email protected]>
Co-authored-by: Integer Limit <[email protected]>
Co-authored-by: M_W_K <[email protected]>
Co-authored-by: Rundas <[email protected]>
Co-authored-by: Zorbatron <[email protected]>
Co-authored-by: TechLord22 <[email protected]>
Co-authored-by: Tian mi <[email protected]>
Co-authored-by: vrejhead <[email protected]>
Co-authored-by: くぁーりぃ <[email protected]>
Co-authored-by: bruberu <[email protected]>
Co-authored-by: serenibyss <[email protected]>
Co-authored-by: Ghzdude <[email protected]>
Co-authored-by: brachy84 <[email protected]>
Co-authored-by: ALongStringOfNumbers <[email protected]>
Co-authored-by: marisathewitch <[email protected]>
Co-authored-by: Weblate <[email protected]>
Co-authored-by: Western01 <[email protected]>
Co-authored-by: Brian <[email protected]>
Co-authored-by: Phil <[email protected]>
Co-authored-by: tier940 <[email protected]>
Co-authored-by: tier940 <[email protected]>
Co-authored-by: alongstringofnumbers <[email protected]>
Co-authored-by: Envoidia <[email protected]>
Co-authored-by: German Khris <[email protected]>
Co-authored-by: kross <[email protected]>
Co-authored-by: miozune <[email protected]>
Co-authored-by: Bruce <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants