Implemented party quest dropping in the party GUI.

Made party button always visible in the quest log if a quest can be partied with.

Added drawTextBlock() function to GuiNPCInterface.
This commit is contained in:
Luis C.M committed 2024-02-18 03:02:02 -06:00
1 parent 1044269f5e
commit f84b16b29a
4 files changed
+63 -48

No files matched your search

@@ -9,6 +9,9 @@ import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import noppes.npcs.client.CustomNpcResourceListener;
import noppes.npcs.client.TextBlockClient;
import noppes.npcs.entity.EntityNPCInterface;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
@@ -269,6 +272,14 @@ public abstract class GuiNPCInterface extends GuiScreen
GL11.glPopMatrix();
}
protected void drawTextBlock(String text, int x, int y, int lineWidth) {
TextBlockClient block = new TextBlockClient(StatCollector.translateToLocal(text), lineWidth, true, player);
for(int line = 0; line < block.lines.size(); line++){
String lineText = block.lines.get(line).getFormattedText();
fontRendererObj.drawString(lineText, x, y + (line * fontRendererObj.FONT_HEIGHT), CustomNpcResourceListener.DefaultTextColor);
}
}
public FontRenderer getFontRenderer() {
return this.fontRendererObj;
}