Class AbstractBuildingWindow<B extends IBuildingView>

java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.views.View
com.ldtteam.blockui.views.BOWindow
com.minecolonies.core.client.gui.AbstractWindowSkeleton
com.minecolonies.core.client.gui.AbstractBuildingWindow<B>
Type Parameters:
B - Class extending AbstractBuildingView.
All Implemented Interfaces:
com.ldtteam.blockui.controls.ButtonHandler, IModuleContainer<IWindowModule>, Consumer<com.ldtteam.blockui.controls.Button>
Direct Known Subclasses:
AbstractBuildingMainWindow, AbstractModuleWindow, ConnectionModuleWindow

public abstract class AbstractBuildingWindow<B extends IBuildingView> extends AbstractWindowSkeleton
Manage windows associated with buildings.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.ldtteam.blockui.views.BOWindow

    com.ldtteam.blockui.views.BOWindow.WindowRenderType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final B
    The building view instance.

    Fields inherited from class com.minecolonies.core.client.gui.AbstractWindowSkeleton

    buttonNextPage, buttonPrevPage, pageNum, switchView

    Fields inherited from class com.ldtteam.blockui.views.BOWindow

    DEFAULT_HEIGHT, DEFAULT_WIDTH, lightbox, screen, windowPausesGame, windowRenderType, xmlResourceLocation

    Fields inherited from class com.ldtteam.blockui.views.View

    children, padding

    Fields inherited from class com.ldtteam.blockui.Pane

    alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, visible, wasCursorInPane, width, window, x, y

    Fields inherited from class com.ldtteam.blockui.UiRenderMacros

    HALF_BIAS
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractBuildingWindow(B buildingView, net.minecraft.resources.ResourceLocation resource)
    Constructor for the windows that are associated with buildings.
    AbstractBuildingWindow(com.ldtteam.blockui.views.BOWindow parent, B buildingView, net.minecraft.resources.ResourceLocation resource)
    Constructor for the windows that are associated with buildings.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setPage(boolean relative, int page)
    Generic page handler, uses common ids
    protected boolean
    Whether this window should render the side tabs.

    Methods inherited from class com.ldtteam.blockui.views.BOWindow

    doesWindowPauseGame, drawSelf, getRenderType, getScreen, getXmlResourceLocation, hasLightbox, loadParams, onKeyTyped, onMouseReleased, onUnhandledKeyTyped, open, openAsLayer

    Methods inherited from class com.ldtteam.blockui.views.View

    accumulatePosition, addChild, addChild, adjustChild, childIsVisible, click, drawHidden, drawSelfLast, findPaneByID, findPaneByType, findPaneForClick, getAccumulatedPosition, getChildren, getInteriorHeight, getInteriorWidth, mouseClickableEventHandler, mouseEventProcessor, mousePointableEventHandler, onMouseDrag, parseChildren, postAddChild, removeChild, rightClick, scrollInput, setSize, setWindow

    Methods inherited from class com.ldtteam.blockui.Pane

    canHandleClick, clearFocus, disable, draw, drawLast, enable, findFirstPaneByType, findPaneOfTypeByID, getAlignment, getCursor, getFocus, getHeight, getHoverPane, getID, getParent, getWidth, getWindow, getX, getY, handleClick, handleHover, handleRightClick, hide, isClickable, isEnabled, isFocus, isPointInPane, isVisible, moveBy, off, on, onFocus, onFocusLost, putInside, scissorsEnd, scissorsStart, setAlignment, setCursor, setEnabled, setFocus, setFocus, setHoverPane, setID, setParentView, setPosition, setVisible, shouldDraw, show, wasCursorInPane

    Methods inherited from class com.ldtteam.blockui.UiRenderMacros

    blit, blit, blit, blit, blitRepeatable, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, vLine, vLine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.ldtteam.blockui.controls.ButtonHandler

    accept

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Field Details

    • buildingView

      protected final B extends IBuildingView buildingView
      The building view instance.
  • Constructor Details

    • AbstractBuildingWindow

      public AbstractBuildingWindow(B buildingView, net.minecraft.resources.ResourceLocation resource)
      Constructor for the windows that are associated with buildings.
      Parameters:
      buildingView - class extending AbstractBuildingView.
      resource - window resource location.
    • AbstractBuildingWindow

      public AbstractBuildingWindow(com.ldtteam.blockui.views.BOWindow parent, B buildingView, net.minecraft.resources.ResourceLocation resource)
      Constructor for the windows that are associated with buildings.
      Parameters:
      parent - the parent window.
      buildingView - class extending AbstractBuildingView.
      resource - window resource location.
  • Method Details

    • shouldRenderDefaultSidebar

      protected boolean shouldRenderDefaultSidebar()
      Whether this window should render the side tabs. Defaults to true.
      Returns:
      true if so.
    • setPage

      public void setPage(boolean relative, int page)
      Description copied from class: AbstractWindowSkeleton
      Generic page handler, uses common ids
      Overrides:
      setPage in class AbstractWindowSkeleton
      Parameters:
      relative - whether page param is relative or absolute
      page - if relative turn x pages forward/backward, if absolute turn to x-th page