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,16 +1,14 @@
|
|
|
1
|
-
import { ShopCategoryKey, ShopItem, ShopItemKey } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export default CreateShopItemInterface;
|
|
1
|
+
import { ShopCategoryKey, ShopItem, ShopItemKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new shop item under the given category.
|
|
4
|
+
* Will create a new category if it does not exist.
|
|
5
|
+
* If the shop item already exists then it will be replaced.
|
|
6
|
+
* If any per-player overrides exist under the same categoryKey and itemKey then they will be deleted.
|
|
7
|
+
*
|
|
8
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category to create the item in
|
|
9
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
10
|
+
* @param {ShopItem} item - The shop item to create (will be mutated)
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
declare const createShopItem: (categoryKey: ShopCategoryKey, itemKey: ShopItemKey, item: ShopItem) => void;
|
|
14
|
+
export { createShopItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PlayerId, ShopCategoryKey, ShopItem, ShopItemKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Create a new shop item for a specific player.
|
|
4
|
+
* Will create a new category if it does not exist.
|
|
5
|
+
* Will replace any overrides this player already has for the same item.
|
|
6
|
+
*
|
|
7
|
+
* @param {PlayerId} playerId - The player to create the item for
|
|
8
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category to create the item in
|
|
9
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
10
|
+
* @param {ShopItem} item - The shop item to create (will be mutated)
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
declare const createShopItemForPlayer: (playerId: PlayerId, categoryKey: ShopCategoryKey, itemKey: ShopItemKey, item: ShopItem) => void;
|
|
14
|
+
export { createShopItemForPlayer };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { ShopCategoryKey, ShopItemKey } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export default DeleteShopItemInterface;
|
|
1
|
+
import { ShopCategoryKey, ShopItemKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Delete an existing shop item.
|
|
4
|
+
* Throws an error if the item does not exist.
|
|
5
|
+
* Will also delete all per-player overrides for the shop item.
|
|
6
|
+
*
|
|
7
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category containing the item
|
|
8
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
9
|
+
* @returns {void}
|
|
10
|
+
*/
|
|
11
|
+
declare const deleteShopItem: (categoryKey: ShopCategoryKey, itemKey: ShopItemKey) => void;
|
|
12
|
+
export { deleteShopItem };
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
1
|
+
export declare const ShopApis: {
|
|
2
|
+
showShopTutorial: (playerId: import("../../..").PlayerId) => void;
|
|
3
|
+
createShopItem: (categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey, item: import("../../..").ShopItem) => void;
|
|
4
|
+
updateShopItem: (categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey, changes: Partial<import("../../..").ShopItem>) => void;
|
|
5
|
+
deleteShopItem: (categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey) => void;
|
|
6
|
+
configureShopCategory: (categoryKey: import("../../..").ShopCategoryKey, config: import("../../..").ShopCategoryConfig) => void;
|
|
7
|
+
createShopItemForPlayer: (playerId: import("../../..").PlayerId, categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey, item: import("../../..").ShopItem) => void;
|
|
8
|
+
updateShopItemForPlayer: (playerId: import("../../..").PlayerId, categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey, changes: Partial<import("../../..").ShopItem>) => void;
|
|
9
|
+
resetShopItemForPlayer: (playerId: import("../../..").PlayerId, categoryKey: import("../../..").ShopCategoryKey, itemKey: import("../../..").ShopItemKey) => void;
|
|
10
|
+
configureShopCategoryForPlayer: (playerId: import("../../..").PlayerId, categoryKey: import("../../..").ShopCategoryKey, config: import("../../..").ShopCategoryConfig) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PlayerId, ShopCategoryKey, ShopItemKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Delete a specific player's overrides for a shop item.
|
|
4
|
+
* Like other methods, it doesn't matter whether the overrides were created
|
|
5
|
+
* using createShopItemForPlayer or by using updateShopItemForPlayer instead.
|
|
6
|
+
* This method does nothing if the overrides don't exist or are defined internally by the engine.
|
|
7
|
+
*
|
|
8
|
+
* @param {PlayerId} playerId - The player to reset the item for
|
|
9
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category containing the item
|
|
10
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
declare const resetShopItemForPlayer: (playerId: PlayerId, categoryKey: ShopCategoryKey, itemKey: ShopItemKey) => void;
|
|
14
|
+
export { resetShopItemForPlayer };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
export default ShowShopTutorialInterface;
|
|
1
|
+
import { PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Show the shop tutorial for a player. Will not be shown if they have ever seen the shop tutorial in your game before.
|
|
4
|
+
*
|
|
5
|
+
* @param {PlayerId} playerId
|
|
6
|
+
* @returns {void}
|
|
7
|
+
*/
|
|
8
|
+
declare const showShopTutorial: (playerId: PlayerId) => void;
|
|
9
|
+
export { showShopTutorial };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { ShopCategoryKey, ShopItem, ShopItemKey } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export default UpdateShopItemInterface;
|
|
1
|
+
import { ShopCategoryKey, ShopItem, ShopItemKey } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Update selected properties of an existing shop item.
|
|
4
|
+
* For example, { canBuy: true } to allow players to purchase the item.
|
|
5
|
+
* Throws an error if the item does not exist.
|
|
6
|
+
*
|
|
7
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category containing the item
|
|
8
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
9
|
+
* @param {Partial<ShopItem>} changes - Partial shop item properties to update
|
|
10
|
+
* @returns {void}
|
|
11
|
+
*/
|
|
12
|
+
declare const updateShopItem: (categoryKey: ShopCategoryKey, itemKey: ShopItemKey, changes: Partial<ShopItem>) => void;
|
|
13
|
+
export { updateShopItem };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PlayerId, ShopCategoryKey, ShopItemKey, ShopItem } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Update selected properties of an existing shop item for a specific player.
|
|
4
|
+
* For example, { canBuy: true } to allow this player to purchase the item.
|
|
5
|
+
* Throws an error if the item does not exist.
|
|
6
|
+
*
|
|
7
|
+
* @param {PlayerId} playerId - The player to update the item for
|
|
8
|
+
* @param {ShopCategoryKey} categoryKey - The key of the category containing the item
|
|
9
|
+
* @param {ShopItemKey} itemKey - The unique key for the item
|
|
10
|
+
* @param {Partial<ShopItem>} changes - Partial shop item properties to update
|
|
11
|
+
* @returns {void}
|
|
12
|
+
*/
|
|
13
|
+
declare const updateShopItemForPlayer: (playerId: PlayerId, categoryKey: ShopCategoryKey, itemKey: ShopItemKey, changes: Partial<ShopItem>) => void;
|
|
14
|
+
export { updateShopItemForPlayer };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { Coordinate, PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export default GetBlockCoordinatesPlayerStandingOnInterface;
|
|
1
|
+
import { Coordinate, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get the co-ordinates of the blocks the player is standing on as a list. For example, if the center of the player is at 0,0,0
|
|
4
|
+
* this function will return [[0, -1, 0], [-1, -1, 0], [0, -1, -1], [-1, -1, -1]]
|
|
5
|
+
* If the player is just standing on one block, the function would return e.g. [[0, 0, 0]]
|
|
6
|
+
* If the player is middair then returns an empty list [].
|
|
7
|
+
*
|
|
8
|
+
* @param {PlayerId} playerId
|
|
9
|
+
* @returns {Coordinate[]}
|
|
10
|
+
*/
|
|
11
|
+
declare const getBlockCoordinatesPlayerStandingOn: (playerId: PlayerId) => Coordinate[];
|
|
12
|
+
export { getBlockCoordinatesPlayerStandingOn };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { BlockName, PlayerId } from "../../../type/index";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export default GetBlockTypesPlayerStandingOnInterface;
|
|
1
|
+
import { BlockName, PlayerId } from "../../../type/index";
|
|
2
|
+
/**
|
|
3
|
+
* Get the types of block the player is standing on
|
|
4
|
+
* For example, if a player is standing on 4 dirt blocks, this will return ["Dirt", "Dirt", "Dirt", "Dirt"]
|
|
5
|
+
*
|
|
6
|
+
* @param {PlayerId} playerId
|
|
7
|
+
* @returns {BlockName[]}
|
|
8
|
+
*/
|
|
9
|
+
declare const getBlockTypesPlayerStandingOn: (playerId: PlayerId) => BlockName[];
|
|
10
|
+
export { getBlockTypesPlayerStandingOn };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
export declare const StandingOnApis: {
|
|
2
|
+
getBlockCoordinatesPlayerStandingOn: (playerId: import("../../..").PlayerId) => import("../../..").Coordinate[];
|
|
3
|
+
getBlockTypesPlayerStandingOn: (playerId: import("../../..").PlayerId) => import("../../..").BlockName[];
|
|
4
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Coordinate, PlayerId } from "./type/index";
|
|
3
|
-
declare global {
|
|
4
|
-
var api:
|
|
5
|
-
var myId: PlayerId | null;
|
|
6
|
-
var thisPos: Coordinate | undefined;
|
|
7
|
-
}
|
|
8
|
-
export * from "./type/index";
|
|
9
|
-
export * from "./api-type-def/index";
|
|
1
|
+
import { Apis } from "./api-type-def/index";
|
|
2
|
+
import { Coordinate, PlayerId } from "./type/index";
|
|
3
|
+
declare global {
|
|
4
|
+
var api: typeof Apis;
|
|
5
|
+
var myId: PlayerId | null;
|
|
6
|
+
var thisPos: Coordinate | undefined;
|
|
7
|
+
}
|
|
8
|
+
export * from "./type/index";
|
|
9
|
+
export * from "./api-type-def/index";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Item } from "./
|
|
2
|
-
export type applyMeleeHitOverrides = {
|
|
3
|
-
damage?: number | null;
|
|
4
|
-
heldItemName?: Item | null;
|
|
5
|
-
horizontalKbMultiplier?: number;
|
|
6
|
-
verticalKbMultiplier?: number;
|
|
7
|
-
};
|
|
1
|
+
import { Item } from "./index";
|
|
2
|
+
export type applyMeleeHitOverrides = {
|
|
3
|
+
damage?: number | null;
|
|
4
|
+
heldItemName?: Item | null;
|
|
5
|
+
horizontalKbMultiplier?: number;
|
|
6
|
+
verticalKbMultiplier?: number;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChunkId = `${number}|${number}|${number}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Coordinate = [number, number, number];
|
|
1
|
+
export type Coordinate = [number, number, number];
|
package/dist/type/Direction.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Direcrion = [number, number, number];
|
|
1
|
+
export type Direcrion = [number, number, number];
|
package/dist/type/Health.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Health = number;
|
|
1
|
+
export type Health = number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ItemMetaInfo = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type LifeformBodyPart = "TorsoNode" | "HeadMesh" | "ArmRightMesh" | "ArmLeftMesh" | "LegLeftMesh" | "LegRightMesh";
|
|
1
|
+
export type LifeformBodyPart = "TorsoNode" | "HeadMesh" | "ArmRightMesh" | "ArmLeftMesh" | "LegLeftMesh" | "LegRightMesh";
|
package/dist/type/Party.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlayerDbId } from "
|
|
2
|
-
export type Party = {
|
|
3
|
-
partyCode: string;
|
|
4
|
-
playerDbIds: PlayerDbId[];
|
|
5
|
-
};
|
|
1
|
+
import { PlayerDbId } from "./index";
|
|
2
|
+
export type Party = {
|
|
3
|
+
partyCode: string;
|
|
4
|
+
playerDbIds: PlayerDbId[];
|
|
5
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Direcrion, EntityId, Item, LifeformBodyPart, SoundName } from "
|
|
2
|
-
export interface PlayerAttemptDamageOtherPlayerOpts {
|
|
3
|
-
eId: EntityId;
|
|
4
|
-
hitEId: EntityId;
|
|
5
|
-
attemptedDmgAmt: number;
|
|
6
|
-
withItem: Item;
|
|
7
|
-
bodyPartHit?: LifeformBodyPart;
|
|
8
|
-
attackDir?: Direcrion;
|
|
9
|
-
showCritParticles?: boolean;
|
|
10
|
-
reduceVerticalKbVelocity?: boolean;
|
|
11
|
-
horizontalKbMultiplier?: number;
|
|
12
|
-
verticalKbMultiplier?: number;
|
|
13
|
-
broadcastEntityHurt?: boolean;
|
|
14
|
-
attackCooldownSettings?: any;
|
|
15
|
-
hittingSoundOverride?: SoundName;
|
|
16
|
-
ignoreOtherEntitySettingCanAttack?: boolean;
|
|
17
|
-
isTrueDamage?: boolean;
|
|
18
|
-
damagerDbId?: string;
|
|
19
|
-
}
|
|
1
|
+
import { Direcrion, EntityId, Item, LifeformBodyPart, SoundName } from "./index";
|
|
2
|
+
export interface PlayerAttemptDamageOtherPlayerOpts {
|
|
3
|
+
eId: EntityId;
|
|
4
|
+
hitEId: EntityId;
|
|
5
|
+
attemptedDmgAmt: number;
|
|
6
|
+
withItem: Item;
|
|
7
|
+
bodyPartHit?: LifeformBodyPart;
|
|
8
|
+
attackDir?: Direcrion;
|
|
9
|
+
showCritParticles?: boolean;
|
|
10
|
+
reduceVerticalKbVelocity?: boolean;
|
|
11
|
+
horizontalKbMultiplier?: number;
|
|
12
|
+
verticalKbMultiplier?: number;
|
|
13
|
+
broadcastEntityHurt?: boolean;
|
|
14
|
+
attackCooldownSettings?: any;
|
|
15
|
+
hittingSoundOverride?: SoundName;
|
|
16
|
+
ignoreOtherEntitySettingCanAttack?: boolean;
|
|
17
|
+
isTrueDamage?: boolean;
|
|
18
|
+
damagerDbId?: string;
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ShieldAmount = number;
|
|
1
|
+
export type ShieldAmount = number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Item, LifeformId } from "
|
|
2
|
-
export type WhoDidDamage = LifeformId | {
|
|
3
|
-
lifeformId: LifeformId;
|
|
4
|
-
withItem: Item;
|
|
5
|
-
};
|
|
1
|
+
import { Item, LifeformId } from "./index";
|
|
2
|
+
export type WhoDidDamage = LifeformId | {
|
|
3
|
+
lifeformId: LifeformId;
|
|
4
|
+
withItem: Item;
|
|
5
|
+
};
|
package/dist/type/WhoKilled.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { WhoDidDamage } from "./index";
|
|
2
|
-
export type WhoKilled = WhoDidDamage;
|
|
1
|
+
import { WhoDidDamage } from "./index";
|
|
2
|
+
export type WhoKilled = WhoDidDamage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type AllBlockID = string;
|
|
1
|
+
export type AllBlockID = string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type AllBlockName = string;
|
|
1
|
+
export type AllBlockName = string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BlockId } from "./BlockId";
|
|
2
|
-
import { BlockName } from "./BlockName";
|
|
3
|
-
export type Block = BlockId | BlockName;
|
|
1
|
+
import { BlockId } from "./BlockId";
|
|
2
|
+
import { BlockName } from "./BlockName";
|
|
3
|
+
export type Block = BlockId | BlockName;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
import { AllBlockName } from "./AllBlockName";
|
|
2
|
-
|
|
3
|
-
export type BlockName = AllBlockName & {
|
|
4
|
-
readonly [BlockNameSymbol]: "BlockName";
|
|
5
|
-
};
|
|
6
|
-
export {};
|
|
1
|
+
import { AllBlockName } from "./AllBlockName";
|
|
2
|
+
export type BlockName = AllBlockName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from "./AllBlockId";
|
|
2
|
-
export * from "./AllBlockName";
|
|
3
|
-
export * from "./Block";
|
|
4
|
-
export * from "./BlockId";
|
|
5
|
-
export * from "./BlockName";
|
|
1
|
+
export * from "./AllBlockId";
|
|
2
|
+
export * from "./AllBlockName";
|
|
3
|
+
export * from "./Block";
|
|
4
|
+
export * from "./BlockId";
|
|
5
|
+
export * from "./BlockName";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RGB array (0 - 255)
|
|
3
|
-
* [0 - 255,0 - 255,0 - 255]
|
|
4
|
-
* @example
|
|
5
|
-
* red is [255,0,0]
|
|
6
|
-
* green is [0,255,0]
|
|
7
|
-
*/
|
|
8
|
-
export type Array255Color = [number, number, number];
|
|
1
|
+
/**
|
|
2
|
+
* RGB array (0 - 255)
|
|
3
|
+
* [0 - 255,0 - 255,0 - 255]
|
|
4
|
+
* @example
|
|
5
|
+
* red is [255,0,0]
|
|
6
|
+
* green is [0,255,0]
|
|
7
|
+
*/
|
|
8
|
+
export type Array255Color = [number, number, number];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RGBA array (0 - 255)
|
|
3
|
-
*
|
|
4
|
-
* [0 - 255,0 - 255,0 - 255,0 - 1]
|
|
5
|
-
* @example
|
|
6
|
-
* red is [255,0,0,1]
|
|
7
|
-
*
|
|
8
|
-
* water is like [0,255,0,0.5]
|
|
9
|
-
*/
|
|
10
|
-
export type Array255ColorWithA = [number, number, number, number];
|
|
1
|
+
/**
|
|
2
|
+
* RGBA array (0 - 255)
|
|
3
|
+
*
|
|
4
|
+
* [0 - 255,0 - 255,0 - 255,0 - 1]
|
|
5
|
+
* @example
|
|
6
|
+
* red is [255,0,0,1]
|
|
7
|
+
*
|
|
8
|
+
* water is like [0,255,0,0.5]
|
|
9
|
+
*/
|
|
10
|
+
export type Array255ColorWithA = [number, number, number, number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* this type is color.
|
|
3
|
-
* allow all css color type.
|
|
4
|
-
* @example
|
|
5
|
-
* `#ff0000` | `rgb(255,0,0)` | `red` | `Red` | `#f00` | `rgba(255,0,0,1)` | `hsl(0,100%,50%)` | `hsla(0,100%,50%,1)` is all red
|
|
6
|
-
*/
|
|
7
|
-
export type StringColor = `#${string}` | `rgb(${string})` | `rgba(${string})` | `hsl(${string})` | `hsla(${string})` | `hwb(${string})` | `lab(${string})` | `lch(${string})` | `oklab(${string})` | `oklch(${string})` | `color(${string})` | "currentColor" | "transparent" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen" | string;
|
|
1
|
+
/**
|
|
2
|
+
* this type is color.
|
|
3
|
+
* allow all css color type.
|
|
4
|
+
* @example
|
|
5
|
+
* `#ff0000` | `rgb(255,0,0)` | `red` | `Red` | `#f00` | `rgba(255,0,0,1)` | `hsl(0,100%,50%)` | `hsla(0,100%,50%,1)` is all red
|
|
6
|
+
*/
|
|
7
|
+
export type StringColor = `#${string}` | `rgb(${string})` | `rgba(${string})` | `hsl(${string})` | `hsla(${string})` | `hwb(${string})` | `lab(${string})` | `lch(${string})` | `oklab(${string})` | `oklch(${string})` | `color(${string})` | "currentColor" | "transparent" | "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen" | string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./Array255Color";
|
|
2
|
-
export * from "./Array255ColorWithA";
|
|
3
|
-
export * from "./StringColor";
|
|
1
|
+
export * from "./Array255Color";
|
|
2
|
+
export * from "./Array255ColorWithA";
|
|
3
|
+
export * from "./StringColor";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./PlayerDbId";
|
|
1
|
+
export * from "./PlayerDbId";
|
package/dist/type/id/Id.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MobId } from "./MobId";
|
|
2
|
-
import { PlayerId } from "./PlayerId";
|
|
3
|
-
export type LifeformId = PlayerId | MobId;
|
|
1
|
+
import { MobId } from "./MobId";
|
|
2
|
+
import { PlayerId } from "./PlayerId";
|
|
3
|
+
export type LifeformId = PlayerId | MobId;
|
package/dist/type/id/MobId.d.ts
CHANGED
package/dist/type/id/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from "./EntityId";
|
|
2
|
-
export * from "./Id";
|
|
3
|
-
export * from "./LifeFormId";
|
|
4
|
-
export * from "./MobId";
|
|
5
|
-
export * from "./PlayerId";
|
|
1
|
+
export * from "./EntityId";
|
|
2
|
+
export * from "./Id";
|
|
3
|
+
export * from "./LifeFormId";
|
|
4
|
+
export * from "./MobId";
|
|
5
|
+
export * from "./PlayerId";
|
|
6
|
+
export * from "./ItemEntityId";
|