This commit is contained in:
2024-08-21 16:15:22 +02:00
parent cd5f473460
commit 35af9ffc97
38 changed files with 1122 additions and 1090 deletions

View File

@@ -5,44 +5,13 @@ import { vector3 } from "./Commandeer/utils/vectorUtils";
import { delay } from "./Commandeer/utils/waitUtil";
import { MinecraftBlockTypes } from "./vanilla-data/mojang-block";
// const triggerManager = new CCTrigger.Manager(mindKeeper);
function doNothingStupidTSIWantFilesNotAGiantAssMainFile() {
triggerManager.RegisterFunctionTrigger("helpme", (event) => {
world.sendMessage("Wow, this is a trigger :O");
world.sendMessage("This was caused by " + event.player.name);
});
triggerManager.RegisterFunctionTrigger("test", (event) => {
world.sendMessage("Wow, this is a trigger :O");
world.sendMessage("This was caused by " + event.player.name);
});
triggerManager.RegisterFunctionTrigger("lightPath", (event) => {
lightUpPath();
});
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");
let pos1 = vector3(2467, 9, 87);
let pos2 = vector3(2468, 9, 105);
for (let z = pos2.z; z >= pos1.z; z--) {
let volume: BlockVolume = new BlockVolume(vector3(pos1.x, pos1.y, z), vector3(pos1.x + 1, pos1.y, z));
overworld.fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
await delay(4);
}
// let pos2 = vector3(2468, 9, 105);
return;
}
async function resetLightPath() {
world.getDimension("overworld").runCommand("/fill 2467 9 87 2468 9 105 air");
}
export { doNothingStupidTSIWantFilesNotAGiantAssMainFile };