From 99e4b24d8bde8b65fb4c23ad173a261d296bed09 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 27 Sep 2024 14:31:41 -0700 Subject: [PATCH] Get impl'd - Move all font/text related mixins into impl --- common/src/backend/resources/flywheel.backend.mixins.json | 4 ---- .../dev/engine_room/flywheel/impl/FlwLibLinkImpl.java | 2 +- .../dev/engine_room/flywheel/impl}/FontTextureUpload.java | 4 ++-- .../flywheel/impl/mixin/{ => text}/BakedGlyphMixin.java | 2 +- .../flywheel/impl/mixin/text}/CodePointMapMixin.java | 2 +- .../flywheel/impl/mixin/{ => text}/FontAccessor.java | 2 +- .../flywheel/impl/mixin/text}/FontSetMixin.java | 2 +- .../impl/mixin/text}/FontTexture$NodeAccessor.java | 2 +- .../flywheel/impl/mixin/text}/FontTextureMixin.java | 4 ++-- common/src/main/resources/flywheel.impl.mixins.json | 8 ++++++-- 10 files changed, 16 insertions(+), 16 deletions(-) rename common/src/{backend/java/dev/engine_room/flywheel/backend/util => main/java/dev/engine_room/flywheel/impl}/FontTextureUpload.java (62%) rename common/src/main/java/dev/engine_room/flywheel/impl/mixin/{ => text}/BakedGlyphMixin.java (96%) rename common/src/{backend/java/dev/engine_room/flywheel/backend/mixin => main/java/dev/engine_room/flywheel/impl/mixin/text}/CodePointMapMixin.java (97%) rename common/src/main/java/dev/engine_room/flywheel/impl/mixin/{ => text}/FontAccessor.java (87%) rename common/src/{backend/java/dev/engine_room/flywheel/backend/mixin => main/java/dev/engine_room/flywheel/impl/mixin/text}/FontSetMixin.java (96%) rename common/src/{backend/java/dev/engine_room/flywheel/backend/mixin => main/java/dev/engine_room/flywheel/impl/mixin/text}/FontTexture$NodeAccessor.java (84%) rename common/src/{backend/java/dev/engine_room/flywheel/backend/mixin => main/java/dev/engine_room/flywheel/impl/mixin/text}/FontTextureMixin.java (97%) diff --git a/common/src/backend/resources/flywheel.backend.mixins.json b/common/src/backend/resources/flywheel.backend.mixins.json index 8a4f51c8f..2d924bef0 100644 --- a/common/src/backend/resources/flywheel.backend.mixins.json +++ b/common/src/backend/resources/flywheel.backend.mixins.json @@ -6,10 +6,6 @@ "refmap": "backend-flywheel.refmap.json", "client": [ "AbstractClientPlayerAccessor", - "CodePointMapMixin", - "FontSetMixin", - "FontTexture$NodeAccessor", - "FontTextureMixin", "GlStateManagerMixin", "LevelRendererAccessor", "OptionsMixin", diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/FlwLibLinkImpl.java b/common/src/main/java/dev/engine_room/flywheel/impl/FlwLibLinkImpl.java index 635ecc506..f3abee51b 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/FlwLibLinkImpl.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/FlwLibLinkImpl.java @@ -9,9 +9,9 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import dev.engine_room.flywheel.impl.extension.PoseStackExtension; -import dev.engine_room.flywheel.impl.mixin.FontAccessor; import dev.engine_room.flywheel.impl.mixin.ModelPartAccessor; import dev.engine_room.flywheel.impl.mixin.PoseStackAccessor; +import dev.engine_room.flywheel.impl.mixin.text.FontAccessor; import dev.engine_room.flywheel.lib.internal.FlwLibLink; import dev.engine_room.flywheel.lib.internal.GlyphExtension; import dev.engine_room.flywheel.lib.transform.PoseTransformStack; diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/util/FontTextureUpload.java b/common/src/main/java/dev/engine_room/flywheel/impl/FontTextureUpload.java similarity index 62% rename from common/src/backend/java/dev/engine_room/flywheel/backend/util/FontTextureUpload.java rename to common/src/main/java/dev/engine_room/flywheel/impl/FontTextureUpload.java index c6865dff9..eb1c15ee2 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/util/FontTextureUpload.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/FontTextureUpload.java @@ -1,9 +1,9 @@ -package dev.engine_room.flywheel.backend.util; +package dev.engine_room.flywheel.impl; import com.mojang.blaze3d.font.SheetGlyphInfo; /** - * For use in {@link dev.engine_room.flywheel.backend.mixin.FontTextureMixin} + * For use in {@link dev.engine_room.flywheel.impl.mixin.text.FontTextureMixin} * to batch glyph uploads when they're created in a flywheel worker thread. */ public record FontTextureUpload(SheetGlyphInfo info, int x, int y) { diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BakedGlyphMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/BakedGlyphMixin.java similarity index 96% rename from common/src/main/java/dev/engine_room/flywheel/impl/mixin/BakedGlyphMixin.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/BakedGlyphMixin.java index 11dc3c27a..2d3c63f24 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/BakedGlyphMixin.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/BakedGlyphMixin.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.impl.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/CodePointMapMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/CodePointMapMixin.java similarity index 97% rename from common/src/backend/java/dev/engine_room/flywheel/backend/mixin/CodePointMapMixin.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/CodePointMapMixin.java index 0dfcd993c..5c9f245bc 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/CodePointMapMixin.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/CodePointMapMixin.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.backend.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import java.util.function.IntFunction; diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/FontAccessor.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontAccessor.java similarity index 87% rename from common/src/main/java/dev/engine_room/flywheel/impl/mixin/FontAccessor.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontAccessor.java index dbea26326..db9cbe0c4 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/mixin/FontAccessor.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontAccessor.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.impl.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Invoker; diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontSetMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontSetMixin.java similarity index 96% rename from common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontSetMixin.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontSetMixin.java index 39b53f211..d31f79a41 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontSetMixin.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontSetMixin.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.backend.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTexture$NodeAccessor.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTexture$NodeAccessor.java similarity index 84% rename from common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTexture$NodeAccessor.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTexture$NodeAccessor.java index e8120e5ce..d2723f645 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTexture$NodeAccessor.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTexture$NodeAccessor.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.backend.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; diff --git a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTextureMixin.java b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTextureMixin.java similarity index 97% rename from common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTextureMixin.java rename to common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTextureMixin.java index 37d63df74..358d9e36b 100644 --- a/common/src/backend/java/dev/engine_room/flywheel/backend/mixin/FontTextureMixin.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/mixin/text/FontTextureMixin.java @@ -1,4 +1,4 @@ -package dev.engine_room.flywheel.backend.mixin; +package dev.engine_room.flywheel.impl.mixin.text; import java.util.ArrayList; import java.util.List; @@ -20,7 +20,7 @@ import com.mojang.blaze3d.platform.NativeImage; import com.mojang.blaze3d.systems.RenderSystem; -import dev.engine_room.flywheel.backend.util.FontTextureUpload; +import dev.engine_room.flywheel.impl.FontTextureUpload; import dev.engine_room.flywheel.lib.internal.FontTextureExtension; import dev.engine_room.flywheel.lib.internal.GlyphExtension; import net.minecraft.client.gui.font.FontTexture; diff --git a/common/src/main/resources/flywheel.impl.mixins.json b/common/src/main/resources/flywheel.impl.mixins.json index f00cee47f..be3f691be 100644 --- a/common/src/main/resources/flywheel.impl.mixins.json +++ b/common/src/main/resources/flywheel.impl.mixins.json @@ -5,12 +5,10 @@ "compatibilityLevel": "JAVA_17", "refmap": "flywheel.refmap.json", "client": [ - "BakedGlyphMixin", "BlockEntityTypeMixin", "ClientChunkCacheMixin", "ClientLevelMixin", "EntityTypeMixin", - "FontAccessor", "LevelMixin", "LevelRendererMixin", "MinecraftMixin", @@ -19,6 +17,12 @@ "PoseStackMixin", "fix.FixFabulousDepthMixin", "fix.FixNormalScalingMixin", + "text.BakedGlyphMixin", + "text.CodePointMapMixin", + "text.FontAccessor", + "text.FontSetMixin", + "text.FontTexture$NodeAccessor", + "text.FontTextureMixin", "visualmanage.BlockEntityMixin", "visualmanage.LevelChunkMixin", "visualmanage.LevelRendererMixin",