public abstract class GuiComponentSideSelector extends BaseComponent
Modifier and Type | Field and Description |
---|---|
protected net.minecraft.block.BlockState |
blockState |
protected int |
diameter |
protected boolean |
highListSelectedSides |
protected boolean |
isInInitialPosition |
protected net.minecraft.util.Direction |
lastSideHovered |
protected boolean |
renderTile |
protected double |
scale |
protected net.minecraft.tileentity.TileEntity |
tile |
protected TrackballWrapper |
trackball |
fontRenderer, keyboardEventListener, mouseEventListener, parent, toolTip, xPos, yPos
Constructor and Description |
---|
GuiComponentSideSelector(GuiBase<?> parent,
int x,
int y,
double scaleValue,
net.minecraft.block.BlockState state,
net.minecraft.tileentity.TileEntity tileEntity,
boolean doHighlights,
boolean doRenderTile)
Creates the side selector object
|
Modifier and Type | Method and Description |
---|---|
net.minecraft.block.BlockState |
getBlockState() |
protected abstract java.awt.Color |
getColorForMode(net.minecraft.util.Direction side)
This is used to color the highlight.
|
int |
getHeight()
Used to find how tall this is
|
double |
getScale()
Accessors/Mutators *
|
net.minecraft.tileentity.TileEntity |
getTile() |
int |
getWidth()
Used to find how wide this is
|
boolean |
isHighListSelectedSides() |
boolean |
isRenderTile() |
boolean |
mouseClicked(double x,
double y,
int button)
Called when the mouse is pressed
|
boolean |
mouseReleased(double x,
double y,
int button)
Called when the mouse button is over the component and released
|
protected abstract void |
onSideToggled(net.minecraft.util.Direction side,
int modifier)
This is called any time the user presses a side to toggle the mode.
|
void |
render(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called to render the component
|
void |
renderOverlay(int guiLeft,
int guiTop,
int mouseX,
int mouseY)
Called after base render, is already translated to guiLeft and guiTop, just move offset
|
void |
setBlockState(net.minecraft.block.BlockState blockState) |
void |
setHighListSelectedSides(boolean highListSelectedSides) |
void |
setRenderTile(boolean renderTile) |
void |
setScale(double scale) |
void |
setTile(net.minecraft.tileentity.TileEntity tile) |
getArea, getDynamicToolTip, getKeyboardEventListener, getMouseEventListener, getParent, getToolTip, getXPos, getYPos, isMouseOver, keyTyped, mouseDown, mouseDrag, mouseScrolled, mouseUp, renderToolTip, setKeyboardEventListener, setMouseEventListener, setParent, setToolTip, setXPos, setYPos
addButton, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onClose, removed, render, renderBackground, renderBackground, renderComponentHoverEffect, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderTooltip, resize, sendMessage, sendMessage, setSize, shouldCloseOnEsc, tick, wrapScreenError
getFocused, isDragging, setDragging, setFocused
blit, blit, blit, blit, blit, drawCenteredString, drawRightAlignedString, drawString, fill, fillGradient, hLine, innerBlit, vLine
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected double scale
protected net.minecraft.block.BlockState blockState
protected net.minecraft.tileentity.TileEntity tile
protected boolean highListSelectedSides
protected boolean renderTile
protected int diameter
protected boolean isInInitialPosition
protected TrackballWrapper trackball
protected net.minecraft.util.Direction lastSideHovered
public GuiComponentSideSelector(GuiBase<?> parent, int x, int y, double scaleValue, @Nullable net.minecraft.block.BlockState state, @Nullable net.minecraft.tileentity.TileEntity tileEntity, boolean doHighlights, boolean doRenderTile)
parent
- The parent GUIx
- The x posy
- The y posscaleValue
- The scalestate
- The block state of the block to rendertileEntity
- The tile entity of the block to renderdoHighlights
- Render the highlights when selectingdoRenderTile
- Render the tile?protected abstract void onSideToggled(net.minecraft.util.Direction side, int modifier)
side
- The side that was selectedmodifier
- 0 : Normal Click (you should toggle to the next mode)
1 : Shift Click (you should set to default or disabled)
2 : Control Click (you should go backward)@Nullable protected abstract java.awt.Color getColorForMode(net.minecraft.util.Direction side)
side
- The side that needs a colorpublic boolean mouseClicked(double x, double y, int button)
x
- Mouse X Positiony
- Mouse Y Positionbutton
- Mouse Buttonpublic boolean mouseReleased(double x, double y, int button)
x
- Mouse X Positiony
- Mouse Y Positionbutton
- Mouse Buttonpublic void render(int guiLeft, int guiTop, int mouseX, int mouseY)
render
in class BaseComponent
public void renderOverlay(int guiLeft, int guiTop, int mouseX, int mouseY)
renderOverlay
in class BaseComponent
public int getWidth()
getWidth
in class BaseComponent
public int getHeight()
getHeight
in class BaseComponent
public double getScale()
public void setScale(double scale)
public net.minecraft.block.BlockState getBlockState()
public void setBlockState(net.minecraft.block.BlockState blockState)
public net.minecraft.tileentity.TileEntity getTile()
public void setTile(net.minecraft.tileentity.TileEntity tile)
public boolean isHighListSelectedSides()
public void setHighListSelectedSides(boolean highListSelectedSides)
public boolean isRenderTile()
public void setRenderTile(boolean renderTile)