Skip to content

Commit

Permalink
Merge commit 'd78cf81eaecba514f2dc12b168d80a6717acbd6d' into 19.2/mod…
Browse files Browse the repository at this point in the history
…ernized
  • Loading branch information
embeddedt committed Sep 15, 2024
2 parents d9e9e83 + d78cf81 commit 782fdb9
Show file tree
Hide file tree
Showing 104 changed files with 23 additions and 46 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ base {
// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17.
// java.toolchain.languageVersion = JavaLanguageVersion.of(17)

val extraSourceSets = arrayOf("legacy", "compat", "mixin")
val extraSourceSets = arrayOf("legacy", "compat")

sourceSets {
val main = getByName("main")
Expand Down Expand Up @@ -150,7 +150,7 @@ repositories {

mixin {
// MixinGradle Settings
add(sourceSets["mixin"], "embeddium-refmap.json")
add(sourceSets["main"], "embeddium-refmap.json")
config("embeddium.mixins.json")
}

Expand All @@ -172,10 +172,10 @@ dependencies {

"runtimeOnlyNonPublishable"(fg.deobf("curse.maven:modernfix-790626:5288170"))

"mixinAnnotationProcessor"("net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5")
annotationProcessor("net.fabricmc:sponge-mixin:0.12.5+mixin.0.8.5")

compileOnly("io.github.llamalad7:mixinextras-common:0.3.5")
"mixinAnnotationProcessor"("io.github.llamalad7:mixinextras-common:0.3.5")
annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5")

compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.jellysquid.mods.sodium.client.render.vertex;

import me.jellysquid.mods.sodium.mixin.core.render.VertexFormatAccessor;
import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute;
import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription;
import com.mojang.blaze3d.vertex.VertexFormat;
Expand Down Expand Up @@ -51,7 +52,7 @@ public static int[] getOffsets(VertexFormat format) {
Arrays.fill(commonElementOffsets, -1);

var elementList = format.getElements();
var elementOffsets = format.offsets;
var elementOffsets = ((VertexFormatAccessor) format).getOffsets();

for (int elementIndex = 0; elementIndex < elementList.size(); elementIndex++) {
var element = elementList.get(elementIndex);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package me.jellysquid.mods.sodium.client.util;

import me.jellysquid.mods.sodium.mixin.features.textures.NativeImageAccessor;
import com.mojang.blaze3d.platform.NativeImage;
import org.embeddedt.embeddium.impl.mixinterface.NativeImageAccessor;

import java.util.Locale;

public class NativeImageHelper {
Expand All @@ -13,6 +12,6 @@ public static long getPointerRGBA(NativeImage nativeImage) {
}

return ((NativeImageAccessor) (Object) nativeImage) // duck type since NativeImage is final
.embeddium$getPixels();
.getPointer();
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.embeddedt.embeddium.taint.scanning;
package me.jellysquid.mods.sodium.mixin;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.Type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.apache.logging.log4j.Logger;
import org.embeddedt.embeddium.asm.AnnotationProcessingEngine;
import org.embeddedt.embeddium.config.ConfigMigrator;
import org.embeddedt.embeddium.taint.scanning.MixinClassValidator;
import org.embeddedt.embeddium_integrity.MixinTaintDetector;
import org.objectweb.asm.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import net.minecraft.server.packs.resources.ReloadableResourceManager;
import net.minecraft.util.profiling.ProfilerFiller;
import me.jellysquid.mods.sodium.client.compatibility.checks.ResourcePackScanner;
import org.embeddedt.embeddium.impl.mixinterface.MinecraftAccessor;
import org.lwjgl.opengl.GL32C;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -21,12 +20,10 @@
import java.util.concurrent.CompletableFuture;

@Mixin(Minecraft.class)
public class MinecraftClientMixin implements MinecraftAccessor {
public class MinecraftClientMixin {
@Shadow
@Final
private ReloadableResourceManager resourceManager;
@Shadow
private Thread gameThread;
@Unique
private final LongArrayFIFOQueue fences = new LongArrayFIFOQueue();

Expand Down Expand Up @@ -100,8 +97,4 @@ private void postResourceReload(CallbackInfoReturnable<CompletableFuture<Void>>
ResourcePackScanner.checkIfCoreShaderLoaded(this.resourceManager);
}

@Override
public Thread embeddium$getGameThread() {
return this.gameThread;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.jellysquid.mods.sodium.mixin.core.render;

import net.minecraft.client.Minecraft;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(Minecraft.class)
public interface MinecraftAccessor {
@Accessor("gameThread")
Thread embeddium$getGameThread();
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.embeddedt.embeddium.impl.render.chunk.compile;

import me.jellysquid.mods.sodium.client.render.chunk.compile.ChunkBuildContext;
import me.jellysquid.mods.sodium.mixin.core.render.MinecraftAccessor;
import net.minecraft.client.Minecraft;
import org.embeddedt.embeddium.impl.mixinterface.MinecraftAccessor;
import org.jetbrains.annotations.Nullable;

public final class GlobalChunkBuildContext {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
import me.jellysquid.mods.sodium.mixin.MixinClassValidator;
import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.fml.loading.moddiscovery.ModFile;
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
Expand Down
File renamed without changes.

This file was deleted.

0 comments on commit 782fdb9

Please sign in to comment.