CDN Links
A list of links related to Minecraft Script API assets. I will do my best to keep this list up to date as I continue to find useful content.
Minecraft Math Library Mirror
Minified versions of @minecraft/math module are available at:
https://jaylydev.github.io/scriptapi-docs/assets/meta/math/latest/minecraft-math.js
USAGE
// file is saved as scripts/minecraft-math.js
import { Vector3Builder } from "minecraft-math.js";
const vec3 = new Vector3Builder(0, 1, 0);
https://jaylydev.github.io/scriptapi-docs/assets/meta/math/latest/minecraft-math.d.tsSave this file in the same directory as
minecraft-math.jsto get type definition for VSCode.https://jaylydev.github.io/scriptapi-docs/assets/meta/math/latest/minecraft-math.js.map
Minecraft Vanilla Data Mirror
Minified versions of @minecraft/vanilla-data module are available at:
lib/index.js(latest)https://jaylydev.github.io/scriptapi-docs/assets/meta/vanilla-data/latest/index.jslib/index.js(preview)https://jaylydev.github.io/scriptapi-docs/assets/meta/vanilla-data/preview/index.js
USAGE
// file is saved as scripts/minecraft-vanilla-data.js
import { MinecraftBlockTypes } from "minecraft-vanilla-data.js";
MinecraftBlockTypes.DiamondBlock;
Minecraft Gameplay Utilities Mirror
Minified versions of @minecraft/gameplay-utilities module are available at:
dist/minecraft-gameplay-utilities.jshttps://jaylydev.github.io/scriptapi-docs/assets/meta/gameplay-utilities/latest/minecraft-gameplay-utilities.js
USAGE
// file is saved as scripts/minecraft-gameplay-utilities.js
import { EventPromise, nextEvent } from "minecraft-gameplay-utilities.js";
// handle buttonPush event through async/await
await function handleButton() {
let buttonPushEvent = await nextEvent(world.afterEvents.buttonPush);
let eventLoc = await buttonPushEvent.block.location;
log("Button pushed");
}
// handle leverAction event as promise
await nextEvent(world.afterEvents.leverAction).then(
(event) => {
// do something with the event
}).finally(() => {
// something else to do
});
// You can optionally provide filters for the signal and
// use a helper function.
const creeperDeathEvent = await nextEvent(
world.afterEvents.entityDie, { entityTypes: ['minecraft:creeper'] }
);
dist/minecraft-gameplay-utilities.d.tshttps://jaylydev.github.io/scriptapi-docs/assets/meta/gameplay-utilities/latest/minecraft-gameplay-utilities.d.tsSave this file in the same directory as
minecraft-gameplay-utilities.jsto get type definition for VSCode.dist/minecraft-gameplay-utilities.js.maphttps://jaylydev.github.io/scriptapi-docs/assets/meta/gameplay-utilities/latest/minecraft-gameplay-utilities.js.map