1717
1818package com .lambda .mixin .render ;
1919
20+ import com .lambda .util .LambdaResource ;
2021import net .minecraft .client .gui .screen .SplashOverlay ;
22+ import net .minecraft .client .texture .ResourceTexture ;
23+ import net .minecraft .resource .DefaultResourcePack ;
24+ import net .minecraft .resource .InputSupplier ;
25+ import net .minecraft .resource .ResourceType ;
2126import net .minecraft .util .Identifier ;
2227import net .minecraft .util .math .ColorHelper ;
2328import org .spongepowered .asm .mixin .Final ;
2934import org .spongepowered .asm .mixin .injection .Redirect ;
3035import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
3136
37+ import java .io .InputStream ;
3238import java .util .function .IntSupplier ;
3339
3440@ Mixin (SplashOverlay .class )
@@ -47,4 +53,16 @@ private int redirectBrandArgb(IntSupplier originalSupplier) {
4753 private void onInit (CallbackInfo ci ) {
4854 LOGO = Identifier .of ("lambda" , "textures/lambda_banner.png" );
4955 }
56+
57+ @ Mixin (SplashOverlay .LogoTexture .class )
58+ static class LogoTextureMixin extends ResourceTexture {
59+ @ Redirect (method = "loadTextureData" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/resource/DefaultResourcePack;open(Lnet/minecraft/resource/ResourceType;Lnet/minecraft/util/Identifier;)Lnet/minecraft/resource/InputSupplier;" ))
60+ InputSupplier <InputStream > loadTextureData (DefaultResourcePack instance , ResourceType type , Identifier id ) {
61+ return () -> new LambdaResource ("textures/lambda_banner.png" ).getStream ();
62+ }
63+
64+ public LogoTextureMixin (Identifier location ) {
65+ super (location );
66+ }
67+ }
5068}
0 commit comments