Class CreatorGarageDoor
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.tooluser.ToolUser
nl.pim16aap2.animatedarchitecture.core.tooluser.creator.Creator
nl.pim16aap2.animatedarchitecture.structures.garagedoor.CreatorGarageDoor
The creator for the garage door structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.pim16aap2.animatedarchitecture.core.tooluser.ToolUser
ToolUser.Context -
Field Summary
Fields inherited from class nl.pim16aap2.animatedarchitecture.core.tooluser.creator.Creator
commandFactory, databaseManager, economyManager, factoryCompleteProcess, factoryConfirmPrice, factoryProvideFirstPos, factoryProvideName, factoryProvideOpenDir, factoryProvideOpenStatus, factoryProvidePowerBlockPos, factoryProvideRotationPointPos, factoryProvideSecondPos, factoryReviewResult, limitsManager, structureBuilder, structureID, structureTypeFields inherited from class nl.pim16aap2.animatedarchitecture.core.tooluser.ToolUser
animatedArchitectureToolUtil, localizer, protectionHookManager, stepFactory, textFactory, toolUserManager -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreatorGarageDoor(ToolUser.Context context, IPlayer player, @Nullable String name) protectedCreatorGarageDoor(ToolUser.Context context, StructureType structureType, IPlayer player, @Nullable String name) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompleteSetOpenDirStep(MovementDirection direction) Attempts to complete the step that provides theCreator.movementDirection.protected StructureConstructs the structure at the end of the creation process.Generates the list ofSteps that together will make up theToolUser.procedure.Gets the list of valid open directions for this type.protected voidgiveTool()Method used to give the AnimatedArchitecture tool to the user.protected final @Nullable Booleanprotected CompletableFuture<Boolean> Provides the second location of the selection and advances the procedure if successful.toString()protected voidCalculates the position of the rotation point.Methods inherited from class nl.pim16aap2.animatedarchitecture.core.tooluser.creator.Creator
buyStructure, completeCreationProcess, completeNamingStep, completeSetOpenStatusStep, completeSetPowerBlockStep, completeSetRotationPointStep, confirmPrice, constructStructureData, createCuboid, getCuboid, getFirstPos, getMovementDirection, getName, getPowerblock, getPowerBlock, getPrice, getProperty, getRequiredProperty, getStructureArg, getStructureType, getUnregisteredUID, getWorld, giveTool, init, insertStructure, isLocked, isPowerBlockWithinRangeLimit, isProcessIsUpdatable, prepareReviewResult, prepareSetOpenDirection, prepareSetOpenStatus, provideFirstPos, setCuboid, setFirstPos, setLocked, setMovementDirection, setOpenDirectionTextSupplier, setOpenStatusTextSupplier, setPowerblock, setProperty, setWorld, showPreview, skipConfirmPrice, update, verifyWorldMatchMethods inherited from class nl.pim16aap2.animatedarchitecture.core.tooluser.ToolUser
abort, assertLockHeld, cleanUpProcess, getAllSteps, getCurrentStep, getCurrentStepMessage, getPlayer, giveTool, goToNextStep, handleInput, handleInputWithLock, insertStep, isActive, playerHasAccessToCuboid, playerHasAccessToLocation, playerHasTool, prepareCurrentStep, removeTool, runWithLock, sendMessage, sendMessage, setPlayerHasTool, skipToStep, toMinimalString
-
Constructor Details
-
CreatorGarageDoor
protected CreatorGarageDoor(ToolUser.Context context, StructureType structureType, IPlayer player, @Nullable @Nullable String name) -
CreatorGarageDoor
-
-
Method Details
-
generateSteps
Description copied from class:ToolUserGenerates the list ofSteps that together will make up theToolUser.procedure.- Specified by:
generateStepsin classToolUser- Returns:
- The list of
Steps that together will make up theToolUser.procedure. - Throws:
InstantiationException- When a step's factory is incomplete or otherwise invalid.
-
provideSecondPos
Description copied from class:CreatorProvides the second location of the selection and advances the procedure if successful.- Overrides:
provideSecondPosin classCreator- Parameters:
loc- The second location of the cuboid.- Returns:
- True if setting the location was successful.
-
getValidOpenDirections
Description copied from class:CreatorGets the list of valid open directions for this type. It returns a subset ofStructureType.getValidMovementDirections()based on the current physical aspects of theStructure.- Overrides:
getValidOpenDirectionsin classCreator- Returns:
- The list of valid open directions for this type given its current physical dimensions.
-
giveTool
protected void giveTool()Description copied from class:CreatorMethod used to give the AnimatedArchitecture tool to the user.Overriding methods may call
ToolUser.giveTool(String, String, Text). -
completeSetOpenDirStep
Description copied from class:CreatorAttempts to complete the step that provides theCreator.movementDirection.If the open direction is not valid for this type, nothing changes.
- Overrides:
completeSetOpenDirStepin classCreator- Parameters:
direction- TheMovementDirectionthat was selected by the player.- Returns:
- True if the
Creator.movementDirectionwas set successfully.
-
updateRotationPoint
protected void updateRotationPoint()Calculates the position of the rotation point. This should be called at the end of the process, as not all variables may be set at an earlier stage. -
constructStructure
Description copied from class:CreatorConstructs the structure at the end of the creation process.- Overrides:
constructStructurein classCreator- Returns:
- The newly-created structure.
-
isNorthSouthAnimated
-
toString
-