11package gdavid .psionicutilities .mixin ;
22
33import com .mojang .blaze3d .vertex .*;
4- import com .mojang .math .Matrix4f ;
54import gdavid .psionicutilities .PieceAnnotation ;
65import gdavid .psionicutilities .PsionicUtilities ;
6+ import net .minecraft .client .gui .GuiGraphics ;
77import net .minecraft .client .gui .screens .Screen ;
88import net .minecraft .client .renderer .MultiBufferSource ;
9+ import net .minecraft .client .renderer .texture .TextureAtlas ;
910import net .minecraft .client .resources .model .Material ;
1011import net .minecraft .network .chat .Component ;
1112import net .minecraft .resources .ResourceLocation ;
13+ import org .joml .Matrix4f ;
1214import org .spongepowered .asm .mixin .Mixin ;
1315import org .spongepowered .asm .mixin .injection .*;
1416
1517import gdavid .psionicutilities .ConnectorColor ;
1618import net .minecraftforge .api .distmarker .Dist ;
1719import net .minecraftforge .api .distmarker .OnlyIn ;
1820import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
19- import vazkii .psi .api .ClientPsiAPI ;
2021import vazkii .psi .api .spell .IGenericRedirector ;
2122import vazkii .psi .api .spell .SpellParam ;
2223import vazkii .psi .api .spell .SpellPiece ;
@@ -54,7 +55,7 @@ private void drawComment(PoseStack ms, MultiBufferSource buffers, int light, Cal
5455
5556 @ OnlyIn (Dist .CLIENT )
5657 @ Inject (method = "drawCommentText" , at = @ At ("HEAD" ))
57- private void visibleCommentText (PoseStack ms , int tooltipX , int tooltipY , List <Component > commentText , Screen screen , CallbackInfo callback ) {
58+ private void visibleCommentText (GuiGraphics graphics , int tooltipX , int tooltipY , List <Component > commentText , Screen screen , CallbackInfo callback ) {
5859 PieceAnnotation .filterComment (commentText );
5960 }
6061
@@ -63,7 +64,7 @@ private void drawHighlight(PoseStack ms, MultiBufferSource buffers, int light, i
6364 int r = (value >> 16 ) & 0xFF ;
6465 int g = (value >> 8 ) & 0xFF ;
6566 int b = value & 0xFF ;
66- Material material = new Material (ClientPsiAPI . PSI_PIECE_TEXTURE_ATLAS , new ResourceLocation (PsionicUtilities .modId , "spell/highlight" ));
67+ Material material = new Material (TextureAtlas . LOCATION_BLOCKS , new ResourceLocation (PsionicUtilities .modId , "spell/highlight" ));
6768 VertexConsumer buf = material .buffer (buffers , ignore -> SpellPiece .getLayer ());
6869 Matrix4f mat = ms .last ().pose ();
6970 buf .vertex (mat , -1 , 17 , 0 ).color (r , g , b , 128 );
0 commit comments