Class BlockPosSetting

java.lang.Object
dev.myriadclient.api.setting.Setting<net.minecraft.core.BlockPos>
dev.myriadclient.api.setting.BlockPosSetting

public class BlockPosSetting extends Setting<net.minecraft.core.BlockPos>
A block position: an anchor, a schematic origin, a home. The editor also offers "set to where I'm standing". Typed as x y z (commas also work). Protected from shared configs unless the builder says protect(false).
  • Constructor Details

  • Method Details

    • validate

      protected net.minecraft.core.BlockPos validate(@Nullable net.minecraft.core.BlockPos v)
      Description copied from class: Setting
      Clamps or normalises a candidate value before it's set or laid over; null gives the default.
      Overrides:
      validate in class Setting<net.minecraft.core.BlockPos>
    • toJson

      public com.google.gson.JsonElement toJson()
      Description copied from class: Setting
      The player's value as JSON, for config and shares.
      Specified by:
      toJson in class Setting<net.minecraft.core.BlockPos>
    • fromJson

      public void fromJson(com.google.gson.JsonElement json)
      Description copied from class: Setting
      Load from JSON; invalid input must leave the value unchanged rather than throw.
      Specified by:
      fromJson in class Setting<net.minecraft.core.BlockPos>
    • parse

      public boolean parse(String input)
      "x y z" (commas also work).
      Specified by:
      parse in class Setting<net.minecraft.core.BlockPos>
    • valueString

      public String valueString()
      Description copied from class: Setting
      The value in effect for people, the way Setting.parse(String) reads it back where it can.
      Overrides:
      valueString in class Setting<net.minecraft.core.BlockPos>