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 Type
    Method
    Description
    asOptionalWithDefault(@NonNull net.minecraft.world.phys.Vec3 defaultValue)
    Sets the command argument to be optional, with the specified default value.
    @NonNull Vec3dArgument<C>
    Build a new Vec3dArgument.
    boolean
    Get whether integers will be centered to x.5.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • centerIntegers

      public @NonNull Vec3dArgument.Builder<C> centerIntegers(boolean 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

      public @NonNull Vec3dArgument<C> build()
      Build a new Vec3dArgument.
      Overrides:
      build in class cloud.commandframework.arguments.CommandArgument.Builder<C,Coordinates>
      Returns:
      Constructed argument
      Since:
      1.5.0