Class WindowExtendedBuildTool
java.lang.Object
com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.Pane
com.ldtteam.blockui.views.View
com.ldtteam.blockui.views.BOWindow
com.ldtteam.structurize.client.gui.AbstractWindowSkeleton
com.ldtteam.structurize.client.gui.AbstractBlueprintManipulationWindow
com.ldtteam.structurize.client.gui.WindowExtendedBuildTool
- All Implemented Interfaces:
com.ldtteam.blockui.controls.ButtonHandler,Consumer<com.ldtteam.blockui.controls.Button>
BuildTool window.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classButton Data.static enumType of button.Nested classes/interfaces inherited from class com.ldtteam.blockui.views.BOWindow
com.ldtteam.blockui.views.BOWindow.WindowRenderTypeNested classes/interfaces inherited from class com.ldtteam.blockui.UiRenderMacros
com.ldtteam.blockui.UiRenderMacros.ResolvedBlit -
Field Summary
FieldsModifier and TypeFieldDescriptionDefault block requirement checkCurrently selected blueprintFields inherited from class com.ldtteam.structurize.client.gui.AbstractBlueprintManipulationWindow
groundstyle, settingsListFields inherited from class com.ldtteam.blockui.views.BOWindow
DEFAULT_HEIGHT, DEFAULT_WIDTH, lightbox, screen, windowPausesGame, windowRenderType, xmlResourceLocationFields inherited from class com.ldtteam.blockui.views.View
children, paddingFields inherited from class com.ldtteam.blockui.Pane
alignment, cursor, debugging, enabled, focus, height, hoverSource, id, lastClickedPane, mc, onHover, onHoverId, parent, visible, wasCursorInPane, width, window, x, yFields inherited from class com.ldtteam.blockui.UiRenderMacros
HALF_BIAS -
Constructor Summary
ConstructorsConstructorDescriptionWindowExtendedBuildTool(net.minecraft.core.BlockPos pos, int groundstyle) WindowExtendedBuildTool(net.minecraft.core.BlockPos pos, int groundstyle, @Nullable BiConsumer<WindowExtendedBuildTool, Blueprint> selectionCallback, @Nullable Predicate<Blueprint> availableBlueprintPredicate) Creates a window build tool. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidOn clicking the red cancel button.protected voidOn clicking confirmprotected voidThis is called when one of the placement options is clicked.protected voidHides as much additional GUI as possible while showing the placement menuvoidonButtonClicked(com.ldtteam.blockui.controls.Button button) Handle a button clicked event.voidonOpened()voidonUpdate()voidWhen the settings button is clicked.voidUpdate the alternative blueprint list.voidupdateBlueprints(List<Blueprint> inputBluePrints, String depth) Update the displayed blueprints.voidupdateFolders(List<StructurePacks.Category> inputCategories) Update the sub category structure.voidupdateLevels(List<Blueprint> blueprints, String depth, boolean hasAlternatives) Update the alternative blueprint list.Methods inherited from class com.ldtteam.structurize.client.gui.AbstractBlueprintManipulationWindow
adjustToGroundOffset, hidePlacementGui, initSettings, onUnhandledKeyTyped, updatePlacementOptions, updateRotationStateMethods inherited from class com.ldtteam.structurize.client.gui.AbstractWindowSkeleton
doNothing, registerButton, registerButtonMethods inherited from class com.ldtteam.blockui.views.BOWindow
close, doesWindowPauseGame, drawSelf, getRenderType, getScreen, getXmlResourceLocation, hasLightbox, loadParams, onClosed, onKeyTyped, onMouseReleased, open, openAsLayerMethods 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, setWindowMethods 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, wasCursorInPaneMethods inherited from class com.ldtteam.blockui.UiRenderMacros
blit, blit, blit, blit, blitRepeatable, blitRepeatable, blitSprite, blitSprite, drawEntity, drawLineRect, drawLineRect, drawLineRect, drawLineRectGradient, drawLineRectGradient, drawLineRectGradient, fill, fill, fillGradient, fillGradient, hLine, hLine, line, line, populateBlitTriangles, populateFillGradientTriangles, populateFillTriangles, resolveSprite, vLine, vLineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ldtteam.blockui.controls.ButtonHandler
accept
-
Field Details
-
BLOCK_BLUEPRINT_REQUIREMENT
Default block requirement check -
selectedBlueprint
Currently selected blueprint
-
-
Constructor Details
-
WindowExtendedBuildTool
public WindowExtendedBuildTool(net.minecraft.core.BlockPos pos, int groundstyle) -
WindowExtendedBuildTool
public WindowExtendedBuildTool(net.minecraft.core.BlockPos pos, int groundstyle, @Nullable @Nullable BiConsumer<WindowExtendedBuildTool, Blueprint> selectionCallback, @Nullable @Nullable Predicate<Blueprint> availableBlueprintPredicate) Creates a window build tool. This requires X, Y and Z coordinates. If a structure is active, recalculates the X Y Z with offset. Otherwise the given parameters are used.- Parameters:
pos- coordinate.groundstyle- one of the GROUNDSTYLE_ values.selectionCallback- callback which gets triggered on confirm clicked if a blueprint is selectedavailableBlueprintPredicate-
-
-
Method Details
-
confirmClicked
protected void confirmClicked()On clicking confirm- Overrides:
confirmClickedin classAbstractBlueprintManipulationWindow
-
onOpened
public void onOpened()- Overrides:
onOpenedin classAbstractBlueprintManipulationWindow
-
cancelClicked
protected void cancelClicked()Description copied from class:AbstractBlueprintManipulationWindowOn clicking the red cancel button.- Specified by:
cancelClickedin classAbstractBlueprintManipulationWindow
-
hideOtherGuiForPlacement
protected void hideOtherGuiForPlacement()Description copied from class:AbstractBlueprintManipulationWindowHides as much additional GUI as possible while showing the placement menu- Overrides:
hideOtherGuiForPlacementin classAbstractBlueprintManipulationWindow
-
handlePlacement
Description copied from class:AbstractBlueprintManipulationWindowThis is called when one of the placement options is clicked.- Specified by:
handlePlacementin classAbstractBlueprintManipulationWindow- Parameters:
type- the placement typeid- the custom id type.
-
onUpdate
public void onUpdate()- Overrides:
onUpdatein classAbstractBlueprintManipulationWindow
-
settingsClicked
public void settingsClicked()Description copied from class:AbstractBlueprintManipulationWindowWhen the settings button is clicked. Open settings window.- Overrides:
settingsClickedin classAbstractBlueprintManipulationWindow
-
updateFolders
Update the sub category structure.- Parameters:
inputCategories- the categories to render now.
-
updateBlueprints
Update the displayed blueprints.- Parameters:
inputBluePrints- the blueprints to display.depth- the depth they're at.
-
updateAlternatives
Update the alternative blueprint list.- Parameters:
bluePrintMapping- the mapping of blueprint name to leveled blueprints.
-
updateLevels
Update the alternative blueprint list.- Parameters:
blueprints- the different blueprint levels.
-
onButtonClicked
public void onButtonClicked(com.ldtteam.blockui.controls.Button button) Description copied from class:AbstractWindowSkeletonHandle a button clicked event. Find the registered event and execute that.todo: make final once migration is complete
- Specified by:
onButtonClickedin interfacecom.ldtteam.blockui.controls.ButtonHandler- Overrides:
onButtonClickedin classAbstractWindowSkeleton- Parameters:
button- the button that was clicked.
-