Added author splashes

This commit is contained in:
Wolren 2024-04-30 14:08:01 +02:00
parent ea86487eff
commit 78833f9dfc
3 changed files with 39 additions and 2 deletions

View File

@ -0,0 +1,32 @@
package gay.pridecraft.joymod.mixin;
import net.minecraft.client.resource.SplashTextResourceSupplier;
import org.spongepowered.asm.mixin.Mixin;
import net.minecraft.resource.ResourceManager;
import net.minecraft.util.profiler.Profiler;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
@Mixin(SplashTextResourceSupplier.class)
public class SplashTextResourceSupplierMixin {
@Unique
private static final List<String> AUTHORS = List.of("Blurryface", "Wolren", "UnlikePaladin");
@Inject(method = "prepare*", at = @At("RETURN"), cancellable = true)
private void onPrepare(ResourceManager resourceManager, Profiler profiler, CallbackInfoReturnable<List<String>> cir) {
List<String> splashes = cir.getReturnValue();
for (String author : AUTHORS) {
splashes.add("Made by " + author + "!");
}
cir.setReturnValue(splashes);
}
}

View File

@ -4,7 +4,11 @@
"version": "${version}",
"name": "JoyMod",
"description": "This is an LGBT pride-themed Fabric mod made by Pridecraft Studios.",
"authors": [],
"authors": [
"Blurryface",
"Wolren",
"UnlikePaladin"
],
"contact": {
"homepage": "https://pridecraft.gay/",
"sources": "https://git.pridecraft.gay/PrideMod"

View File

@ -7,7 +7,8 @@
"LivingEntityMixin"
],
"client": [
"ClientPlayNetworkHandlerMixin"
"ClientPlayNetworkHandlerMixin",
"SplashTextResourceSupplierMixin"
],
"injectors": {
"defaultRequire": 1