Skip to content

Go: Client

Functions

RegisterKey

Go
func RegisterKey(name string, keyCodes []int32, allowRemap bool, fn func(pressed bool, impact int32)) (*KeyBinding, error)

RegisterKey binds keys on the client: fn runs with pressed true on press and false on release, and the current focus impact. Client hosts only; a server answers not provided.

  • Parameters:
    • name : string
    • keyCodes : []int32
    • allowRemap : bool
    • fn : func(pressed bool, impact int32)
  • Return type: (*KeyBinding, error)
  • Slots: client_register_key

ClientProperty

Go
func ClientProperty(prop int32) (float64, error)

ClientProperty reads one numeric client property by its PIER_CPROP_* key. The error covers a key this host does not know and a key about the local player read while the client is not in a world.

  • Parameters:
    • prop : int32
  • Return type: (float64, error)

ClientLocalPosition

Go
func ClientLocalPosition() ([3]float64, error)

ClientLocalPosition is the local player's feet position, x, y and z.

  • Return type: ([3]float64, error)

ClientLocalRotation

Go
func ClientLocalRotation() (pitch, yaw float64, err error)

ClientLocalRotation is the local player's pitch and yaw in degrees; a negative pitch looks up.

  • Return type: (pitch, yaw float64, err error)

ClientRegisteredKeys

Go
func ClientRegisteredKeys() ([]string, error)

ClientRegisteredKeys lists every key binding name the key registry holds, whichever mod registered it.

  • Return type: ([]string, error)

ClientHasKey

Go
func ClientHasKey(name string) (bool, error)

ClientHasKey reports whether a key binding of this name is registered.

  • Parameters:
    • name : string
  • Return type: (bool, error)

ClientOptions

Go
func ClientOptions() ([]KeyValue, error)

ClientOptions lists every client option as key and value, in the text form options.txt stores.

ClientOption

Go
func ClientOption(key string) (string, error)

ClientOption reads one client option by its options.txt key, such as "gfx_field_of_view".

  • Parameters:
    • key : string
  • Return type: (string, error)

SetClientOption

Go
func SetClientOption(key, value string) error

SetClientOption writes one client option from its options.txt text form. The engine keeps what it can parse and reports nothing, so a caller that needs to know reads the key back.

  • Parameters:
    • key : string
    • value : string
  • Return type: error

ClientIsInLevel

Go
func ClientIsInLevel() (bool, error)

ClientIsInLevel reports whether the client is inside a level, which means a world is loaded.

ClientLocalPlayerName

Go
func ClientLocalPlayerName() (string, error)

ClientLocalPlayerName is the name of the local player. The host has no answer outside a level.

ClientPosX

Go
func ClientPosX() (float64, error)

ClientPosX reads PIER_CPROP_POS_X: Actor::getFeetPos of the local player

ClientPosY

Go
func ClientPosY() (float64, error)

ClientPosY reads PIER_CPROP_POS_Y: feet height, the same point get_player_position reports

ClientPosZ

Go
func ClientPosZ() (float64, error)

ClientPosZ reads PIER_CPROP_POS_Z: PIER_CPROP_POS_Z

ClientPitch

Go
func ClientPitch() (float64, error)

ClientPitch reads PIER_CPROP_PITCH: Actor::getRotation, degrees; negative looks up

ClientYaw

Go
func ClientYaw() (float64, error)

ClientYaw reads PIER_CPROP_YAW: Actor::getRotation, degrees

ClientDimension

Go
func ClientDimension() (float64, error)

ClientDimension reads PIER_CPROP_DIMENSION: Actor::getDimensionId of the local player

ClientGuiScale

Go
func ClientGuiScale() (float64, error)

ClientGuiScale reads PIER_CPROP_GUI_SCALE: IClientInstance::getGuiScale

ClientServerPingMs

Go
func ClientServerPingMs() (float64, error)

ClientServerPingMs reads PIER_CPROP_SERVER_PING_MS: IClientInstance::getServerPingTime

ClientIsShowingMenu

Go
func ClientIsShowingMenu() (bool, error)

ClientIsShowingMenu reads PIER_CPROP_IS_SHOWING_MENU: IClientInstance::isShowingMenu, 1 or 0

ClientIsShowingPauseScreen

Go
func ClientIsShowingPauseScreen() (bool, error)

ClientIsShowingPauseScreen reads PIER_CPROP_IS_SHOWING_PAUSE_SCREEN: IClientInstance::isShowingPauseScreen

ClientIsPlaying

Go
func ClientIsPlaying() (bool, error)

ClientIsPlaying reads PIER_CPROP_IS_PLAYING: IClientInstance::isPlaying

ClientIsInRealm

Go
func ClientIsInRealm() (bool, error)

ClientIsInRealm reads PIER_CPROP_IS_IN_REALM: IClientInstance::isInRealm

ClientIsGameInputEnabled

Go
func ClientIsGameInputEnabled() (bool, error)

ClientIsGameInputEnabled reads PIER_CPROP_IS_GAME_INPUT_ENABLED: IClientInstance::isInGameInputEnabled

ClientHealth

Go
func ClientHealth() (float64, error)

ClientHealth reads PIER_CPROP_HEALTH: Actor::getHealth of the local player

ClientMaxHealth

Go
func ClientMaxHealth() (float64, error)

ClientMaxHealth reads PIER_CPROP_MAX_HEALTH: Actor::getMaxHealth of the local player

ClientIsOnGround

Go
func ClientIsOnGround() (bool, error)

ClientIsOnGround reads PIER_CPROP_IS_ON_GROUND: Actor::isOnGround of the local player

ClientIsInWater

Go
func ClientIsInWater() (bool, error)

ClientIsInWater reads PIER_CPROP_IS_IN_WATER: Actor::isInWater of the local player

ClientIsSneaking

Go
func ClientIsSneaking() (bool, error)

ClientIsSneaking reads PIER_CPROP_IS_SNEAKING: Actor::isSneaking of the local player

ClientIsSprinting

Go
func ClientIsSprinting() (bool, error)

ClientIsSprinting reads PIER_CPROP_IS_SPRINTING: Actor::isSprinting of the local player

ClientIsSwimming

Go
func ClientIsSwimming() (bool, error)

ClientIsSwimming reads PIER_CPROP_IS_SWIMMING: Actor::isSwimming of the local player

ClientIsOnFire

Go
func ClientIsOnFire() (bool, error)

ClientIsOnFire reads PIER_CPROP_IS_ON_FIRE: Actor::isOnFire of the local player

ClientIsFlying

Go
func ClientIsFlying() (bool, error)

ClientIsFlying reads PIER_CPROP_IS_FLYING: Player::isFlying of the local player

ClientGameType

Go
func ClientGameType() (float64, error)

ClientGameType reads PIER_CPROP_GAME_TYPE: Player::getPlayerGameType of the local player

ClientSelectedSlot

Go
func ClientSelectedSlot() (float64, error)

ClientSelectedSlot reads PIER_CPROP_SELECTED_SLOT: Player::getSelectedItemSlot of the local player

ClientVelX

Go
func ClientVelX() (float64, error)

ClientVelX reads PIER_CPROP_VEL_X: Actor::getPosDelta of the local player, blocks per tick

ClientVelY

Go
func ClientVelY() (float64, error)

ClientVelY reads PIER_CPROP_VEL_Y: Actor::getPosDelta, the vertical part

ClientVelZ

Go
func ClientVelZ() (float64, error)

ClientVelZ reads PIER_CPROP_VEL_Z: Actor::getPosDelta, the z part

ClientXpNeededNextLevel

Go
func ClientXpNeededNextLevel() (float64, error)

ClientXpNeededNextLevel reads PIER_CPROP_XP_NEEDED_NEXT_LEVEL: Player::getXpNeededForNextLevel of the local player

ClientIsLeavingGame

Go
func ClientIsLeavingGame() (bool, error)

ClientIsLeavingGame reads PIER_CPROP_IS_LEAVING_GAME: IClientInstance::isLeavingGame

ClientIsExitingLevel

Go
func ClientIsExitingLevel() (bool, error)

ClientIsExitingLevel reads PIER_CPROP_IS_EXITING_LEVEL: IClientInstance::isExitingLevel

ClientIsInBedScreen

Go
func ClientIsInBedScreen() (bool, error)

ClientIsInBedScreen reads PIER_CPROP_IS_IN_BED_SCREEN: IClientInstance::isInBedScreen

ClientIsInDeathScreen

Go
func ClientIsInDeathScreen() (bool, error)

ClientIsInDeathScreen reads PIER_CPROP_IS_IN_DEATH_SCREEN: IClientInstance::isInDeathScreen

ClientIsShowingLoadingScreen

Go
func ClientIsShowingLoadingScreen() (bool, error)

ClientIsShowingLoadingScreen reads PIER_CPROP_IS_SHOWING_LOADING_SCREEN: IClientInstance::isShowingLoadingScreen

ClientIsShowingProgressScreen

Go
func ClientIsShowingProgressScreen() (bool, error)

ClientIsShowingProgressScreen reads PIER_CPROP_IS_SHOWING_PROGRESS_SCREEN: IClientInstance::isShowingProgressScreen

ClientIsShowingWorldProgressScreen

Go
func ClientIsShowingWorldProgressScreen() (bool, error)

ClientIsShowingWorldProgressScreen reads PIER_CPROP_IS_SHOWING_WORLD_PROGRESS_SCREEN: IClientInstance::isShowingWorldProgressScreen

ClientIsShowingDeathScreen

Go
func ClientIsShowingDeathScreen() (bool, error)

ClientIsShowingDeathScreen reads PIER_CPROP_IS_SHOWING_DEATH_SCREEN: IClientInstance::isShowingDeathScreen

ClientIsShowingServerForm

Go
func ClientIsShowingServerForm() (bool, error)

ClientIsShowingServerForm reads PIER_CPROP_IS_SHOWING_SERVER_FORM: IClientInstance::isShowingServerForm

ClientIsInWorldWithoutMenu

Go
func ClientIsInWorldWithoutMenu() (bool, error)

ClientIsInWorldWithoutMenu reads PIER_CPROP_IS_IN_WORLD_WITHOUT_MENU: IClientInstance::isInWorldAndNotShowingAnyMenuScreens

ClientIsWorldActive

Go
func ClientIsWorldActive() (bool, error)

ClientIsWorldActive reads PIER_CPROP_IS_WORLD_ACTIVE: IClientInstance::isWorldActive

ClientHasLevel

Go
func ClientHasLevel() (bool, error)

ClientHasLevel reads PIER_CPROP_HAS_LEVEL: IClientInstance::hasLevel

ClientIsPreGame

Go
func ClientIsPreGame() (bool, error)

ClientIsPreGame reads PIER_CPROP_IS_PRE_GAME: IClientInstance::isPreGame

ClientIsInMultiplayerGame

Go
func ClientIsInMultiplayerGame() (bool, error)

ClientIsInMultiplayerGame reads PIER_CPROP_IS_IN_MULTIPLAYER_GAME: IClientInstance::isInMultiplayerGame

ClientIsMultiplayerClient

Go
func ClientIsMultiplayerClient() (bool, error)

ClientIsMultiplayerClient reads PIER_CPROP_IS_MULTIPLAYER_CLIENT: IClientInstance::isMultiPlayerClient

ClientIsPrimaryLevelMultiplayer

Go
func ClientIsPrimaryLevelMultiplayer() (bool, error)

ClientIsPrimaryLevelMultiplayer reads PIER_CPROP_IS_PRIMARY_LEVEL_MULTIPLAYER: IClientInstance::isPrimaryLevelMultiplayer

ClientIsPrimaryLevelCrossPlatform

Go
func ClientIsPrimaryLevelCrossPlatform() (bool, error)

ClientIsPrimaryLevelCrossPlatform reads PIER_CPROP_IS_PRIMARY_LEVEL_CROSS_PLATFORM: IClientInstance::isPrimaryLevelCrossPlatformMultiplayer

ClientIsKeyboardEnabled

Go
func ClientIsKeyboardEnabled() (bool, error)

ClientIsKeyboardEnabled reads PIER_CPROP_IS_KEYBOARD_ENABLED: IClientInstance::isKeyboardEnabled

ClientIsUsingController

Go
func ClientIsUsingController() (bool, error)

ClientIsUsingController reads PIER_CPROP_IS_USING_CONTROLLER: IClientInstance::useController

ClientIsUsingTouchscreen

Go
func ClientIsUsingTouchscreen() (bool, error)

ClientIsUsingTouchscreen reads PIER_CPROP_IS_USING_TOUCHSCREEN: IClientInstance::useTouchscreen

ClientIsMouseGrabbed

Go
func ClientIsMouseGrabbed() (bool, error)

ClientIsMouseGrabbed reads PIER_CPROP_IS_MOUSE_GRABBED: IClientInstance::getMouseGrabbed

ClientIsMouseAndKeyboard

Go
func ClientIsMouseAndKeyboard() (bool, error)

ClientIsMouseAndKeyboard reads PIER_CPROP_IS_MOUSE_AND_KEYBOARD: IClientInstance::currentInputModeIsMouseAndKeyboard

ClientHasConnectedController

Go
func ClientHasConnectedController() (bool, error)

ClientHasConnectedController reads PIER_CPROP_HAS_CONNECTED_CONTROLLER: IClientInstance::hasConnectedController

ClientControllerId

Go
func ClientControllerId() (float64, error)

ClientControllerId reads PIER_CPROP_CONTROLLER_ID: IClientInstance::getControllerId

ClientIsTouchGameplayAllowed

Go
func ClientIsTouchGameplayAllowed() (bool, error)

ClientIsTouchGameplayAllowed reads PIER_CPROP_IS_TOUCH_GAMEPLAY_ALLOWED: IClientInstance::isTouchGameplayAllowed

ClientIsSplitScreenActive

Go
func ClientIsSplitScreenActive() (bool, error)

ClientIsSplitScreenActive reads PIER_CPROP_IS_SPLIT_SCREEN_ACTIVE: IClientInstance::isSplitScreenActive

ClientSplitScreenCount

Go
func ClientSplitScreenCount() (float64, error)

ClientSplitScreenCount reads PIER_CPROP_SPLIT_SCREEN_COUNT: IClientInstance::getSplitScreenCount

ClientGuiScaleOffset

Go
func ClientGuiScaleOffset() (float64, error)

ClientGuiScaleOffset reads PIER_CPROP_GUI_SCALE_OFFSET: IClientInstance::getGuiScaleOffset

ClientIsEduMode

Go
func ClientIsEduMode() (bool, error)

ClientIsEduMode reads PIER_CPROP_IS_EDU_MODE: IClientInstance::isEduMode

ClientIsInEditor

Go
func ClientIsInEditor() (bool, error)

ClientIsInEditor reads PIER_CPROP_IS_IN_EDITOR: IClientInstance::isPlayerInEditor

ClientIsReadyToRender

Go
func ClientIsReadyToRender() (bool, error)

ClientIsReadyToRender reads PIER_CPROP_IS_READY_TO_RENDER: IClientInstance::isReadyToRender

ClientIsFullVanillaPackOnStack

Go
func ClientIsFullVanillaPackOnStack() (bool, error)

ClientIsFullVanillaPackOnStack reads PIER_CPROP_IS_FULL_VANILLA_PACK_ON_STACK: IClientInstance::isFullVanillaPackOnStack

ClientServerConnectionTime

Go
func ClientServerConnectionTime() (float64, error)

ClientServerConnectionTime reads PIER_CPROP_SERVER_CONNECTION_TIME: IClientInstance::getServerConnectionTime

ClientRemoteServerTimeMs

Go
func ClientRemoteServerTimeMs() (float64, error)

ClientRemoteServerTimeMs reads PIER_CPROP_REMOTE_SERVER_TIME_MS: IClientInstance::getRemoteServerTimeMs

ClientRemoteServerNetworkTimeMs

Go
func ClientRemoteServerNetworkTimeMs() (float64, error)

ClientRemoteServerNetworkTimeMs reads PIER_CPROP_REMOTE_SERVER_NETWORK_TIME_MS: IClientInstance::getRemoteServerNetworkTimeMs

ClientFrameAlpha

Go
func ClientFrameAlpha() (float64, error)

ClientFrameAlpha reads PIER_CPROP_FRAME_ALPHA: IClientInstance::getFrameAlpha, how far the frame is between two ticks

ClientGameUpdateSeconds

Go
func ClientGameUpdateSeconds() (float64, error)

ClientGameUpdateSeconds reads PIER_CPROP_GAME_UPDATE_SECONDS: IClientInstance::getGameUpdateDurationInSeconds

ClientIsPrimaryClient

Go
func ClientIsPrimaryClient() (bool, error)

ClientIsPrimaryClient reads PIER_CPROP_IS_PRIMARY_CLIENT: IClientInstance::isPrimaryClient

ClientUserId

Go
func ClientUserId() (float64, error)

ClientUserId reads PIER_CPROP_USER_ID: IClientInstance::getUserId

ClientIsGameplayTipsEnabled

Go
func ClientIsGameplayTipsEnabled() (bool, error)

ClientIsGameplayTipsEnabled reads PIER_CPROP_IS_GAMEPLAY_TIPS_ENABLED: IClientInstance::isGamePlayTipsEnabled

ClientHasCommands

Go
func ClientHasCommands() (bool, error)

ClientHasCommands reads PIER_CPROP_HAS_COMMANDS: IClientInstance::hasCommands

ClientScreenName

Go
func ClientScreenName() (string, error)

ClientScreenName reads PIER_CSTR_SCREEN_NAME: IClientInstance::getScreenName, as client_get_screen_name

ClientTopScreenName

Go
func ClientTopScreenName() (string, error)

ClientTopScreenName reads PIER_CSTR_TOP_SCREEN_NAME: IClientInstance::getTopScreenName

ClientPlatformId

Go
func ClientPlatformId() (string, error)

ClientPlatformId reads PIER_CSTR_PLATFORM_ID: IClientInstance::getPlatformId

ClientPlatformOnlineId

Go
func ClientPlatformOnlineId() (string, error)

ClientPlatformOnlineId reads PIER_CSTR_PLATFORM_ONLINE_ID: IClientInstance::getPlatformOnlineId

ClientLocalXuid

Go
func ClientLocalXuid() (string, error)

ClientLocalXuid reads PIER_CSTR_LOCAL_XUID: Player::getXuid of the local player; fails outside a world

ClientLocalUuid

Go
func ClientLocalUuid() (string, error)

ClientLocalUuid reads PIER_CSTR_LOCAL_UUID: Player::getUuid of the local player in its canonical form

ClientLocalNameTag

Go
func ClientLocalNameTag() (string, error)

ClientLocalNameTag reads PIER_CSTR_LOCAL_NAME_TAG: Actor::getNameTag of the local player

ClientClipboard

Go
func ClientClipboard() (string, error)

ClientClipboard reads PIER_CSTR_CLIPBOARD: AppPlatform::getClipboardText, the system clipboard

ClientShowMessage

Go
func ClientShowMessage(sarg string, a, b, c float64) error

ClientShowMessage runs PIER_CACT_SHOW_MESSAGE: sarg: text. GuiData::displayClientMessage

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetTitle

Go
func ClientSetTitle(sarg string, a, b, c float64) error

ClientSetTitle runs PIER_CACT_SET_TITLE: sarg: text. GuiData::setTitle is not exported by the client target.

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetSubtitle

Go
func ClientSetSubtitle(sarg string, a, b, c float64) error

ClientSetSubtitle runs PIER_CACT_SET_SUBTITLE: sarg: text. GuiData::setSubtitle is not exported by the client target.

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetActionBar

Go
func ClientSetActionBar(sarg string, a, b, c float64) error

ClientSetActionBar runs PIER_CACT_SET_ACTION_BAR: sarg: text. GuiData::setActionBarMessage

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientShowTip

Go
func ClientShowTip(sarg string, a, b, c float64) error

ClientShowTip runs PIER_CACT_SHOW_TIP: sarg: text. GuiData::showTipMessage is not exported by the client target.

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientPlayUiSound

Go
func ClientPlayUiSound(sarg string, a, b, c float64) error

ClientPlayUiSound runs PIER_CACT_PLAY_UI_SOUND: sarg: sound name, a: volume, b: pitch. IClientInstance::playUI

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientGrabMouse

Go
func ClientGrabMouse(sarg string, a, b, c float64) error

ClientGrabMouse runs PIER_CACT_GRAB_MOUSE: IClientInstance::grabMouse

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientReleaseMouse

Go
func ClientReleaseMouse(sarg string, a, b, c float64) error

ClientReleaseMouse runs PIER_CACT_RELEASE_MOUSE: IClientInstance::releaseMouse

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetInputDisabled

Go
func ClientSetInputDisabled(sarg string, a, b, c float64) error

ClientSetInputDisabled runs PIER_CACT_SET_INPUT_DISABLED: a: non-zero disables game input. IClientInstance::setDisableInput

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientLeaveLevel

Go
func ClientLeaveLevel(sarg string, a, b, c float64) error

ClientLeaveLevel runs PIER_CACT_LEAVE_LEVEL: IClientInstance::requestLeaveGame(true, false): leaves the world for the menus, asynchronously

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientShowPopup

Go
func ClientShowPopup(sarg string, a, b, c float64) error

ClientShowPopup runs PIER_CACT_SHOW_POPUP: sarg: message, optionally followed by subtitle after a newline. GuiData::showPopupNotice is not exported by the client target.

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientShowDevConsoleMessage

Go
func ClientShowDevConsoleMessage(sarg string, a, b, c float64) error

ClientShowDevConsoleMessage runs PIER_CACT_SHOW_DEV_CONSOLE_MESSAGE: sarg: text. GuiData::displayDevConsoleMessage is not exported by the client target.

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetSuspendInput

Go
func ClientSetSuspendInput(sarg string, a, b, c float64) error

ClientSetSuspendInput runs PIER_CACT_SET_SUSPEND_INPUT: a: non-zero suspends input. IClientInstance::setSuspendInput

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetSuspendDirectionalInput

Go
func ClientSetSuspendDirectionalInput(sarg string, a, b, c float64) error

ClientSetSuspendDirectionalInput runs PIER_CACT_SET_SUSPEND_DIRECTIONAL_INPUT: a: non-zero suspends movement input. IClientInstance::setSuspendDirectionalInput

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetGameInputEnabled

Go
func ClientSetGameInputEnabled(sarg string, a, b, c float64) error

ClientSetGameInputEnabled runs PIER_CACT_SET_GAME_INPUT_ENABLED: a: non-zero enables. IClientInstance::setInGameInputEnabled

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientRefocusMouse

Go
func ClientRefocusMouse(sarg string, a, b, c float64) error

ClientRefocusMouse runs PIER_CACT_REFOCUS_MOUSE: a: non-zero when the mouse was lost. IClientInstance::refocusMouse

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientMuteAudio

Go
func ClientMuteAudio(sarg string, a, b, c float64) error

ClientMuteAudio runs PIER_CACT_MUTE_AUDIO: IClientInstance::muteAudio

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientUnmuteAudio

Go
func ClientUnmuteAudio(sarg string, a, b, c float64) error

ClientUnmuteAudio runs PIER_CACT_UNMUTE_AUDIO: IClientInstance::unMuteAudio

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientFadeOutMusic

Go
func ClientFadeOutMusic(sarg string, a, b, c float64) error

ClientFadeOutMusic runs PIER_CACT_FADE_OUT_MUSIC: IClientInstance::fadeOutMusic

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetGuiScaleOffset

Go
func ClientSetGuiScaleOffset(sarg string, a, b, c float64) error

ClientSetGuiScaleOffset runs PIER_CACT_SET_GUI_SCALE_OFFSET: a: the offset. IClientInstance::setGuiScaleOffset

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientResetPlayerMovement

Go
func ClientResetPlayerMovement(sarg string, a, b, c float64) error

ClientResetPlayerMovement runs PIER_CACT_RESET_PLAYER_MOVEMENT: IClientInstance::resetPlayerMovement

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientPushLeaveGameScreen

Go
func ClientPushLeaveGameScreen(sarg string, a, b, c float64) error

ClientPushLeaveGameScreen runs PIER_CACT_PUSH_LEAVE_GAME_SCREEN: IClientInstance::tryPushLeaveGameScreen

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientOpenContentLogHistory

Go
func ClientOpenContentLogHistory(sarg string, a, b, c float64) error

ClientOpenContentLogHistory runs PIER_CACT_OPEN_CONTENT_LOG_HISTORY: IClientInstance::openContentLogHistory

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientSetClipboard

Go
func ClientSetClipboard(sarg string, a, b, c float64) error

ClientSetClipboard runs PIER_CACT_SET_CLIPBOARD: sarg: text, empty allowed. AppPlatform::setClipboard

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

ClientNavigateHowToPlay

Go
func ClientNavigateHowToPlay(sarg string, a, b, c float64) error

ClientNavigateHowToPlay runs PIER_CACT_NAVIGATE_HOW_TO_PLAY: sarg: the topic, empty allowed. IClientInstance::navigateToHowToPlayScreen

abi.h names each argument; an unused one is ignored.

  • Parameters:
    • sarg : string
    • a : float64
    • b : float64
    • c : float64
  • Return type: error
  • Slots: client_action

KeyBinding

Go
1
2
3
type KeyBinding struct {
    // unexported fields
}

KeyBinding is a registered client key binding.

KeyBinding.Unregister

Go
func (k *KeyBinding) Unregister() error

Unregister stops the binding's callbacks.

KeyBinding.KeyCodes

Go
func (k *KeyBinding) KeyCodes() ([]int32, error)

KeyCodes lists the key codes now assigned to the binding, which differ from the defaults when the player remapped the key.

KeyHandle

Go
type KeyHandle struct{ p unsafe.Pointer }
type KeyHandle struct{ p unsafe.Pointer }

KeyHandle is a registered client key binding.

KeyHandle.IsZero

Go
func (h KeyHandle) IsZero() bool

IsZero reports whether the handle names nothing.

  • Return type: bool

CProp*

Name Value Description
CPropPosX 0 CPropPosX is PIER_CPROP_POS_X: Actor::getFeetPos of the local player
CPropPosY 1 CPropPosY is PIER_CPROP_POS_Y: feet height, the same point get_player_position reports
CPropPosZ 2 CPropPosZ is PIER_CPROP_POS_Z: PIER_CPROP_POS_Z
CPropPitch 3 CPropPitch is PIER_CPROP_PITCH: Actor::getRotation, degrees; negative looks up
CPropYaw 4 CPropYaw is PIER_CPROP_YAW: Actor::getRotation, degrees
CPropDimension 5 CPropDimension is PIER_CPROP_DIMENSION: Actor::getDimensionId of the local player
CPropGuiScale 6 CPropGuiScale is PIER_CPROP_GUI_SCALE: IClientInstance::getGuiScale
CPropServerPingMs 7 CPropServerPingMs is PIER_CPROP_SERVER_PING_MS: IClientInstance::getServerPingTime
CPropIsShowingMenu 8 CPropIsShowingMenu is PIER_CPROP_IS_SHOWING_MENU: IClientInstance::isShowingMenu, 1 or 0
CPropIsShowingPauseScreen 9 CPropIsShowingPauseScreen is PIER_CPROP_IS_SHOWING_PAUSE_SCREEN: IClientInstance::isShowingPauseScreen
CPropIsPlaying 10 CPropIsPlaying is PIER_CPROP_IS_PLAYING: IClientInstance::isPlaying
CPropIsInRealm 11 CPropIsInRealm is PIER_CPROP_IS_IN_REALM: IClientInstance::isInRealm
CPropIsGameInputEnabled 12 CPropIsGameInputEnabled is PIER_CPROP_IS_GAME_INPUT_ENABLED: IClientInstance::isInGameInputEnabled
CPropHealth 13 CPropHealth is PIER_CPROP_HEALTH: Actor::getHealth of the local player
CPropMaxHealth 14 CPropMaxHealth is PIER_CPROP_MAX_HEALTH: Actor::getMaxHealth of the local player
CPropIsOnGround 15 CPropIsOnGround is PIER_CPROP_IS_ON_GROUND: Actor::isOnGround of the local player
CPropIsInWater 16 CPropIsInWater is PIER_CPROP_IS_IN_WATER: Actor::isInWater of the local player
CPropIsSneaking 17 CPropIsSneaking is PIER_CPROP_IS_SNEAKING: Actor::isSneaking of the local player
CPropIsSprinting 18 CPropIsSprinting is PIER_CPROP_IS_SPRINTING: Actor::isSprinting of the local player
CPropIsSwimming 19 CPropIsSwimming is PIER_CPROP_IS_SWIMMING: Actor::isSwimming of the local player
CPropIsOnFire 20 CPropIsOnFire is PIER_CPROP_IS_ON_FIRE: Actor::isOnFire of the local player
CPropIsFlying 21 CPropIsFlying is PIER_CPROP_IS_FLYING: Player::isFlying of the local player
CPropGameType 22 CPropGameType is PIER_CPROP_GAME_TYPE: Player::getPlayerGameType of the local player
CPropSelectedSlot 23 CPropSelectedSlot is PIER_CPROP_SELECTED_SLOT: Player::getSelectedItemSlot of the local player
CPropVelX 24 CPropVelX is PIER_CPROP_VEL_X: Actor::getPosDelta of the local player, blocks per tick
CPropVelY 25 CPropVelY is PIER_CPROP_VEL_Y: Actor::getPosDelta, the vertical part
CPropVelZ 26 CPropVelZ is PIER_CPROP_VEL_Z: Actor::getPosDelta, the z part
CPropXpNeededNextLevel 27 CPropXpNeededNextLevel is PIER_CPROP_XP_NEEDED_NEXT_LEVEL: Player::getXpNeededForNextLevel of the local player
CPropIsLeavingGame 28 CPropIsLeavingGame is PIER_CPROP_IS_LEAVING_GAME: IClientInstance::isLeavingGame
CPropIsExitingLevel 29 CPropIsExitingLevel is PIER_CPROP_IS_EXITING_LEVEL: IClientInstance::isExitingLevel
CPropIsInBedScreen 30 CPropIsInBedScreen is PIER_CPROP_IS_IN_BED_SCREEN: IClientInstance::isInBedScreen
CPropIsInDeathScreen 31 CPropIsInDeathScreen is PIER_CPROP_IS_IN_DEATH_SCREEN: IClientInstance::isInDeathScreen
CPropIsShowingLoadingScreen 32 CPropIsShowingLoadingScreen is PIER_CPROP_IS_SHOWING_LOADING_SCREEN: IClientInstance::isShowingLoadingScreen
CPropIsShowingProgressScreen 33 CPropIsShowingProgressScreen is PIER_CPROP_IS_SHOWING_PROGRESS_SCREEN: IClientInstance::isShowingProgressScreen
CPropIsShowingWorldProgressScreen 34 CPropIsShowingWorldProgressScreen is PIER_CPROP_IS_SHOWING_WORLD_PROGRESS_SCREEN: IClientInstance::isShowingWorldProgressScreen
CPropIsShowingDeathScreen 35 CPropIsShowingDeathScreen is PIER_CPROP_IS_SHOWING_DEATH_SCREEN: IClientInstance::isShowingDeathScreen
CPropIsShowingServerForm 36 CPropIsShowingServerForm is PIER_CPROP_IS_SHOWING_SERVER_FORM: IClientInstance::isShowingServerForm
CPropIsInWorldWithoutMenu 37 CPropIsInWorldWithoutMenu is PIER_CPROP_IS_IN_WORLD_WITHOUT_MENU: IClientInstance::isInWorldAndNotShowingAnyMenuScreens
CPropIsWorldActive 38 CPropIsWorldActive is PIER_CPROP_IS_WORLD_ACTIVE: IClientInstance::isWorldActive
CPropHasLevel 39 CPropHasLevel is PIER_CPROP_HAS_LEVEL: IClientInstance::hasLevel
CPropIsPreGame 40 CPropIsPreGame is PIER_CPROP_IS_PRE_GAME: IClientInstance::isPreGame
CPropIsInMultiplayerGame 41 CPropIsInMultiplayerGame is PIER_CPROP_IS_IN_MULTIPLAYER_GAME: IClientInstance::isInMultiplayerGame
CPropIsMultiplayerClient 42 CPropIsMultiplayerClient is PIER_CPROP_IS_MULTIPLAYER_CLIENT: IClientInstance::isMultiPlayerClient
CPropIsPrimaryLevelMultiplayer 43 CPropIsPrimaryLevelMultiplayer is PIER_CPROP_IS_PRIMARY_LEVEL_MULTIPLAYER: IClientInstance::isPrimaryLevelMultiplayer
CPropIsPrimaryLevelCrossPlatform 44 CPropIsPrimaryLevelCrossPlatform is PIER_CPROP_IS_PRIMARY_LEVEL_CROSS_PLATFORM: IClientInstance::isPrimaryLevelCrossPlatformMultiplayer
CPropIsKeyboardEnabled 45 CPropIsKeyboardEnabled is PIER_CPROP_IS_KEYBOARD_ENABLED: IClientInstance::isKeyboardEnabled
CPropIsUsingController 46 CPropIsUsingController is PIER_CPROP_IS_USING_CONTROLLER: IClientInstance::useController
CPropIsUsingTouchscreen 47 CPropIsUsingTouchscreen is PIER_CPROP_IS_USING_TOUCHSCREEN: IClientInstance::useTouchscreen
CPropIsMouseGrabbed 48 CPropIsMouseGrabbed is PIER_CPROP_IS_MOUSE_GRABBED: IClientInstance::getMouseGrabbed
CPropIsMouseAndKeyboard 49 CPropIsMouseAndKeyboard is PIER_CPROP_IS_MOUSE_AND_KEYBOARD: IClientInstance::currentInputModeIsMouseAndKeyboard
CPropHasConnectedController 50 CPropHasConnectedController is PIER_CPROP_HAS_CONNECTED_CONTROLLER: IClientInstance::hasConnectedController
CPropControllerId 51 CPropControllerId is PIER_CPROP_CONTROLLER_ID: IClientInstance::getControllerId
CPropIsTouchGameplayAllowed 52 CPropIsTouchGameplayAllowed is PIER_CPROP_IS_TOUCH_GAMEPLAY_ALLOWED: IClientInstance::isTouchGameplayAllowed
CPropIsSplitScreenActive 53 CPropIsSplitScreenActive is PIER_CPROP_IS_SPLIT_SCREEN_ACTIVE: IClientInstance::isSplitScreenActive
CPropSplitScreenCount 54 CPropSplitScreenCount is PIER_CPROP_SPLIT_SCREEN_COUNT: IClientInstance::getSplitScreenCount
CPropGuiScaleOffset 55 CPropGuiScaleOffset is PIER_CPROP_GUI_SCALE_OFFSET: IClientInstance::getGuiScaleOffset
CPropIsEduMode 56 CPropIsEduMode is PIER_CPROP_IS_EDU_MODE: IClientInstance::isEduMode
CPropIsInEditor 57 CPropIsInEditor is PIER_CPROP_IS_IN_EDITOR: IClientInstance::isPlayerInEditor
CPropIsReadyToRender 58 CPropIsReadyToRender is PIER_CPROP_IS_READY_TO_RENDER: IClientInstance::isReadyToRender
CPropIsFullVanillaPackOnStack 59 CPropIsFullVanillaPackOnStack is PIER_CPROP_IS_FULL_VANILLA_PACK_ON_STACK: IClientInstance::isFullVanillaPackOnStack
CPropServerConnectionTime 60 CPropServerConnectionTime is PIER_CPROP_SERVER_CONNECTION_TIME: IClientInstance::getServerConnectionTime
CPropRemoteServerTimeMs 61 CPropRemoteServerTimeMs is PIER_CPROP_REMOTE_SERVER_TIME_MS: IClientInstance::getRemoteServerTimeMs
CPropRemoteServerNetworkTimeMs 62 CPropRemoteServerNetworkTimeMs is PIER_CPROP_REMOTE_SERVER_NETWORK_TIME_MS: IClientInstance::getRemoteServerNetworkTimeMs
CPropFrameAlpha 63 CPropFrameAlpha is PIER_CPROP_FRAME_ALPHA: IClientInstance::getFrameAlpha, how far the frame is between two ticks
CPropGameUpdateSeconds 64 CPropGameUpdateSeconds is PIER_CPROP_GAME_UPDATE_SECONDS: IClientInstance::getGameUpdateDurationInSeconds
CPropIsPrimaryClient 65 CPropIsPrimaryClient is PIER_CPROP_IS_PRIMARY_CLIENT: IClientInstance::isPrimaryClient
CPropUserId 66 CPropUserId is PIER_CPROP_USER_ID: IClientInstance::getUserId
CPropIsGameplayTipsEnabled 67 CPropIsGameplayTipsEnabled is PIER_CPROP_IS_GAMEPLAY_TIPS_ENABLED: IClientInstance::isGamePlayTipsEnabled
CPropHasCommands 68 CPropHasCommands is PIER_CPROP_HAS_COMMANDS: IClientInstance::hasCommands

CStr*

Name Value Description
CStrScreenName 0 CStrScreenName is PIER_CSTR_SCREEN_NAME: IClientInstance::getScreenName, as client_get_screen_name
CStrTopScreenName 1 CStrTopScreenName is PIER_CSTR_TOP_SCREEN_NAME: IClientInstance::getTopScreenName
CStrPlatformId 2 CStrPlatformId is PIER_CSTR_PLATFORM_ID: IClientInstance::getPlatformId
CStrPlatformOnlineId 3 CStrPlatformOnlineId is PIER_CSTR_PLATFORM_ONLINE_ID: IClientInstance::getPlatformOnlineId
CStrLocalXuid 4 CStrLocalXuid is PIER_CSTR_LOCAL_XUID: Player::getXuid of the local player; fails outside a world
CStrLocalUuid 5 CStrLocalUuid is PIER_CSTR_LOCAL_UUID: Player::getUuid of the local player in its canonical form
CStrLocalNameTag 6 CStrLocalNameTag is PIER_CSTR_LOCAL_NAME_TAG: Actor::getNameTag of the local player
CStrClipboard 7 CStrClipboard is PIER_CSTR_CLIPBOARD: AppPlatform::getClipboardText, the system clipboard

CAct*

Name Value Description
CActShowMessage 0 CActShowMessage is PIER_CACT_SHOW_MESSAGE: sarg: text. GuiData::displayClientMessage
CActSetTitle 1 CActSetTitle is PIER_CACT_SET_TITLE: sarg: text. GuiData::setTitle is not exported by the client target.
CActSetSubtitle 2 CActSetSubtitle is PIER_CACT_SET_SUBTITLE: sarg: text. GuiData::setSubtitle is not exported by the client target.
CActSetActionBar 3 CActSetActionBar is PIER_CACT_SET_ACTION_BAR: sarg: text. GuiData::setActionBarMessage
CActShowTip 4 CActShowTip is PIER_CACT_SHOW_TIP: sarg: text. GuiData::showTipMessage is not exported by the client target.
CActPlayUiSound 5 CActPlayUiSound is PIER_CACT_PLAY_UI_SOUND: sarg: sound name, a: volume, b: pitch. IClientInstance::playUI
CActGrabMouse 6 CActGrabMouse is PIER_CACT_GRAB_MOUSE: IClientInstance::grabMouse
CActReleaseMouse 7 CActReleaseMouse is PIER_CACT_RELEASE_MOUSE: IClientInstance::releaseMouse
CActSetInputDisabled 8 CActSetInputDisabled is PIER_CACT_SET_INPUT_DISABLED: a: non-zero disables game input. IClientInstance::setDisableInput
CActLeaveLevel 9 CActLeaveLevel is PIER_CACT_LEAVE_LEVEL: IClientInstance::requestLeaveGame(true, false): leaves the world for the menus, asynchronously
CActShowPopup 10 CActShowPopup is PIER_CACT_SHOW_POPUP: sarg: message, optionally followed by subtitle after a newline. GuiData::showPopupNotice is not exported by the client target.
CActShowDevConsoleMessage 11 CActShowDevConsoleMessage is PIER_CACT_SHOW_DEV_CONSOLE_MESSAGE: sarg: text. GuiData::displayDevConsoleMessage is not exported by the client target.
CActSetSuspendInput 12 CActSetSuspendInput is PIER_CACT_SET_SUSPEND_INPUT: a: non-zero suspends input. IClientInstance::setSuspendInput
CActSetSuspendDirectionalInput 13 CActSetSuspendDirectionalInput is PIER_CACT_SET_SUSPEND_DIRECTIONAL_INPUT: a: non-zero suspends movement input. IClientInstance::setSuspendDirectionalInput
CActSetGameInputEnabled 14 CActSetGameInputEnabled is PIER_CACT_SET_GAME_INPUT_ENABLED: a: non-zero enables. IClientInstance::setInGameInputEnabled
CActRefocusMouse 15 CActRefocusMouse is PIER_CACT_REFOCUS_MOUSE: a: non-zero when the mouse was lost. IClientInstance::refocusMouse
CActMuteAudio 16 CActMuteAudio is PIER_CACT_MUTE_AUDIO: IClientInstance::muteAudio
CActUnmuteAudio 17 CActUnmuteAudio is PIER_CACT_UNMUTE_AUDIO: IClientInstance::unMuteAudio
CActFadeOutMusic 18 CActFadeOutMusic is PIER_CACT_FADE_OUT_MUSIC: IClientInstance::fadeOutMusic
CActSetGuiScaleOffset 19 CActSetGuiScaleOffset is PIER_CACT_SET_GUI_SCALE_OFFSET: a: the offset. IClientInstance::setGuiScaleOffset
CActResetPlayerMovement 20 CActResetPlayerMovement is PIER_CACT_RESET_PLAYER_MOVEMENT: IClientInstance::resetPlayerMovement
CActPushLeaveGameScreen 21 CActPushLeaveGameScreen is PIER_CACT_PUSH_LEAVE_GAME_SCREEN: IClientInstance::tryPushLeaveGameScreen
CActOpenContentLogHistory 22 CActOpenContentLogHistory is PIER_CACT_OPEN_CONTENT_LOG_HISTORY: IClientInstance::openContentLogHistory
CActSetClipboard 23 CActSetClipboard is PIER_CACT_SET_CLIPBOARD: sarg: text, empty allowed. AppPlatform::setClipboard
CActNavigateHowToPlay 24 CActNavigateHowToPlay is PIER_CACT_NAVIGATE_HOW_TO_PLAY: sarg: the topic, empty allowed. IClientInstance::navigateToHowToPlayScreen