feat: Add cracked glass block and texture

Added the cracked glass block and its corresponding texture to the resource packs. Also made changes to the maker.ts file to include a save operation. Additionally, added a new behavior pack for the cracked glass block with specific properties. Updated the vectorUtils.ts file to include a new function for converting a Vector3 object to a command string. Finally, made changes to the triggers.ts file to register new triggers and update existing ones.
This commit is contained in:
Bram Verhulst
2024-07-05 14:14:17 +02:00
parent 67af73c6b5
commit ba384d79d8
13 changed files with 697 additions and 129 deletions

View File

@@ -1,9 +1,10 @@
import { Dimension, MinecraftBlockTypes, world } from "@minecraft/server";
import { CCTrigger } from "./Commandeer/Trigger/CCTrigger";
import { mindKeeper } from "./main";
import { mindKeeper, triggerManager } from "./main";
import { vector3 } from "./Commandeer/utils/vectorUtils";
import { delay } from "./Commandeer/utils/waitUtil";
const triggerManager = new CCTrigger.Manager(mindKeeper);
// const triggerManager = new CCTrigger.Manager(mindKeeper);
triggerManager.RegisterFunctionTrigger("test", (event) => {
world.sendMessage("Wow, this is a trigger :O");
@@ -18,6 +19,15 @@ triggerManager.RegisterFunctionTrigger("resetPath", (event) => {
resetLightPath();
});
triggerManager.RegisterFunctionTrigger("test2", (event) => {
world.sendMessage("Wow, this is another trigger :O");
});
triggerManager.RegisterFunctionTrigger("die", (event) => {
world.sendMessage("You died");
event.player.applyDamage(1000);
});
//fill 2467 9 87 2468 9 105 redstone_block
async function lightUpPath() {
let overworld: Dimension = world.getDimension("overworld");
@@ -34,12 +44,3 @@ async function lightUpPath() {
async function resetLightPath() {
world.getDimension("overworld").runCommand("/fill 2467 9 87 2468 9 105 air");
}
triggerManager.RegisterFunctionTrigger("test2", (event) => {
world.sendMessage("Wow, this is another trigger :O");
});
triggerManager.RegisterFunctionTrigger("die", (event) => {
world.sendMessage("You died");
event.player.applyDamage(1000);
});