Skip to content

Instantly share code, notes, and snippets.

@QbismX
QbismX / RectMod.java
Last active August 25, 2023 15:14
This version is 1.20. I want to draw a rectangle as HUD. But I can't do this. Now, I have made the following code. I am able to display the text to appear in a similar method to the problematic method. I don't know what these methods need respectively.
package com.QbismX.RectMod.main;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraftforge.client.event.RegisterGuiOverlaysEvent;
import net.minecraftforge.client.gui.overlay.IGuiOverlay;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;