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

Update to 1.21 (WIP) #16

Draft
wants to merge 3 commits into
base: 1.21
Choose a base branch
from
Draft

Update to 1.21 (WIP) #16

wants to merge 3 commits into from

Conversation

supsm
Copy link

@supsm supsm commented Nov 4, 2024

Effort to update frex to 1.21.

List of things that need addressing (may not be exhaustive):

  • fabriquilt/src/main/java/io/vram/frex/pastel/mixin/MixinRenderRegionCache.java:135 - RenderRegionCache.isAllEmpty has been removed, do we just remove the mixin?
  • common/src/main/java/io/vram/frex/mixin/MixinModelBakery.java:86 - @Redirect mixin target seems to be incorrect. Also the actual mixin itself is questionable
  • common/src/main/java/io/vram/frex/mixin/MixinModelBakery.java:116 - questionable; ModelBakery.loadModel has been removed (it seems that models are all always loaded during construction now)
  • common/src/main/java/io/vram/frex/base/renderer/mesh/BaseQuadEmitter.java - some methods in VertexConsumer have been removed (including but not limited to endVertex, defaultColor, addVertex/vertex with 14 parameters)
  • common/src/main/java/io/vram/frex/impl/model/ModelProviderRegistryImpl.java:109 - ModelResourceLocation is now a record containing ResourceLocation, rather than a subclass of ResourceLocation.
    • Some ModelProvider<ModelResourceLocation> have been changed to ModelProvider<ResourceLocation> in other parts of the code. Do these need to be changed back to ModelResourceLocation (and ModelProvider T constraint changed?)
  • common/src/main/java/io/vram/frex/pastel/PastelItemRenderContext.java:78 - ItemRenderer.getCompassFoilBufferDirect has been removed
  • Undo the import rearranging and check for style violations. Import rearrangement was done automatically through migrateMappings but I know @spiralhalo doesn't like that :P

@spiralhalo
Copy link
Collaborator

FYI, you can vram-ify the imports by setting this in IntellijIDEA Code Style settings.

import static all other imports
// <blank line>
import java.*
// <blank line>
import javax.*
// <blank line>
import all other imports
// <blank line>
import com.mojang.*
// <blank line>
import net.minecraft.*
// <blank line>
import net.fabricmc.*
// <blank line>
import io.vram.*
// <blank line>
import grondag.*

What does migrateMappings do? I never use it.

@supsm
Copy link
Author

supsm commented Nov 14, 2024

i still haven't figured out how to make intellij work with this 😅
updated from 2021 to 2024 recently, iirc the 2021 one worked but now it just doesn't...

What does migrateMappings do? I never use it.

It's some yarn (i think) thing to change the names of mappings across different versions since sometimes they are renamed. It can also be used to switch from yarn to mojang. I have a gist detailing the steps I took for updating the mappings since it doesn't currently allow changing mojang mapping versions directly for some reason. Sometimes it breaks but it saves me a lot of pointless renaming work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants