Updated mappings.
This commit is contained in:
@ -6,6 +6,7 @@ import dev.micle.loginprotection.data.ProtectedPlayer;
|
||||
import dev.micle.loginprotection.proxy.Proxy;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.gui.overlay.ForgeGui;
|
||||
@ -18,8 +19,9 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class GuiRenderTickMixin {
|
||||
@Inject(method = "render", at = @At(value = "HEAD"))
|
||||
private void onClientTick(PoseStack poseStack, float partialTicks, CallbackInfo callbackInfo) {
|
||||
private void onClientTick(GuiGraphics guiGraphics, float partialTick, CallbackInfo ci) {
|
||||
// Setup
|
||||
PoseStack poseStack = guiGraphics.pose();
|
||||
poseStack.pushPose();
|
||||
poseStack.translate(Minecraft.getInstance().getWindow().getGuiScaledWidth() / 2.0,
|
||||
Minecraft.getInstance().getWindow().getGuiScaledHeight() / 2.0, 0);
|
||||
@ -39,7 +41,7 @@ public class GuiRenderTickMixin {
|
||||
int argb = 0xFFFFFFFF;
|
||||
|
||||
// Draw the player's protection state
|
||||
font.drawShadow(poseStack, Proxy.Client.getPlayerState().toString().replace("_", " "), offsetX, offsetY, argb);
|
||||
guiGraphics.drawString(font, Proxy.Client.getPlayerState().toString().replace("_", " "), (int)offsetX, (int)offsetY, argb);
|
||||
}
|
||||
poseStack.popPose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user