bloxd.io.d.ts 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-type-def/clientOption/clientOptions/canChange.d.ts +75 -75
- package/dist/api-type-def/clientOption/clientOptions/crouchingSpeed.d.ts +46 -46
- package/dist/api-type-def/clientOption/clientOptions/index.d.ts +34 -34
- package/dist/api-type-def/clientOption/clientOptions/runningSpeed.d.ts +51 -51
- package/dist/api-type-def/clientOption/clientOptions/speedMultiplier.d.ts +53 -53
- package/dist/api-type-def/clientOption/clientOptions/walkingSpeed.d.ts +51 -51
- package/dist/api-type-def/clientOption/index.d.ts +12 -16
- package/dist/api-type-def/entitySetting/entitySettings/example.d.ts +63 -63
- package/dist/api-type-def/entitySetting/entitySettings/index.d.ts +32 -32
- package/dist/api-type-def/entitySetting/entitySettings/opacity.d.ts +69 -69
- package/dist/api-type-def/entitySetting/entitySettings/overlayColour.d.ts +65 -65
- package/dist/api-type-def/entitySetting/entitySettings/zIndex.d.ts +64 -64
- package/dist/api-type-def/entitySetting/index.d.ts +54 -61
- package/dist/api-type-def/index.d.ts +86 -10
- package/dist/api-type-def/mobSetting/index.d.ts +44 -35
- package/dist/api-type-def/mobSetting/mobSettings/index.d.ts +6 -6
- package/dist/api-type-def/mobSetting/mobSettings/variation.d.ts +118 -118
- package/dist/api-type-def/normal/block/attemptWorldChangeBlock.d.ts +3 -0
- package/dist/api-type-def/normal/block/blockCoordToChunkId.d.ts +3 -0
- package/dist/api-type-def/normal/block/blockIdToBlockName.d.ts +9 -0
- package/dist/api-type-def/normal/block/blockNameToBlockId.d.ts +17 -0
- package/dist/api-type-def/normal/block/chunkIdToBotLeftCoord.d.ts +3 -0
- package/dist/api-type-def/normal/block/getBlock.d.ts +17 -0
- package/dist/api-type-def/normal/block/getBlockId.d.ts +12 -0
- package/dist/api-type-def/normal/block/getBlockSolidity.d.ts +19 -0
- package/dist/api-type-def/normal/block/getChunk.d.ts +15 -0
- package/dist/api-type-def/normal/block/getEmptyChunk.d.ts +12 -0
- package/dist/api-type-def/normal/block/getMetaInfo.d.ts +9 -0
- package/dist/api-type-def/normal/block/index.d.ts +30 -0
- package/dist/api-type-def/normal/block/isBlockInLoadedChunk.d.ts +10 -0
- package/dist/api-type-def/normal/block/setBlock.d.ts +20 -0
- package/dist/api-type-def/normal/block/setBlockRect.d.ts +11 -0
- package/dist/api-type-def/normal/block/setBlockWalls.d.ts +13 -0
- package/dist/api-type-def/normal/entity/getEntityName.d.ts +9 -0
- package/dist/api-type-def/normal/entity/index.d.ts +3 -0
- package/dist/api-type-def/normal/forceRespawn.d.ts +10 -1
- package/dist/api-type-def/normal/getUnitCoordinatesLifeformWithin.d.ts +10 -12
- package/dist/api-type-def/normal/health/applyHealthChange.d.ts +10 -12
- package/dist/api-type-def/normal/health/applyMeleeHit.d.ts +18 -20
- package/dist/api-type-def/normal/health/attemptApplyDamage.d.ts +29 -31
- package/dist/api-type-def/normal/health/getHealth.d.ts +13 -15
- package/dist/api-type-def/normal/health/index.d.ts +9 -8
- package/dist/api-type-def/normal/health/isAlive.d.ts +9 -11
- package/dist/api-type-def/normal/health/killLifeform.d.ts +10 -12
- package/dist/api-type-def/normal/health/setHealth.d.ts +15 -17
- package/dist/api-type-def/normal/index.d.ts +67 -13
- package/dist/api-type-def/normal/item/createItemDrop.d.ts +20 -0
- package/dist/api-type-def/normal/item/deleteItemDrop.d.ts +3 -0
- package/dist/api-type-def/normal/item/index.d.ts +5 -0
- package/dist/api-type-def/normal/item/setCantPickUpItem.d.ts +3 -0
- package/dist/api-type-def/normal/killstreak/clearKillstreak.d.ts +9 -11
- package/dist/api-type-def/normal/killstreak/getCurrentKillstreak.d.ts +9 -11
- package/dist/api-type-def/normal/killstreak/index.d.ts +4 -3
- package/dist/api-type-def/normal/message/broadcastMessage.d.ts +14 -16
- package/dist/api-type-def/normal/message/index.d.ts +23 -4
- package/dist/api-type-def/normal/message/sendFlyingMiddleMessage.d.ts +13 -15
- package/dist/api-type-def/normal/message/sendMessage.d.ts +26 -25
- package/dist/api-type-def/normal/message/sendTopRightHelper.d.ts +31 -0
- package/dist/api-type-def/normal/playParticleEffect.d.ts +11 -0
- package/dist/api-type-def/normal/player/getNumPlayers.d.ts +8 -10
- package/dist/api-type-def/normal/player/getPlayerDbId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerIdFromDbId.d.ts +9 -0
- package/dist/api-type-def/normal/player/getPlayerIds.d.ts +8 -10
- package/dist/api-type-def/normal/player/getPlayerPartyWhenJoined.d.ts +10 -12
- package/dist/api-type-def/normal/player/index.d.ts +12 -6
- package/dist/api-type-def/normal/player/isMobile.d.ts +9 -0
- package/dist/api-type-def/normal/player/kickPlayer.d.ts +8 -0
- package/dist/api-type-def/normal/player/playerIsInGame.d.ts +9 -11
- package/dist/api-type-def/normal/player/playerIsLoggedIn.d.ts +7 -9
- package/dist/api-type-def/normal/positions/getPosition.d.ts +9 -11
- package/dist/api-type-def/normal/positions/index.d.ts +7 -3
- package/dist/api-type-def/normal/positions/setPosition.d.ts +23 -22
- package/dist/api-type-def/normal/shields/getShieldAmount.d.ts +11 -13
- package/dist/api-type-def/normal/shields/index.d.ts +4 -4
- package/dist/api-type-def/normal/shields/setShieldAmount.d.ts +10 -12
- package/dist/api-type-def/normal/shops/configureShopCategory.d.ts +10 -12
- package/dist/api-type-def/normal/shops/configureShopCategoryForPlayer.d.ts +11 -0
- package/dist/api-type-def/normal/shops/createShopItem.d.ts +14 -16
- package/dist/api-type-def/normal/shops/createShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/shops/deleteShopItem.d.ts +12 -14
- package/dist/api-type-def/normal/shops/index.d.ts +11 -6
- package/dist/api-type-def/normal/shops/resetShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/shops/showShopTutorial.d.ts +9 -11
- package/dist/api-type-def/normal/shops/updateShopItem.d.ts +13 -15
- package/dist/api-type-def/normal/shops/updateShopItemForPlayer.d.ts +14 -0
- package/dist/api-type-def/normal/standingOns/getBlockCoordinatesPlayerStandingOn.d.ts +12 -14
- package/dist/api-type-def/normal/standingOns/getBlockTypesPlayerStandingOn.d.ts +10 -12
- package/dist/api-type-def/normal/standingOns/index.d.ts +4 -3
- package/dist/index.d.ts +9 -9
- package/dist/type/ApplyMeleeHitOverrides.d.ts +7 -7
- package/dist/type/ChunkId.d.ts +1 -0
- package/dist/type/Coordinate.d.ts +1 -1
- package/dist/type/Direction.d.ts +1 -1
- package/dist/type/Health.d.ts +1 -1
- package/dist/type/ItemMetaInfo.d.ts +1 -0
- package/dist/type/LifeFormBodyPart.d.ts +1 -1
- package/dist/type/Party.d.ts +5 -5
- package/dist/type/PlayerAttemptDamageOtherPlayerOpts.d.ts +19 -19
- package/dist/type/ShieldAmount.d.ts +1 -1
- package/dist/type/WhoDidDamage.d.ts +5 -5
- package/dist/type/WhoKilled.d.ts +2 -2
- package/dist/type/WorldBlockChangedInfo.d.ts +3 -0
- package/dist/type/block/AllBlockId.d.ts +1 -1
- package/dist/type/block/AllBlockName.d.ts +1 -1
- package/dist/type/block/Block.d.ts +3 -3
- package/dist/type/block/BlockId.d.ts +2 -6
- package/dist/type/block/BlockName.d.ts +2 -6
- package/dist/type/block/index.d.ts +5 -5
- package/dist/type/color/Array255Color.d.ts +8 -8
- package/dist/type/color/Array255ColorWithA.d.ts +10 -10
- package/dist/type/color/StringColor.d.ts +7 -7
- package/dist/type/color/index.d.ts +3 -3
- package/dist/type/dbId/PlayerDbId.d.ts +1 -5
- package/dist/type/dbId/index.d.ts +1 -1
- package/dist/type/id/EntityId.d.ts +2 -6
- package/dist/type/id/Id.d.ts +1 -5
- package/dist/type/id/ItemEntityId.d.ts +2 -0
- package/dist/type/id/LifeFormId.d.ts +3 -3
- package/dist/type/id/MobId.d.ts +2 -6
- package/dist/type/id/PlayerId.d.ts +2 -6
- package/dist/type/id/index.d.ts +6 -5
- package/dist/type/index.d.ts +24 -20
- package/dist/type/item/AllItemId.d.ts +4 -4
- package/dist/type/item/AllItemName.d.ts +1 -1
- package/dist/type/item/Item.d.ts +3 -3
- package/dist/type/item/ItemAttributes.d.ts +5 -0
- package/dist/type/item/ItemId.d.ts +2 -6
- package/dist/type/item/ItemName.d.ts +2 -6
- package/dist/type/item/index.d.ts +6 -5
- package/dist/type/message/CustomTextStyling.d.ts +2 -2
- package/dist/type/message/EntityName.d.ts +8 -8
- package/dist/type/message/StyledIcon.d.ts +10 -10
- package/dist/type/message/StyledText.d.ts +6 -6
- package/dist/type/message/TextStyle.d.ts +8 -8
- package/dist/type/message/TranslatedText.d.ts +5 -5
- package/dist/type/message/index.d.ts +6 -6
- package/dist/type/mob/MobType.d.ts +1 -1
- package/dist/type/mob/index.d.ts +1 -1
- package/dist/type/particle/ParticlePresetOpts.d.ts +20 -20
- package/dist/type/particle/ParticleSystemBlendMode.d.ts +21 -21
- package/dist/type/particle/PresetId.d.ts +1 -1
- package/dist/type/particle/TempParticleSystemOpts.d.ts +31 -31
- package/dist/type/particle/Texture.d.ts +1 -1
- package/dist/type/particle/index.d.ts +5 -5
- package/dist/type/shop/ShopCategoryConfig.d.ts +9 -9
- package/dist/type/shop/ShopCategoryKey.d.ts +1 -1
- package/dist/type/shop/ShopItem.d.ts +25 -25
- package/dist/type/shop/ShopItemBadgeType.d.ts +1 -1
- package/dist/type/shop/ShopItemKey.d.ts +1 -1
- package/dist/type/shop/ShopItemUserInput.d.ts +25 -25
- package/dist/type/shop/index.d.ts +6 -6
- package/dist/type/sound/AllSoundName.d.ts +1 -1
- package/dist/type/sound/SoundName.d.ts +2 -6
- package/dist/type/sound/index.d.ts +2 -2
- package/dist/type/utilType.d.ts +3 -3
- package/package.json +1 -1
- package/readme.md +48 -1
|
@@ -1,61 +1,54 @@
|
|
|
1
|
-
import { EntityId, PlayerId } from "../../type/index";
|
|
2
|
-
import { EntitySettings } from "./entitySettings/index";
|
|
3
|
-
/**
|
|
4
|
-
* Set every player's other-entity setting to a specific value for a particular player.
|
|
5
|
-
* includeNewJoiners=true means that new players joining the game will also have this other player setting applied.
|
|
6
|
-
*
|
|
7
|
-
* @param {PlayerId} targetedPlayerId
|
|
8
|
-
* @param {Setting} settingName
|
|
9
|
-
* @param {EntitySettings[Setting]} settingValue
|
|
10
|
-
* @param {boolean} [includeNewJoiners]
|
|
11
|
-
* @returns {void}
|
|
12
|
-
*/
|
|
13
|
-
type
|
|
14
|
-
/**
|
|
15
|
-
* Set a player's other-entity setting for every lifeform in the game.
|
|
16
|
-
* includeNewJoiners=true means that the player will have the setting applied to new joiners.
|
|
17
|
-
*
|
|
18
|
-
* @param {PlayerId} playerId
|
|
19
|
-
* @param {Setting} settingName
|
|
20
|
-
* @param {EntitySettings[Setting]} settingValue
|
|
21
|
-
* @param {boolean} [includeNewJoiners]
|
|
22
|
-
* @returns {void}
|
|
23
|
-
*/
|
|
24
|
-
type
|
|
25
|
-
/**
|
|
26
|
-
* Set a player's other-entity setting for a specific entity.
|
|
27
|
-
*
|
|
28
|
-
* @param {PlayerId} relevantPlayerId
|
|
29
|
-
* @param {EntityId} targetedEntityId
|
|
30
|
-
* @param {Setting} settingName
|
|
31
|
-
* @param {EntitySettings[Setting]} settingValue
|
|
32
|
-
* @returns {void}
|
|
33
|
-
*/
|
|
34
|
-
type
|
|
35
|
-
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param {PlayerId} relevantPlayerId
|
|
39
|
-
* @param {EntityId} targetedEntityId
|
|
40
|
-
* @param {
|
|
41
|
-
* @returns {
|
|
42
|
-
*/
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setEveryoneSettingForPlayer: SetEveryoneSettingForPlayer;
|
|
56
|
-
setOtherEntitySetting: SetOtherEntitySetting;
|
|
57
|
-
setOtherEntitySettings: SetOtherEntitySettings;
|
|
58
|
-
getOtherEntitySetting: GetOtherEntitySetting;
|
|
59
|
-
};
|
|
60
|
-
export { SetTargetedPlayerSettingForEveryone, SetEveryoneSettingForPlayer, SetOtherEntitySetting, SetOtherEntitySettings, GetOtherEntitySetting, };
|
|
61
|
-
export * from "./entitySettings/index";
|
|
1
|
+
import { EntityId, PlayerId } from "../../type/index";
|
|
2
|
+
import { EntitySettings, SetTargetedPlayerSettingForEveryone, SetOtherEntitySetting, GetOtherEntitySetting, SetEveryoneSettingForPlayer } from "./entitySettings/index";
|
|
3
|
+
/**
|
|
4
|
+
* Set every player's other-entity setting to a specific value for a particular player.
|
|
5
|
+
* includeNewJoiners=true means that new players joining the game will also have this other player setting applied.
|
|
6
|
+
*
|
|
7
|
+
* @param {PlayerId} targetedPlayerId
|
|
8
|
+
* @param {Setting} settingName
|
|
9
|
+
* @param {EntitySettings[Setting]} settingValue
|
|
10
|
+
* @param {boolean} [includeNewJoiners]
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
type RootSetTargetedPlayerSettingForEveryone = <Setting extends keyof EntitySettings>(targetedPlayerId: PlayerId, settingName: Setting, settingValue: EntitySettings[Setting], includeNewJoiners?: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Set a player's other-entity setting for every lifeform in the game.
|
|
16
|
+
* includeNewJoiners=true means that the player will have the setting applied to new joiners.
|
|
17
|
+
*
|
|
18
|
+
* @param {PlayerId} playerId
|
|
19
|
+
* @param {Setting} settingName
|
|
20
|
+
* @param {EntitySettings[Setting]} settingValue
|
|
21
|
+
* @param {boolean} [includeNewJoiners]
|
|
22
|
+
* @returns {void}
|
|
23
|
+
*/
|
|
24
|
+
type RootSetEveryoneSettingForPlayer = <Setting extends keyof EntitySettings>(playerId: PlayerId, settingName: Setting, settingValue: EntitySettings[Setting], includeNewJoiners?: boolean) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Set a player's other-entity setting for a specific entity.
|
|
27
|
+
*
|
|
28
|
+
* @param {PlayerId} relevantPlayerId
|
|
29
|
+
* @param {EntityId} targetedEntityId
|
|
30
|
+
* @param {Setting} settingName
|
|
31
|
+
* @param {EntitySettings[Setting]} settingValue
|
|
32
|
+
* @returns {void}
|
|
33
|
+
*/
|
|
34
|
+
type RootSetOtherEntitySetting = <Setting extends keyof EntitySettings>(relevantPlayerId: PlayerId, targetedEntityId: EntityId, settingName: Setting, settingValue: EntitySettings[Setting]) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Get the value of a player's other-entity setting for a specific entity.
|
|
37
|
+
*
|
|
38
|
+
* @param {PlayerId} relevantPlayerId
|
|
39
|
+
* @param {EntityId} targetedEntityId
|
|
40
|
+
* @param {Setting} settingName
|
|
41
|
+
* @returns {EntitySettings[Setting]}
|
|
42
|
+
*/
|
|
43
|
+
type RootGetOtherEntitySetting = <Setting extends keyof EntitySettings>(relevantPlayerId: PlayerId, targetedEntityId: EntityId, settingName: Setting) => EntitySettings[Setting];
|
|
44
|
+
type SetEveryoneSettingForPlayerType = RootSetEveryoneSettingForPlayer & SetEveryoneSettingForPlayer["setEveryoneSettingForPlayer"];
|
|
45
|
+
type SetTargetedPlayerSettingForEveryoneType = RootSetTargetedPlayerSettingForEveryone & SetTargetedPlayerSettingForEveryone["setTargetedPlayerSettingForEveryone"];
|
|
46
|
+
type SetOtherEntitySettingType = RootSetOtherEntitySetting & SetOtherEntitySetting["setOtherEntitySetting"];
|
|
47
|
+
type GetOtherEntitySettingType = RootGetOtherEntitySetting & GetOtherEntitySetting["getOtherEntitySetting"];
|
|
48
|
+
export declare const EntitySettingApis: {
|
|
49
|
+
setEveryoneSettingForPlayer: SetEveryoneSettingForPlayerType;
|
|
50
|
+
setTargetedPlayerSettingForEveryone: SetTargetedPlayerSettingForEveryoneType;
|
|
51
|
+
setOtherEntitySetting: SetOtherEntitySettingType;
|
|
52
|
+
getOtherEntitySetting: GetOtherEntitySettingType;
|
|
53
|
+
};
|
|
54
|
+
export * from "./entitySettings/index";
|
|
@@ -1,10 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export declare const Apis: {
|
|
2
|
+
readonly getDefaultMobSetting: <TMobType extends import("../type/index").MobType, TMobSetting extends keyof import(".").MobSettings<TMobType>>(mobType: TMobType, setting: TMobSetting) => import(".").MobSettings<TMobType>[TMobSetting];
|
|
3
|
+
readonly setDefaultMobSetting: <TMobType extends import("../type/index").MobType, TMobSetting extends keyof import(".").MobSettings<TMobType>>(mobType: TMobType, setting: TMobSetting, value: import(".").MobSettings<TMobType>[TMobSetting]) => void;
|
|
4
|
+
readonly getMobSetting: <TMobSetting extends keyof import(".").MobSettings<import("../type/index").MobType>>(mobId: import("../type/index").MobId, setting: TMobSetting, returnDefaultIfNotOverridden?: boolean) => import(".").MobSettings<import("../type/index").MobType>[TMobSetting];
|
|
5
|
+
readonly setMobSetting: <TMobSetting extends keyof import(".").MobSettings<import("../type/index").MobType>>(mobId: import("../type/index").MobId, setting: TMobSetting, value: import(".").MobSettings<import("../type/index").MobType>[TMobSetting]) => void;
|
|
6
|
+
readonly setEveryoneSettingForPlayer: (<Setting extends keyof import(".").EntitySettings>(playerId: import("../type/index").PlayerId, settingName: Setting, settingValue: import(".").EntitySettings[Setting], includeNewJoiners?: boolean) => void) & ((playerId: import("../type/index").PlayerId, settingName: "opacity", settingValue: number, includeNewJoiners?: boolean) => void) & ((playerId: import("../type/index").PlayerId, settingName: "zIndex", settingValue: 0 | 1, includeNewJoiners?: boolean) => void) & ((playerId: import("../type/index").PlayerId, settingName: "overlayColour", settingValue: string | null, includeNewJoiners?: boolean) => void);
|
|
7
|
+
readonly setTargetedPlayerSettingForEveryone: (<Setting extends keyof import(".").EntitySettings>(targetedPlayerId: import("../type/index").PlayerId, settingName: Setting, settingValue: import(".").EntitySettings[Setting], includeNewJoiners?: boolean) => void) & ((targetedPlayerId: import("../type/index").PlayerId, settingName: "opacity", settingValue: number, includeNewJoiners?: boolean) => void) & ((targetedPlayerId: import("../type/index").PlayerId, settingName: "zIndex", settingValue: 0 | 1, includeNewJoiners?: boolean) => void) & ((targetedPlayerId: import("../type/index").PlayerId, settingName: "overlayColour", settingValue: string | null, includeNewJoiners?: boolean) => void);
|
|
8
|
+
readonly setOtherEntitySetting: (<Setting extends keyof import(".").EntitySettings>(relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: Setting, settingValue: import(".").EntitySettings[Setting]) => void) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "opacity", settingValue: number) => void) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "zIndex", settingValue: 0 | 1) => void) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "overlayColour", settingValue: string | null) => void);
|
|
9
|
+
readonly getOtherEntitySetting: (<Setting extends keyof import(".").EntitySettings>(relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: Setting) => import(".").EntitySettings[Setting]) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "opacity") => number) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "zIndex") => 0 | 1) & ((relevantPlayerId: import("../type/index").PlayerId, targetedEntityId: import("../type/index").EntityId, settingName: "overlayColour") => string | null);
|
|
10
|
+
readonly setClientOption: (<TOption extends keyof import(".").ClientOptions>(playerId: import("../type/index").PlayerId, option: TOption, value: import(".").ClientOptions[TOption]) => void) & {
|
|
11
|
+
(playerId: import("../type/index").PlayerId, option: "canChange", value: true): void;
|
|
12
|
+
(playerId: import("../type/index").PlayerId, option: "canChange", value: false): void;
|
|
13
|
+
} & ((playerId: import("../type/index").PlayerId, option: "crouchingSpeed", value: number) => void) & ((playerId: import("../type/index").PlayerId, option: "walkingSpeed", value: number) => void) & ((playerId: import("../type/index").PlayerId, option: "runningSpeed", value: number) => void) & ((playerId: import("../type/index").PlayerId, option: "speedMultiplier", value: number) => void);
|
|
14
|
+
readonly getClientOption: (<TOption extends keyof import(".").ClientOptions>(playerId: import("../type/index").PlayerId, option: TOption) => import(".").ClientOptions[TOption]) & ((playerId: import("../type/index").PlayerId, option: "canChange") => boolean) & ((playerId: import("../type/index").PlayerId, option: "crouchingSpeed") => number) & ((playerId: import("../type/index").PlayerId, option: "walkingSpeed") => number) & ((playerId: import("../type/index").PlayerId, option: "runningSpeed") => number) & ((playerId: import("../type/index").PlayerId, option: "speedMultiplier") => number);
|
|
15
|
+
readonly setClientOptionToDefault: (<TOption extends keyof import(".").ClientOptions>(playerId: import("../type/index").PlayerId, option: TOption) => void) & ((playerId: import("../type/index").PlayerId, option: "canChange") => void) & ((playerId: import("../type/index").PlayerId, option: "crouchingSpeed") => void) & ((playerId: import("../type/index").PlayerId, option: "walkingSpeed") => void) & ((playerId: import("../type/index").PlayerId, option: "runningSpeed") => void) & ((playerId: import("../type/index").PlayerId, option: "speedMultiplier") => void);
|
|
16
|
+
readonly setClientOptions: (playerId: import("../type/index").PlayerId, options: Partial<import(".").ClientOptions>) => void;
|
|
17
|
+
readonly forceRespawn: (playerId: import("../type/index").PlayerId, respawnPos?: Readonly<import("../type/index").Coordinate>) => void;
|
|
18
|
+
readonly getEntityName: (entityId: import("../type/index").EntityId) => string;
|
|
19
|
+
readonly getPlayerIds: () => import("../type/index").PlayerId[];
|
|
20
|
+
readonly getNumPlayers: () => number;
|
|
21
|
+
readonly getPlayerPartyWhenJoined: (playerId: import("../type/index").PlayerId) => import("../type/index").Party | null;
|
|
22
|
+
readonly playerIsInGame: (playerId: import("../type/index").PlayerId) => boolean;
|
|
23
|
+
readonly playerIsLoggedIn: (playerId: import("../type/index").PlayerId) => boolean;
|
|
24
|
+
readonly getPlayerId: (playerName: string) => null | import("../type/index").PlayerId;
|
|
25
|
+
readonly getPlayerDbId: (playerId: import("../type/index").PlayerId) => import("../type/index").PlayerDbId;
|
|
26
|
+
readonly getPlayerIdFromDbId: (dbId: import("../type/index").PlayerDbId) => null | import("../type/index").PlayerId;
|
|
27
|
+
readonly kickPlayer: (playerId: import("../type/index").PlayerId, reason: string) => void;
|
|
28
|
+
readonly isMobile: (playerId: import("../type/index").PlayerId) => boolean;
|
|
29
|
+
readonly broadcastMessage: (message: string | import("../type/index").CustomTextStyling, style?: {
|
|
30
|
+
fontWeight?: number | string;
|
|
31
|
+
color?: string;
|
|
32
|
+
}) => void;
|
|
33
|
+
readonly sendMessage: {
|
|
34
|
+
(playerId: import("../type/index").PlayerId, message: string, style: {
|
|
35
|
+
fontWeight?: number | string;
|
|
36
|
+
color?: string;
|
|
37
|
+
}): void;
|
|
38
|
+
(playerId: import("../type/index").PlayerId, message: import("../type/index").CustomTextStyling): void;
|
|
39
|
+
};
|
|
40
|
+
readonly sendFlyingMiddleMessage: (playerId: import("../type/index").PlayerId, message: string | import("../type/index").CustomTextStyling, distanceFromAction?: number, lifetimeMs?: number) => void;
|
|
41
|
+
readonly sendTopRightHelper: (playerId: import("../type/index").PlayerId, icon: string, text: string, opts: {
|
|
42
|
+
duration?: number;
|
|
43
|
+
width?: number;
|
|
44
|
+
height?: number;
|
|
45
|
+
color?: import("../type/index").StringColor;
|
|
46
|
+
iconSizeMult?: number;
|
|
47
|
+
textAndIconColor?: string;
|
|
48
|
+
fontSize?: string;
|
|
49
|
+
}) => void;
|
|
50
|
+
readonly getCurrentKillstreak: (playerId: import("../type/index").PlayerId) => number;
|
|
51
|
+
readonly clearKillstreak: (playerId: import("../type/index").PlayerId) => void;
|
|
52
|
+
readonly createItemDrop: (x: number, y: number, z: number, itemName: import("../type/index").ItemName, amount?: number | null, margeItems?: boolean, attributes?: import("../type/index").ItemAttributes, timeTillDespawn?: number, dropperId?: import("../type/index").LifeformId | null, options?: never) => null | import("../type/index").ItemEntityId;
|
|
53
|
+
readonly setCantPickUpItem: (playerId: import("../type/index").PlayerId, itemId: import("../type/index").ItemEntityId) => void;
|
|
54
|
+
readonly deleteItemDrop: (itemId: import("../type/index").ItemEntityId) => void;
|
|
55
|
+
readonly getHealth: (entityId: import("../type/index").EntityId) => import("../type/index").Health;
|
|
56
|
+
readonly setHealth: (entityId: import("../type/index").EntityId, newHealth: import("../type/index").Health | null, whoDidDamage?: Readonly<import("../type/index").WhoDidDamage>, increaseMaxHealthIfNeeded?: boolean) => boolean;
|
|
57
|
+
readonly attemptApplyDamage: (options: Readonly<import("../type/index").PlayerAttemptDamageOtherPlayerOpts>) => boolean;
|
|
58
|
+
readonly applyMeleeHit: (hittingEId: import("../type/index").LifeformId, hitEId: import("../type/index").LifeformId, dirFacing: Readonly<import("../type/index").Direcrion>, bodyPartHit?: import("../type/index").LifeformBodyPart | null, overrides?: Readonly<import("../type/index").applyMeleeHitOverrides>) => boolean;
|
|
59
|
+
readonly applyHealthChange: (lifeformId: import("../type/index").LifeformId, changeAmount: number, whoDidDamage?: Readonly<import("../type/index").WhoDidDamage>, broadcastLifeformHurt?: boolean) => boolean;
|
|
60
|
+
readonly killLifeform: (lifeformId: import("../type/index").LifeformId, whoKilled?: import("../type/index").WhoKilled) => void;
|
|
61
|
+
readonly isAlive: (lifeformId: import("../type/index").LifeformId) => boolean;
|
|
62
|
+
readonly getBlockCoordinatesPlayerStandingOn: (playerId: import("../type/index").PlayerId) => import("../type/index").Coordinate[];
|
|
63
|
+
readonly getBlockTypesPlayerStandingOn: (playerId: import("../type/index").PlayerId) => import("../type/index").BlockName[];
|
|
64
|
+
readonly getPosition: (entityId: import("../type/index").EntityId) => import("../type/index").Coordinate;
|
|
65
|
+
readonly setPosition: {
|
|
66
|
+
(entityId: import("../type/index").EntityId, x: number, y: number, z: number): void;
|
|
67
|
+
(entityId: import("../type/index").EntityId, position: Readonly<import("../type/index").Coordinate>): void;
|
|
68
|
+
};
|
|
69
|
+
readonly getShieldAmount: (entityId: import("../type/index").EntityId) => import("../type/index").ShieldAmount;
|
|
70
|
+
readonly setShieldAmount: (lifeformId: import("../type/index").LifeformId, newShieldAmount: import("../type/index").ShieldAmount) => void;
|
|
71
|
+
readonly showShopTutorial: (playerId: import("../type/index").PlayerId) => void;
|
|
72
|
+
readonly createShopItem: (categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey, item: import("../type/index").ShopItem) => void;
|
|
73
|
+
readonly updateShopItem: (categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey, changes: Partial<import("../type/index").ShopItem>) => void;
|
|
74
|
+
readonly deleteShopItem: (categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey) => void;
|
|
75
|
+
readonly configureShopCategory: (categoryKey: import("../type/index").ShopCategoryKey, config: import("../type/index").ShopCategoryConfig) => void;
|
|
76
|
+
readonly createShopItemForPlayer: (playerId: import("../type/index").PlayerId, categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey, item: import("../type/index").ShopItem) => void;
|
|
77
|
+
readonly updateShopItemForPlayer: (playerId: import("../type/index").PlayerId, categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey, changes: Partial<import("../type/index").ShopItem>) => void;
|
|
78
|
+
readonly resetShopItemForPlayer: (playerId: import("../type/index").PlayerId, categoryKey: import("../type/index").ShopCategoryKey, itemKey: import("../type/index").ShopItemKey) => void;
|
|
79
|
+
readonly configureShopCategoryForPlayer: (playerId: import("../type/index").PlayerId, categoryKey: import("../type/index").ShopCategoryKey, config: import("../type/index").ShopCategoryConfig) => void;
|
|
80
|
+
readonly getUnitCoordinatesLifeformWithin: (lifeformId: import("../type/index").LifeformId) => import("../type/index").Coordinate[];
|
|
81
|
+
readonly playParticleEffect: (opts: import("../type/index").TempParticleSystemOpts, clientPredictedBy?: import("../type/index").PlayerId) => void;
|
|
82
|
+
};
|
|
83
|
+
export * from "./normal/index";
|
|
84
|
+
export * from "./clientOption/index";
|
|
85
|
+
export * from "./entitySetting/index";
|
|
86
|
+
export * from "./mobSetting/index";
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
import { MobSettings } from "./mobSettings/index";
|
|
2
|
-
import { MobId, MobType } from "../../type/index";
|
|
3
|
-
/**
|
|
4
|
-
* Returns the current default value for a mob setting.
|
|
5
|
-
*
|
|
6
|
-
* @param {TMobType} mobType
|
|
7
|
-
* @param {TMobSetting} setting
|
|
8
|
-
* @returns {MobSettings<TMobType>[TMobSetting]}
|
|
9
|
-
*/
|
|
10
|
-
type
|
|
11
|
-
/**
|
|
12
|
-
* Set the default value for a mob setting.
|
|
13
|
-
*
|
|
14
|
-
* @param {TMobType} mobType
|
|
15
|
-
* @param {TMobSetting} setting
|
|
16
|
-
* @param {MobSettings<TMobType>[TMobSetting]} value
|
|
17
|
-
* @returns {void}
|
|
18
|
-
*/
|
|
19
|
-
type
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param {MobId} mobId
|
|
24
|
-
* @param {TMobSetting} setting
|
|
25
|
-
* @param {
|
|
26
|
-
* @returns {
|
|
27
|
-
*/
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
1
|
+
import { MobSettings } from "./mobSettings/index";
|
|
2
|
+
import { MobId, MobType } from "../../type/index";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the current default value for a mob setting.
|
|
5
|
+
*
|
|
6
|
+
* @param {TMobType} mobType
|
|
7
|
+
* @param {TMobSetting} setting
|
|
8
|
+
* @returns {MobSettings<TMobType>[TMobSetting]}
|
|
9
|
+
*/
|
|
10
|
+
type RootGetDefaultMobSetting = <TMobType extends MobType, TMobSetting extends keyof MobSettings<TMobType>>(mobType: TMobType, setting: TMobSetting) => MobSettings<TMobType>[TMobSetting];
|
|
11
|
+
/**
|
|
12
|
+
* Set the default value for a mob setting.
|
|
13
|
+
*
|
|
14
|
+
* @param {TMobType} mobType
|
|
15
|
+
* @param {TMobSetting} setting
|
|
16
|
+
* @param {MobSettings<TMobType>[TMobSetting]} value
|
|
17
|
+
* @returns {void}
|
|
18
|
+
*/
|
|
19
|
+
type RootSetDefaultMobSetting = <TMobType extends MobType, TMobSetting extends keyof MobSettings<TMobType>>(mobType: TMobType, setting: TMobSetting, value: MobSettings<TMobType>[TMobSetting]) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Get the current value of a mob setting for a specific mob.
|
|
22
|
+
*
|
|
23
|
+
* @param {MobId} mobId
|
|
24
|
+
* @param {TMobSetting} setting
|
|
25
|
+
* @param {boolean} [returnDefaultIfNotOverridden] - If true, return the default setting if not overridden.
|
|
26
|
+
* @returns {MobSettings<MobType>[TMobSetting]}
|
|
27
|
+
*/
|
|
28
|
+
type RootGetMobSetting = <TMobSetting extends keyof MobSettings<MobType>>(mobId: MobId, setting: TMobSetting, returnDefaultIfNotOverridden?: boolean) => MobSettings<MobType>[TMobSetting];
|
|
29
|
+
/**
|
|
30
|
+
* Set the current value of a mob setting for a specific mob.
|
|
31
|
+
*
|
|
32
|
+
* @param {MobId} mobId
|
|
33
|
+
* @param {TMobSetting} setting
|
|
34
|
+
* @param {MobSettings<MobType>[TMobSetting]} value
|
|
35
|
+
* @returns {void}
|
|
36
|
+
*/
|
|
37
|
+
type RootSetMobSetting = <TMobSetting extends keyof MobSettings<MobType>>(mobId: MobId, setting: TMobSetting, value: MobSettings<MobType>[TMobSetting]) => void;
|
|
38
|
+
export declare const MobSettingApis: {
|
|
39
|
+
getDefaultMobSetting: RootGetDefaultMobSetting;
|
|
40
|
+
setDefaultMobSetting: RootSetDefaultMobSetting;
|
|
41
|
+
getMobSetting: RootGetMobSetting;
|
|
42
|
+
setMobSetting: RootSetMobSetting;
|
|
43
|
+
};
|
|
44
|
+
export * from "./mobSettings/index";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MobType } from "../../../type/index";
|
|
2
|
-
import { Variation } from "./variation";
|
|
3
|
-
export type MobSettings<K extends MobType> = {
|
|
4
|
-
variation: Variation<K>;
|
|
5
|
-
};
|
|
6
|
-
export * from "./variation";
|
|
1
|
+
import { MobType } from "../../../type/index";
|
|
2
|
+
import { Variation } from "./variation";
|
|
3
|
+
export type MobSettings<K extends MobType> = {
|
|
4
|
+
variation: Variation<K>;
|
|
5
|
+
};
|
|
6
|
+
export * from "./variation";
|
|
@@ -1,118 +1,118 @@
|
|
|
1
|
-
import { MobType } from "../../../type/index";
|
|
2
|
-
type VariationDictionary = {
|
|
3
|
-
/**
|
|
4
|
-
* @default {"default"}
|
|
5
|
-
*/
|
|
6
|
-
Pig: "default";
|
|
7
|
-
/**
|
|
8
|
-
* @default {"default"}
|
|
9
|
-
*/
|
|
10
|
-
Cow: "default" | "cream";
|
|
11
|
-
/**
|
|
12
|
-
* @default {"default"}
|
|
13
|
-
*/
|
|
14
|
-
Sheep: "default" | "black" | "red" | "orange" | "pink" | "purple" | "yellow" | "blue" | "brown" | "cyan" | "gray" | "green" | "lightBlue" | "lightGray" | "lime" | "magenta";
|
|
15
|
-
/**
|
|
16
|
-
* @default {"default"}
|
|
17
|
-
*/
|
|
18
|
-
Horse: "default" | "black" | "brown" | "cream";
|
|
19
|
-
"Cave Golem": "default" | "iron";
|
|
20
|
-
/**
|
|
21
|
-
* @default {"default"}
|
|
22
|
-
*/
|
|
23
|
-
"Draugr Zombie": "default" | "longHairChestplate" | "longHairClothed" | "shortHairClothed";
|
|
24
|
-
/**
|
|
25
|
-
* @default {"default"}
|
|
26
|
-
*/
|
|
27
|
-
"Draugr Skeleton": "default";
|
|
28
|
-
/**
|
|
29
|
-
* @default {"default"}
|
|
30
|
-
*/
|
|
31
|
-
"Frost Golem": "default";
|
|
32
|
-
/**
|
|
33
|
-
* @default {"default"}
|
|
34
|
-
*/
|
|
35
|
-
"Frost Zombie": "default" | "longHairChestplate" | "shortHairClothed";
|
|
36
|
-
/**
|
|
37
|
-
* @default {"default"}
|
|
38
|
-
*/
|
|
39
|
-
"Frost Skeleton": "default";
|
|
40
|
-
/**
|
|
41
|
-
* @default {"default"}
|
|
42
|
-
*/
|
|
43
|
-
"Draugr Knight": "default";
|
|
44
|
-
/**
|
|
45
|
-
* @default {"default"}
|
|
46
|
-
*/
|
|
47
|
-
Wolf: "default" | "white" | "brown" | "grey" | "spectral";
|
|
48
|
-
/**
|
|
49
|
-
* @default {"default"}
|
|
50
|
-
*/
|
|
51
|
-
Bear: "default";
|
|
52
|
-
/**
|
|
53
|
-
* @default {"default"}
|
|
54
|
-
*/
|
|
55
|
-
Deer: "default";
|
|
56
|
-
/**
|
|
57
|
-
* @default {"default"}
|
|
58
|
-
*/
|
|
59
|
-
Stag: "default";
|
|
60
|
-
/**
|
|
61
|
-
* @default {"default"}
|
|
62
|
-
*/
|
|
63
|
-
"Gold Watermelon Stag": "default";
|
|
64
|
-
/**
|
|
65
|
-
* @default {"default"}
|
|
66
|
-
*/
|
|
67
|
-
Gorilla: "default";
|
|
68
|
-
/**
|
|
69
|
-
* @default {"default"}
|
|
70
|
-
*/
|
|
71
|
-
Wildcat: "default" | "tabby" | "grey" | "black" | "calico" | "siamese" | "leopard";
|
|
72
|
-
/**
|
|
73
|
-
* @default {"default"}
|
|
74
|
-
*/
|
|
75
|
-
"Magma Golem": "default";
|
|
76
|
-
/**
|
|
77
|
-
* @default {"default"}
|
|
78
|
-
*/
|
|
79
|
-
"Draugr Huntress": "default" | "chainmail";
|
|
80
|
-
/**
|
|
81
|
-
* @default {"default"}
|
|
82
|
-
*/
|
|
83
|
-
"Spirit Golem": "default";
|
|
84
|
-
/**
|
|
85
|
-
* @default {"default"}
|
|
86
|
-
*/
|
|
87
|
-
"Spirit Wolf": "default";
|
|
88
|
-
/**
|
|
89
|
-
* @default {"default"}
|
|
90
|
-
*/
|
|
91
|
-
"Spirit Bear": "default";
|
|
92
|
-
/**
|
|
93
|
-
* @default {"default"}
|
|
94
|
-
*/
|
|
95
|
-
"Spirit Stag": "default";
|
|
96
|
-
/**
|
|
97
|
-
* @default {"default"}
|
|
98
|
-
*/
|
|
99
|
-
"Spirit Gorilla": "default";
|
|
100
|
-
/**
|
|
101
|
-
* @default {"default"}
|
|
102
|
-
*/
|
|
103
|
-
"Draugr Warper": "default";
|
|
104
|
-
/**
|
|
105
|
-
* @default {"default"}
|
|
106
|
-
*/
|
|
107
|
-
"Frost Wraith": "default";
|
|
108
|
-
/**
|
|
109
|
-
* @default {"default"}
|
|
110
|
-
*/
|
|
111
|
-
"Draugr Reaver": "default";
|
|
112
|
-
/**
|
|
113
|
-
* @default {"default"}
|
|
114
|
-
*/
|
|
115
|
-
NPC: "default" | "emma" | "leo" | "isabel" | "sanjay" | "imara" | "enoch" | "sara" | "carmen";
|
|
116
|
-
};
|
|
117
|
-
export type Variation<K extends MobType> = VariationDictionary[K];
|
|
118
|
-
export {};
|
|
1
|
+
import { MobType } from "../../../type/index";
|
|
2
|
+
type VariationDictionary = {
|
|
3
|
+
/**
|
|
4
|
+
* @default {"default"}
|
|
5
|
+
*/
|
|
6
|
+
Pig: "default";
|
|
7
|
+
/**
|
|
8
|
+
* @default {"default"}
|
|
9
|
+
*/
|
|
10
|
+
Cow: "default" | "cream";
|
|
11
|
+
/**
|
|
12
|
+
* @default {"default"}
|
|
13
|
+
*/
|
|
14
|
+
Sheep: "default" | "black" | "red" | "orange" | "pink" | "purple" | "yellow" | "blue" | "brown" | "cyan" | "gray" | "green" | "lightBlue" | "lightGray" | "lime" | "magenta";
|
|
15
|
+
/**
|
|
16
|
+
* @default {"default"}
|
|
17
|
+
*/
|
|
18
|
+
Horse: "default" | "black" | "brown" | "cream";
|
|
19
|
+
"Cave Golem": "default" | "iron";
|
|
20
|
+
/**
|
|
21
|
+
* @default {"default"}
|
|
22
|
+
*/
|
|
23
|
+
"Draugr Zombie": "default" | "longHairChestplate" | "longHairClothed" | "shortHairClothed";
|
|
24
|
+
/**
|
|
25
|
+
* @default {"default"}
|
|
26
|
+
*/
|
|
27
|
+
"Draugr Skeleton": "default";
|
|
28
|
+
/**
|
|
29
|
+
* @default {"default"}
|
|
30
|
+
*/
|
|
31
|
+
"Frost Golem": "default";
|
|
32
|
+
/**
|
|
33
|
+
* @default {"default"}
|
|
34
|
+
*/
|
|
35
|
+
"Frost Zombie": "default" | "longHairChestplate" | "shortHairClothed";
|
|
36
|
+
/**
|
|
37
|
+
* @default {"default"}
|
|
38
|
+
*/
|
|
39
|
+
"Frost Skeleton": "default";
|
|
40
|
+
/**
|
|
41
|
+
* @default {"default"}
|
|
42
|
+
*/
|
|
43
|
+
"Draugr Knight": "default";
|
|
44
|
+
/**
|
|
45
|
+
* @default {"default"}
|
|
46
|
+
*/
|
|
47
|
+
Wolf: "default" | "white" | "brown" | "grey" | "spectral";
|
|
48
|
+
/**
|
|
49
|
+
* @default {"default"}
|
|
50
|
+
*/
|
|
51
|
+
Bear: "default";
|
|
52
|
+
/**
|
|
53
|
+
* @default {"default"}
|
|
54
|
+
*/
|
|
55
|
+
Deer: "default";
|
|
56
|
+
/**
|
|
57
|
+
* @default {"default"}
|
|
58
|
+
*/
|
|
59
|
+
Stag: "default";
|
|
60
|
+
/**
|
|
61
|
+
* @default {"default"}
|
|
62
|
+
*/
|
|
63
|
+
"Gold Watermelon Stag": "default";
|
|
64
|
+
/**
|
|
65
|
+
* @default {"default"}
|
|
66
|
+
*/
|
|
67
|
+
Gorilla: "default";
|
|
68
|
+
/**
|
|
69
|
+
* @default {"default"}
|
|
70
|
+
*/
|
|
71
|
+
Wildcat: "default" | "tabby" | "grey" | "black" | "calico" | "siamese" | "leopard";
|
|
72
|
+
/**
|
|
73
|
+
* @default {"default"}
|
|
74
|
+
*/
|
|
75
|
+
"Magma Golem": "default";
|
|
76
|
+
/**
|
|
77
|
+
* @default {"default"}
|
|
78
|
+
*/
|
|
79
|
+
"Draugr Huntress": "default" | "chainmail";
|
|
80
|
+
/**
|
|
81
|
+
* @default {"default"}
|
|
82
|
+
*/
|
|
83
|
+
"Spirit Golem": "default";
|
|
84
|
+
/**
|
|
85
|
+
* @default {"default"}
|
|
86
|
+
*/
|
|
87
|
+
"Spirit Wolf": "default";
|
|
88
|
+
/**
|
|
89
|
+
* @default {"default"}
|
|
90
|
+
*/
|
|
91
|
+
"Spirit Bear": "default";
|
|
92
|
+
/**
|
|
93
|
+
* @default {"default"}
|
|
94
|
+
*/
|
|
95
|
+
"Spirit Stag": "default";
|
|
96
|
+
/**
|
|
97
|
+
* @default {"default"}
|
|
98
|
+
*/
|
|
99
|
+
"Spirit Gorilla": "default";
|
|
100
|
+
/**
|
|
101
|
+
* @default {"default"}
|
|
102
|
+
*/
|
|
103
|
+
"Draugr Warper": "default";
|
|
104
|
+
/**
|
|
105
|
+
* @default {"default"}
|
|
106
|
+
*/
|
|
107
|
+
"Frost Wraith": "default";
|
|
108
|
+
/**
|
|
109
|
+
* @default {"default"}
|
|
110
|
+
*/
|
|
111
|
+
"Draugr Reaver": "default";
|
|
112
|
+
/**
|
|
113
|
+
* @default {"default"}
|
|
114
|
+
*/
|
|
115
|
+
NPC: "default" | "emma" | "leo" | "isabel" | "sanjay" | "imara" | "enoch" | "sara" | "carmen";
|
|
116
|
+
};
|
|
117
|
+
export type Variation<K extends MobType> = VariationDictionary[K];
|
|
118
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BlockName, PlayerDbId, WorldBlockChangedInfo } from "../../../type/index";
|
|
2
|
+
declare const attemptWorldChangeBlock: (initatorDbId: null | PlayerDbId, x: number, y: number, z: number, blockName: BlockName, extraInfo?: WorldBlockChangedInfo) => "preventChange" | "preventDrop" | void;
|
|
3
|
+
export { attemptWorldChangeBlock };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockId, BlockName } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Goes from block id to block name. The reverse of blockNameToBlockId
|
|
4
|
+
*
|
|
5
|
+
* @param {BlockId} blockId
|
|
6
|
+
* @returns {BlockName}
|
|
7
|
+
*/
|
|
8
|
+
declare const blockIdToBlockName: (blockId: BlockId) => BlockName;
|
|
9
|
+
export { blockIdToBlockName };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BlockId, BlockName } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get the numeric id of a block used in the ndarrays returned from getChunk
|
|
4
|
+
* I.e. chunk.blockData.set(x, y, z, api.blockNameToBlockId("Dirt"))
|
|
5
|
+
* or chunk.blockData.get(x, y, z) === api.blockNameToBlockId("Dirt")
|
|
6
|
+
*
|
|
7
|
+
* @param {BlockName} blockName
|
|
8
|
+
* @param {boolean} [allowInvalidBlock] - Don't throw an error if the block name is invalid.
|
|
9
|
+
* Defaults false. If true and name is invalid, returns null.
|
|
10
|
+
* @returns {PNull<number>}
|
|
11
|
+
*/
|
|
12
|
+
declare const blockNameToBlockId: {
|
|
13
|
+
(blockName: BlockName): BlockId;
|
|
14
|
+
(blockName: BlockName, allowInvalidBlock: true): null | BlockId;
|
|
15
|
+
(blockName: BlockName, allowInvalidBlock: false): BlockId;
|
|
16
|
+
};
|
|
17
|
+
export { blockNameToBlockId };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BlockName, Coordinate } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get the name of a block.
|
|
4
|
+
*
|
|
5
|
+
* Overload 1: getBlock(x: number, y: number, z: number): BlockName
|
|
6
|
+
* Overload 2: getBlock(pos: Coordinate): BlockName
|
|
7
|
+
*
|
|
8
|
+
* @param {number} x
|
|
9
|
+
* @param {number} y
|
|
10
|
+
* @param {number} z
|
|
11
|
+
* @returns {BlockName} - blockName - will be a name contained in blockMetadata.ts or 'Air'
|
|
12
|
+
*/
|
|
13
|
+
declare const getBlock: {
|
|
14
|
+
(x: number, y: number, z: number): BlockName;
|
|
15
|
+
(pos: Coordinate): BlockName;
|
|
16
|
+
};
|
|
17
|
+
export { getBlock };
|