Skip to content

Commit

Permalink
Starting 1.20.30 (#299)
Browse files Browse the repository at this point in the history
* Update package.json and package-lock.json

* Update tests.ts

---------

Co-authored-by: bot174 <91819282+bot174@users.noreply.github.com>
  • Loading branch information
jayly-bot and bot174 authored Aug 12, 2023
1 parent be58749 commit eb5dffc
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 75 deletions.
128 changes: 64 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 4 additions & 3 deletions scripts/spawn-simulated-player/tests.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import {
world,
MinecraftItemTypes,
ItemStack,
} from "@minecraft/server";
import { MinecraftEffectTypes } from "@minecraft/vanilla-data";
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();
});

0 comments on commit eb5dffc

Please sign in to comment.