mirror of
https://github.com/Pridecraft-Studios/joy.git
synced 2025-08-03 22:46:02 -04:00
Added author splashes
This commit is contained in:
parent
ea86487eff
commit
78833f9dfc
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
|||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "JoyMod",
|
"name": "JoyMod",
|
||||||
"description": "This is an LGBT pride-themed Fabric mod made by Pridecraft Studios.",
|
"description": "This is an LGBT pride-themed Fabric mod made by Pridecraft Studios.",
|
||||||
"authors": [],
|
"authors": [
|
||||||
|
"Blurryface",
|
||||||
|
"Wolren",
|
||||||
|
"UnlikePaladin"
|
||||||
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://pridecraft.gay/",
|
"homepage": "https://pridecraft.gay/",
|
||||||
"sources": "https://git.pridecraft.gay/PrideMod"
|
"sources": "https://git.pridecraft.gay/PrideMod"
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
"LivingEntityMixin"
|
"LivingEntityMixin"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
"ClientPlayNetworkHandlerMixin"
|
"ClientPlayNetworkHandlerMixin",
|
||||||
|
"SplashTextResourceSupplierMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user