Class Vec3dArgument.Builder<C>
java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,T>
cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,Coordinates,Vec3dArgument.Builder<C>>
cloud.commandframework.fabric.argument.server.Vec3dArgument.Builder<C>
- Type Parameters:
C
- sender type
- Enclosing class:
- Vec3dArgument<C>
public static final class Vec3dArgument.Builder<C>
extends cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,Coordinates,Vec3dArgument.Builder<C>>
Builder for
Vec3dArgument
.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull Vec3dArgument.Builder<C>
asOptionalWithDefault
(@NonNull net.minecraft.world.phys.Vec3 defaultValue) Sets the command argument to be optional, with the specified default value.@NonNull Vec3dArgument<C>
build()
Build a newVec3dArgument
.boolean
Get whether integers will be centered to x.5.@NonNull Vec3dArgument.Builder<C>
centerIntegers
(boolean centerIntegers) Set whether integers will be centered to x.5.Methods inherited from class cloud.commandframework.arguments.CommandArgument.TypedBuilder
asOptional, asOptionalWithDefault, asRequired, manager, self, withParser, withSuggestionsProvider
Methods inherited from class cloud.commandframework.arguments.CommandArgument.Builder
getDefaultDescription, getDefaultValue, getName, getParser, getSuggestionsProvider, getValueType, isRequired, withDefaultDescription
-
Method Details
-
centerIntegers
Set whether integers will be centered to x.5. Will be false by default if unset.- Parameters:
centerIntegers
- whether integers will be centered- Returns:
- this builder
- Since:
- 1.5.0
-
centerIntegers
public boolean centerIntegers()Get whether integers will be centered to x.5. Defaults to false.- Returns:
- whether integers will be centered
- Since:
- 1.5.0
-
asOptionalWithDefault
public @NonNull Vec3dArgument.Builder<C> asOptionalWithDefault(@NonNull net.minecraft.world.phys.Vec3 defaultValue) Sets the command argument to be optional, with the specified default value.- Parameters:
defaultValue
- default value- Returns:
- this builder
- Since:
- 1.5.0
- See Also:
-
CommandArgument.Builder.asOptionalWithDefault(String)
-
build
Build a newVec3dArgument
.- Overrides:
build
in classcloud.commandframework.arguments.CommandArgument.Builder<C,
Coordinates> - Returns:
- Constructed argument
- Since:
- 1.5.0
-