Class BlockPosSetting
java.lang.Object
dev.myriadclient.api.setting.Setting<net.minecraft.core.BlockPos>
dev.myriadclient.api.setting.BlockPosSetting
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).-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Setting
Setting.Layer -
Field Summary
Fields inherited from class Setting
defaultValue, description, id, name, value -
Constructor Summary
ConstructorsConstructorDescriptionBlockPosSetting(String name, @Nullable String description, net.minecraft.core.BlockPos defaultValue, @Nullable Supplier<Boolean> visible) A setting as itsBlockPosSetting.Buildermakes it; get one fromSettingGroup.blockPos(String), or call this from a subclass. -
Method Summary
Modifier and TypeMethodDescriptionvoidfromJson(com.google.gson.JsonElement json) Load from JSON; invalid input must leave the value unchanged rather than throw.boolean"x y z" (commas also work).com.google.gson.JsonElementtoJson()The player's value as JSON, for config and shares.protected net.minecraft.core.BlockPosvalidate(@Nullable net.minecraft.core.BlockPos v) Clamps or normalises a candidate value before it's set or laid over; null gives the default.The value in effect for people, the waySetting.parse(String)reads it back where it can.Methods inherited from class Setting
changed, copy, decode, decode, defaultValue, description, edit, editsTakeEffect, encode, get, group, id, isDefault, isOverridden, isProtected, isSerializable, isVisible, name, onChanged, overriddenBy, override, override, playerValue, release, reset, set, setGlobalChangeHook, suggestions
-
Constructor Details
-
BlockPosSetting
public BlockPosSetting(String name, @Nullable String description, net.minecraft.core.BlockPos defaultValue, @Nullable Supplier<Boolean> visible) A setting as itsBlockPosSetting.Buildermakes it; get one fromSettingGroup.blockPos(String), or call this from a subclass.
-
-
Method Details
-
validate
-
toJson
-
fromJson
-
parse
-
valueString
Description copied from class:SettingThe value in effect for people, the waySetting.parse(String)reads it back where it can.- Overrides:
valueStringin classSetting<net.minecraft.core.BlockPos>
-