public class ChatExtensionScreen
extends net.minecraft.client.gui.screen.Screen
Modifier and Type | Field and Description |
---|---|
static boolean |
chatOpen
Whether the chatbox is open.
|
protected net.minecraft.client.gui.widget.TextFieldWidget |
inputField |
boolean |
updateHeight |
Constructor and Description |
---|
ChatExtensionScreen(net.minecraft.client.gui.screen.Screen screen,
int yOffset)
Initializes the chat.
|
Modifier and Type | Method and Description |
---|---|
boolean |
charTyped(char typedChar,
int keyCode) |
void |
drawScreen(com.mojang.blaze3d.matrix.MatrixStack matrix,
int par1,
int par2,
float par3)
Draws the chatbox.
|
void |
init()
Sets up the chat.
|
boolean |
isChatOpen()
Gets whether chat is currently open or not.
|
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers)
Puts keyboard input into the chatbox.
|
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
void |
mouseClickedUnderMenus(int par1,
int par2,
int par3)
Handles mouse input.
|
boolean |
mouseScrolled(double mouseX,
double mouseY,
double delta)
Scrolls through the chat when the scroll wheel is inputted.
|
void |
onClose()
Resets the chat.
|
void |
sendMessage(java.lang.String text) |
void |
tick(int height)
Updates the cursor flash animation.
|
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, onFilesDrop, removed, render, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, resize, sendMessage, shouldCloseOnEsc, tick, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean chatOpen
public boolean updateHeight
protected net.minecraft.client.gui.widget.TextFieldWidget inputField
public ChatExtensionScreen(net.minecraft.client.gui.screen.Screen screen, int yOffset)
screen
- The screen that contains the chat.yOffset
- The y offset of the chat from the bottom of the screen.public boolean charTyped(char typedChar, int keyCode)
public boolean mouseClicked(double mouseX, double mouseY, int button)
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
keyPressed
in interface net.minecraft.client.gui.IGuiEventListener
keyPressed
in interface net.minecraft.client.gui.INestedGuiEventHandler
keyPressed
in class net.minecraft.client.gui.screen.Screen
public void init()
init
in class net.minecraft.client.gui.screen.Screen
public void onClose()
onClose
in class net.minecraft.client.gui.screen.Screen
public void tick(int height)
public boolean isChatOpen()
public void drawScreen(com.mojang.blaze3d.matrix.MatrixStack matrix, int par1, int par2, float par3)
par1
- The x coordinate of the mouse.par2
- The y coordinate of the mouse.par3
- The current amount of partial ticks.public void sendMessage(java.lang.String text)
sendMessage
in class net.minecraft.client.gui.screen.Screen
public boolean mouseScrolled(double mouseX, double mouseY, double delta)
public void mouseClickedUnderMenus(int par1, int par2, int par3)
par1
- The x coordinate of the mouse.par2
- The y coordinate of the mouse.par3
- The button that was clicked.