top.hendrixshen.magiclib.mixin.dev.threadtweak.DataFixersMixin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-better-dev-1.20.6-fabric Show documentation
Show all versions of magiclib-better-dev-1.20.6-fabric Show documentation
Development Environment runtime QOL.
The newest version!
package top.hendrixshen.magiclib.mixin.dev.threadtweak;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import top.hendrixshen.magiclib.impl.dev.threadtweak.ThreadTweaker;
import java.util.concurrent.ThreadFactory;
import net.minecraft.class_3551;
@Mixin(value = class_3551.class, remap = false)
public class DataFixersMixin {
@Redirect(
method = "createFixerUpper",
at = @At(
value = "INVOKE",
target= "Lcom/google/common/util/concurrent/ThreadFactoryBuilder;build()Ljava/util/concurrent/ThreadFactory;"
)
)
private static @NotNull ThreadFactory onBuildThread(@NotNull ThreadFactoryBuilder builder) {
builder.setPriority(ThreadTweaker.getBootstrapPriority());
return builder.build();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy