diff --git a/package-lock.json b/package-lock.json index 027ae97d..42e152e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,17 +9,17 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@minecraft/server": "1.5.0-beta.1.20.20-preview.23", - "@minecraft/server-admin": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-editor": "0.1.0-beta.1.20.20-preview.23", - "@minecraft/server-gametest": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-net": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-ui": "1.2.0-beta.1.20.20-preview.23", - "@minecraft/vanilla-data": "1.20.20-preview.22" + "@minecraft/server": "1.6.0-beta.1.20.30-preview.21", + "@minecraft/server-admin": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-editor": "0.1.0-beta.1.20.30-preview.21", + "@minecraft/server-gametest": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-net": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-ui": "1.2.0-beta.1.20.30-preview.21", + "@minecraft/vanilla-data": "1.20.30-preview.21" }, "devDependencies": { "@npm/types": "^1.0.2", - "@types/node": "^20.4.5", + "@types/node": "^20.4.10", "@types/parsimmon": "^1.10.6", "axios": "^1.4.0", "parsimmon": "^1.18.1", @@ -33,51 +33,51 @@ "license": "MIT" }, "node_modules/@minecraft/server": { - "version": "1.5.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.5.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-QWMhxw6oBbq20+MELpqEUp3nZqINByFM5xvVjYZHSFduBAq4qZ/fJLyNX6g+jEQJLrAs7qDw1Iz3vrUrvAhEaA==" + "version": "1.6.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.6.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-HSWXTyIf0Kf8Z4FBMQrSD/Z2cfeu6fIlUcBo2YUUA1mMAMg5oznc8prRmpmJWY+HYqsNqxfCF0NiU8ZsHQfiMg==" }, "node_modules/@minecraft/server-admin": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-admin/-/server-admin-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-wRj51+3XUi8n6LJPt5c9MbRI8eulyOx/kVl8MA6WES30twwPrRZ4YZ5UVyYUtTpCG8IYrg8Tz/bgg5RmDRx3AQ==" + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-admin/-/server-admin-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-+DhVUh+H7IrB6tN6IfzI+c6lI1T5sfbKcJOSHBkT6bXiQxgbEfOjJvF/9TDUnkkdUBpwBYtXjyYU+e6dlSPfaQ==" }, "node_modules/@minecraft/server-editor": { - "version": "0.1.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-editor/-/server-editor-0.1.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-OHCLz9lp8v39OR/+LQLx5sfublVPFLi+dGie2VqAfvgqf8UaqrF3k8+GeMO7XLpHNbL+PddsLCr5pCwgs1s5AA==", + "version": "0.1.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-editor/-/server-editor-0.1.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-SUAfnapiO3hAOanYRUK6VrT5W1QKJvXhjvmkOppxiImamaCp9+JuHASapTT+2AiW0JJAxL3eti2HRfav7RNHyQ==", "dependencies": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "node_modules/@minecraft/server-gametest": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-gametest/-/server-gametest-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-6GaPPj1Z7H41VOGbmKf+D+AKH3rY/WDCbodyVPWwweihjQUpdutRcpkCJVyMvBz+rdHqg9LPp0+ZmtI3F7KXZQ==", + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-gametest/-/server-gametest-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-hlvWkHcavgJFEd36MQTRJENzmBYYcIwS5DxMIdY3JDVBD/SdyJxzfXUF+K95UIyPCmCs5bhQRu1fB2R0FrClnA==", "dependencies": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "node_modules/@minecraft/server-net": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-net/-/server-net-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-rl2W79vzseHw5vEjtQBv2gdIrafSbz8qu4ZatC1j5v79ojwlVOmOS7IHpb6/jQS46FbUmrfqqn3MN32kiogJJw==", + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-net/-/server-net-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-23NKG+3XYLjgidU4S2ObUenteemuAJNe8k/uxwF4GKkNsIeeHvTMbzy7yMETwrvzCyFpiov0O4Yu+e6iVg5mSQ==", "dependencies": { - "@minecraft/server-admin": "^1.0.0-beta.1.20.20-preview.23" + "@minecraft/server-admin": "^1.0.0-beta.1.20.30-preview.21" } }, "node_modules/@minecraft/server-ui": { - "version": "1.2.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-aUL/S5gjGu2UqjXm2ztDK7zmCE/xArwNuwq2Tw2NUyqwbuyqohs1jxY/nue4qGiDSOhP1EYrfSTBXLVYboJCNw==", + "version": "1.2.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-bvDVjIah6lswt3mAu3K/O1C6Mie7Y9GcdYc9Ny91gnYRbpCpR3E33GYxyzo0kSHaW1rKET49V6z8/zykIdLHZg==", "dependencies": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "node_modules/@minecraft/vanilla-data": { - "version": "1.20.20-preview.22", - "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.20-preview.22.tgz", - "integrity": "sha512-MAgLd/mldpbIsFeeMQaPFiHaVcKYJU0QoQaelrBvJ7CA7s0B50U7T4foDfoddGiPdYxZka8gDKUJgUnCqbsQgQ==" + "version": "1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.30-preview.21.tgz", + "integrity": "sha512-jwnSNT3eVdWkJf6ABXZ6jOZyB0TEOWDyAVE9ieOOJQxMh4OTf7T51mgXmMXLluSVgYiquQEoEGcIGM2P3Hzi+A==" }, "node_modules/@npm/types": { "version": "1.0.2", @@ -86,9 +86,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.4.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", - "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==", + "version": "20.4.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.10.tgz", + "integrity": "sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==", "dev": true }, "node_modules/@types/parsimmon": { @@ -218,51 +218,51 @@ }, "dependencies": { "@minecraft/server": { - "version": "1.5.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.5.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-QWMhxw6oBbq20+MELpqEUp3nZqINByFM5xvVjYZHSFduBAq4qZ/fJLyNX6g+jEQJLrAs7qDw1Iz3vrUrvAhEaA==" + "version": "1.6.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server/-/server-1.6.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-HSWXTyIf0Kf8Z4FBMQrSD/Z2cfeu6fIlUcBo2YUUA1mMAMg5oznc8prRmpmJWY+HYqsNqxfCF0NiU8ZsHQfiMg==" }, "@minecraft/server-admin": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-admin/-/server-admin-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-wRj51+3XUi8n6LJPt5c9MbRI8eulyOx/kVl8MA6WES30twwPrRZ4YZ5UVyYUtTpCG8IYrg8Tz/bgg5RmDRx3AQ==" + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-admin/-/server-admin-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-+DhVUh+H7IrB6tN6IfzI+c6lI1T5sfbKcJOSHBkT6bXiQxgbEfOjJvF/9TDUnkkdUBpwBYtXjyYU+e6dlSPfaQ==" }, "@minecraft/server-editor": { - "version": "0.1.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-editor/-/server-editor-0.1.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-OHCLz9lp8v39OR/+LQLx5sfublVPFLi+dGie2VqAfvgqf8UaqrF3k8+GeMO7XLpHNbL+PddsLCr5pCwgs1s5AA==", + "version": "0.1.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-editor/-/server-editor-0.1.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-SUAfnapiO3hAOanYRUK6VrT5W1QKJvXhjvmkOppxiImamaCp9+JuHASapTT+2AiW0JJAxL3eti2HRfav7RNHyQ==", "requires": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "@minecraft/server-gametest": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-gametest/-/server-gametest-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-6GaPPj1Z7H41VOGbmKf+D+AKH3rY/WDCbodyVPWwweihjQUpdutRcpkCJVyMvBz+rdHqg9LPp0+ZmtI3F7KXZQ==", + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-gametest/-/server-gametest-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-hlvWkHcavgJFEd36MQTRJENzmBYYcIwS5DxMIdY3JDVBD/SdyJxzfXUF+K95UIyPCmCs5bhQRu1fB2R0FrClnA==", "requires": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "@minecraft/server-net": { - "version": "1.0.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-net/-/server-net-1.0.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-rl2W79vzseHw5vEjtQBv2gdIrafSbz8qu4ZatC1j5v79ojwlVOmOS7IHpb6/jQS46FbUmrfqqn3MN32kiogJJw==", + "version": "1.0.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-net/-/server-net-1.0.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-23NKG+3XYLjgidU4S2ObUenteemuAJNe8k/uxwF4GKkNsIeeHvTMbzy7yMETwrvzCyFpiov0O4Yu+e6iVg5mSQ==", "requires": { - "@minecraft/server-admin": "^1.0.0-beta.1.20.20-preview.23" + "@minecraft/server-admin": "^1.0.0-beta.1.20.30-preview.21" } }, "@minecraft/server-ui": { - "version": "1.2.0-beta.1.20.20-preview.23", - "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.20-preview.23.tgz", - "integrity": "sha512-aUL/S5gjGu2UqjXm2ztDK7zmCE/xArwNuwq2Tw2NUyqwbuyqohs1jxY/nue4qGiDSOhP1EYrfSTBXLVYboJCNw==", + "version": "1.2.0-beta.1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/server-ui/-/server-ui-1.2.0-beta.1.20.30-preview.21.tgz", + "integrity": "sha512-bvDVjIah6lswt3mAu3K/O1C6Mie7Y9GcdYc9Ny91gnYRbpCpR3E33GYxyzo0kSHaW1rKET49V6z8/zykIdLHZg==", "requires": { - "@minecraft/server": "^1.5.0-beta.1.20.20-preview.23" + "@minecraft/server": "^1.6.0-beta.1.20.30-preview.21" } }, "@minecraft/vanilla-data": { - "version": "1.20.20-preview.22", - "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.20-preview.22.tgz", - "integrity": "sha512-MAgLd/mldpbIsFeeMQaPFiHaVcKYJU0QoQaelrBvJ7CA7s0B50U7T4foDfoddGiPdYxZka8gDKUJgUnCqbsQgQ==" + "version": "1.20.30-preview.21", + "resolved": "https://registry.npmjs.org/@minecraft/vanilla-data/-/vanilla-data-1.20.30-preview.21.tgz", + "integrity": "sha512-jwnSNT3eVdWkJf6ABXZ6jOZyB0TEOWDyAVE9ieOOJQxMh4OTf7T51mgXmMXLluSVgYiquQEoEGcIGM2P3Hzi+A==" }, "@npm/types": { "version": "1.0.2", @@ -271,9 +271,9 @@ "dev": true }, "@types/node": { - "version": "20.4.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", - "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==", + "version": "20.4.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.10.tgz", + "integrity": "sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==", "dev": true }, "@types/parsimmon": { diff --git a/package.json b/package.json index 53b95434..4debb3cf 100644 --- a/package.json +++ b/package.json @@ -19,17 +19,17 @@ }, "homepage": "https://github.com/JaylyDev/ScriptAPI#readme", "dependencies": { - "@minecraft/server": "1.5.0-beta.1.20.20-preview.23", - "@minecraft/server-admin": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-editor": "0.1.0-beta.1.20.20-preview.23", - "@minecraft/server-gametest": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-net": "1.0.0-beta.1.20.20-preview.23", - "@minecraft/server-ui": "1.2.0-beta.1.20.20-preview.23", - "@minecraft/vanilla-data": "1.20.20-preview.22" + "@minecraft/server": "1.6.0-beta.1.20.30-preview.21", + "@minecraft/server-admin": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-editor": "0.1.0-beta.1.20.30-preview.21", + "@minecraft/server-gametest": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-net": "1.0.0-beta.1.20.30-preview.21", + "@minecraft/server-ui": "1.2.0-beta.1.20.30-preview.21", + "@minecraft/vanilla-data": "1.20.30-preview.21" }, "devDependencies": { "@npm/types": "^1.0.2", - "@types/node": "^20.4.5", + "@types/node": "^20.4.10", "@types/parsimmon": "^1.10.6", "axios": "^1.4.0", "parsimmon": "^1.18.1", diff --git a/scripts/spawn-simulated-player/tests.ts b/scripts/spawn-simulated-player/tests.ts index 5755124e..af7e14eb 100644 --- a/scripts/spawn-simulated-player/tests.ts +++ b/scripts/spawn-simulated-player/tests.ts @@ -1,6 +1,5 @@ import { world, - MinecraftItemTypes, ItemStack, } from "@minecraft/server"; import { MinecraftEffectTypes } from "@minecraft/vanilla-data"; @@ -8,12 +7,14 @@ import { SpawnSimulatedPlayer } from "./index.js"; let host = [...world.getPlayers()][0]; +const money = world.scoreboard.getObjective("money") ?? world.scoreboard.addObjective("money", "money"); + SpawnSimulatedPlayer(host, function (simulatedPlayer) { simulatedPlayer.addEffect(MinecraftEffectTypes.Absorption, 1); simulatedPlayer.attack(); simulatedPlayer.dimension.createExplosion(simulatedPlayer.location, 5); - simulatedPlayer.giveItem(new ItemStack(MinecraftItemTypes.acaciaBoat)); - simulatedPlayer.runCommandAsync("scoreboard players add @s money 1"); + simulatedPlayer.giveItem(new ItemStack("minecraft:acacia_boat")); + money.addScore(simulatedPlayer, 1); simulatedPlayer.teleport({ x: 0, y: 0, z: 0 }, { dimension: simulatedPlayer.dimension, rotation: { x: 0, y: 0 }}); simulatedPlayer.despawn(); });