Skip to content

Commit

Permalink
Upload generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
jayly-bot authored Aug 20, 2023
1 parent fee8861 commit ce0e5df
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 52 deletions.
26 changes: 13 additions & 13 deletions legacyPackages.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"packages": [
"chat-rank",
"dimensions",
"get-scores",
"is-host",
"is-operator",
"lz-string",
"remove-permission",
"run-command-async",
"set-permission",
"shopui"
]
}
"packages": [
"chat-rank",
"dimensions",
"get-scores",
"is-host",
"is-operator",
"lz-string",
"remove-permission",
"run-command-async",
"set-permission",
"shopui"
]
}
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "script-api",
"description": "this repository is filled with community driven scripts for Minecraft scripting",
"version": "1.0.0",
"scripts": {
"test": "tsc",
"build": "tsc --build",
"tools": "cd tools && tsc",
"ci": "cd scripts && tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/JaylyDev/ScriptAPI.git"
},
"keywords": [],
"license": "MIT",
"bugs": {
"url": "https://github.com/JaylyDev/ScriptAPI/issues"
},
"homepage": "https://github.com/JaylyDev/ScriptAPI#readme",
"dependencies": {
"@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.10",
"@types/parsimmon": "^1.10.6",
"axios": "^1.4.0",
"parsimmon": "^1.18.1",
"typescript": "^5.1.6"
}
"name": "script-api",
"description": "this repository is filled with community driven scripts for Minecraft scripting",
"version": "1.0.0",
"scripts": {
"test": "tsc",
"build": "tsc --build",
"tools": "cd tools && tsc",
"ci": "cd scripts && tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/JaylyDev/ScriptAPI.git"
},
"keywords": [],
"license": "MIT",
"bugs": {
"url": "https://github.com/JaylyDev/ScriptAPI/issues"
},
"homepage": "https://github.com/JaylyDev/ScriptAPI#readme",
"dependencies": {
"@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.10",
"@types/parsimmon": "^1.10.6",
"axios": "^1.4.0",
"parsimmon": "^1.18.1",
"typescript": "^5.1.6"
}
}
7 changes: 4 additions & 3 deletions scripts/spawn-simulated-player/tests.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { world, MinecraftItemTypes, ItemStack, } from "@minecraft/server";
import { world, 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 ce0e5df

Please sign in to comment.