version without npcs, levels work, everything is build
18
behavior_packs/items/chainsaw.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.20.13",
|
||||||
|
"minecraft:item": {
|
||||||
|
"description": {
|
||||||
|
"identifier": "cc:chainsaw",
|
||||||
|
"menu_category": {
|
||||||
|
"category": "items",
|
||||||
|
"is_hidden_in_commands": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"minecraft:max_stack_size": 1,
|
||||||
|
"minecraft:icon": {
|
||||||
|
"texture": "cc.chainsaw"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
behavior_packs/items/drill.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.20.13",
|
||||||
|
"minecraft:item": {
|
||||||
|
"description": {
|
||||||
|
"identifier": "cc:drill",
|
||||||
|
"menu_category": {
|
||||||
|
"category": "items",
|
||||||
|
"is_hidden_in_commands": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"minecraft:max_stack_size": 1,
|
||||||
|
"minecraft:icon": {
|
||||||
|
"texture": "cc.drill"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,6 +10,8 @@ message.level.incorrect.subtext=Probeer opnieuw!
|
|||||||
message.level.outofbounds=§cOut of bounds!§b
|
message.level.outofbounds=§cOut of bounds!§b
|
||||||
message.level.outofbounds.subtext=You can't be over water!
|
message.level.outofbounds.subtext=You can't be over water!
|
||||||
|
|
||||||
|
item.cc:chainsaw=Chainsaw
|
||||||
|
item.cc:drill=Drill
|
||||||
|
|
||||||
## npc names
|
## npc names
|
||||||
npc.name.help=Help
|
npc.name.help=Help
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 107 B |
|
Before Width: | Height: | Size: 107 B |
BIN
resource_packs/textures/blocks/wool_colored_blue.png
Normal file
|
After Width: | Height: | Size: 483 B |
BIN
resource_packs/textures/blocks/wool_colored_green.png
Normal file
|
After Width: | Height: | Size: 468 B |
BIN
resource_packs/textures/blocks/wool_colored_red.png
Normal file
|
After Width: | Height: | Size: 623 B |
BIN
resource_packs/textures/blocks/wool_colored_yellow.png
Normal file
|
After Width: | Height: | Size: 576 B |
12
resource_packs/textures/item_texture.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"resource_pack_name": "cc",
|
||||||
|
"texture_name": "atlas.items",
|
||||||
|
"texture_data": {
|
||||||
|
"cc.drill": {
|
||||||
|
"textures": "textures/items/drill"
|
||||||
|
},
|
||||||
|
"cc.chainsaw": {
|
||||||
|
"textures": "textures/items/chainsaw"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
resource_packs/textures/items/chainsaw.png
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
resource_packs/textures/items/drill.png
Normal file
|
After Width: | Height: | Size: 446 B |
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"texture_name": "atlas.terrain",
|
|
||||||
"resource_pack_name": "cc",
|
|
||||||
"padding": 8,
|
|
||||||
"num_mip_levels": 4,
|
|
||||||
"texture_data": {
|
|
||||||
"cracked_glass": {
|
|
||||||
"textures": "textures/blocks/cracked_glass"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
import { BlockType, BlockTypes, EntityInventoryComponent, Player, Vector3, world } from "@minecraft/server";
|
import {
|
||||||
|
BlockType,
|
||||||
|
BlockTypes,
|
||||||
|
BlockVolume,
|
||||||
|
EntityInventoryComponent,
|
||||||
|
Player,
|
||||||
|
Vector3,
|
||||||
|
world,
|
||||||
|
} from "@minecraft/server";
|
||||||
import Level from "../../Commandeer/level/level";
|
import Level from "../../Commandeer/level/level";
|
||||||
import pupeteer from "../../Commandeer/pupeteer";
|
import pupeteer from "../../Commandeer/pupeteer";
|
||||||
import { teleportAgent, isAgentAt, getAgentLocation, getAgent } from "../../Commandeer/utils/agentUtils";
|
import { teleportAgent, isAgentAt, getAgentLocation, getAgent } from "../../Commandeer/utils/agentUtils";
|
||||||
@@ -51,6 +59,9 @@ let toolBlocks = [
|
|||||||
MinecraftBlockTypes.BlueWool,
|
MinecraftBlockTypes.BlueWool,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let noDrillYet = true;
|
||||||
|
let noChainsawYet = true;
|
||||||
|
|
||||||
const level1ResetCommandBlockPos: Vector3 = vector3(56, 68, 211);
|
const level1ResetCommandBlockPos: Vector3 = vector3(56, 68, 211);
|
||||||
const level1: Level = new Level(
|
const level1: Level = new Level(
|
||||||
() => {
|
() => {
|
||||||
@@ -84,6 +95,20 @@ const level1: Level = new Level(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let drillBlock = world.getDimension("overworld").getBlock(vector3(-75, 68, 268));
|
||||||
|
if (drillBlock?.type.id == MinecraftBlockTypes.Air && noDrillYet) {
|
||||||
|
noDrillYet = false;
|
||||||
|
let volume: BlockVolume = new BlockVolume(vector3(-70, 71, 285), vector3(-70, 71, 285));
|
||||||
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
let chainsawBlock = world.getDimension("overworld").getBlock(vector3(-79, 68, 264));
|
||||||
|
if (chainsawBlock?.type.id == MinecraftBlockTypes.Air && noChainsawYet) {
|
||||||
|
noChainsawYet = false;
|
||||||
|
let volume: BlockVolume = new BlockVolume(vector3(-69, 71, 285), vector3(-69, 71, 285));
|
||||||
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
|
}
|
||||||
|
|
||||||
for (let i = 0; i < flowerPositions.length; i++) {
|
for (let i = 0; i < flowerPositions.length; i++) {
|
||||||
let block = world.getDimension("overworld").getBlock(flowerPositions[i]);
|
let block = world.getDimension("overworld").getBlock(flowerPositions[i]);
|
||||||
if (block?.type.id == MinecraftBlockTypes.BlueOrchid) {
|
if (block?.type.id == MinecraftBlockTypes.BlueOrchid) {
|
||||||
@@ -114,11 +139,13 @@ const level1: Level = new Level(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isOutOfBounds) {
|
if (isOutOfBounds) {
|
||||||
|
teleportAndFaceAgent(level1StartPosition, vector3(-84, 69, 272));
|
||||||
|
|
||||||
pupeteer.sendWorldMessage("%message.level1.outOfBounds");
|
pupeteer.sendWorldMessage("%message.level1.outOfBounds");
|
||||||
pupeteer.setTitleTimed("%message.level1.outOfBounds", 2.5);
|
pupeteer.setTitleTimed("%message.level1.outOfBounds", 2.5);
|
||||||
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
||||||
world.getDimension("Overworld").runCommand("/fill -74 69 272 -83 69 259 air replace blue_orchid");
|
|
||||||
|
|
||||||
|
world.getDimension("Overworld").runCommand("/fill -74 69 272 -83 69 259 air replace blue_orchid");
|
||||||
toolPositions = [vector3(-75, 68, 268), vector3(-77, 68, 266), vector3(-79, 68, 264), vector3(-81, 68, 262)];
|
toolPositions = [vector3(-75, 68, 268), vector3(-77, 68, 266), vector3(-79, 68, 264), vector3(-81, 68, 262)];
|
||||||
for (let i = 0; i < toolPositions.length; i++) {
|
for (let i = 0; i < toolPositions.length; i++) {
|
||||||
let blockToReplace = world.getDimension("overworld").getBlock(toolPositions[i]);
|
let blockToReplace = world.getDimension("overworld").getBlock(toolPositions[i]);
|
||||||
@@ -127,8 +154,6 @@ const level1: Level = new Level(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
teleportAndFaceAgent(level1StartPosition, vector3(-84, 69, 272));
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
} else if (isComplete) {
|
} else if (isComplete) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -49,13 +49,14 @@ const level2: Level = new Level(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isOutOfBounds) {
|
if (isOutOfBounds) {
|
||||||
|
teleportAndFaceAgent(level2StartPosition, vector3(-125, 69, 272));
|
||||||
|
|
||||||
pupeteer.sendWorldMessage("%message.level2.outOfBounds");
|
pupeteer.sendWorldMessage("%message.level2.outOfBounds");
|
||||||
pupeteer.setTitleTimed("%message.level2.outOfBounds", 2.5);
|
pupeteer.setTitleTimed("%message.level2.outOfBounds", 2.5);
|
||||||
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
||||||
world.getDimension("Overworld").runCommand("/fill -111 69 272 -124 69 258 air replace sweet_berry_bush");
|
world.getDimension("Overworld").runCommand("/fill -111 69 272 -124 69 258 air replace sweet_berry_bush");
|
||||||
world.getDimension("Overworld").runCommand("/fill -111 69 272 -124 69 258 air replace jungle_sapling");
|
world.getDimension("Overworld").runCommand("/fill -111 69 272 -124 69 258 air replace jungle_sapling");
|
||||||
|
|
||||||
teleportAndFaceAgent(level2StartPosition, vector3(-125, 69, 272));
|
|
||||||
return false;
|
return false;
|
||||||
} else if (isComplete) {
|
} else if (isComplete) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -53,14 +53,16 @@ const level3: Level = new Level(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isOutOfBounds) {
|
if (isOutOfBounds) {
|
||||||
|
teleportAndFaceAgent(level3StartPosition, vector3(-148, 68, 265));
|
||||||
|
|
||||||
pupeteer.sendWorldMessage("%message.level3.outOfBounds");
|
pupeteer.sendWorldMessage("%message.level3.outOfBounds");
|
||||||
pupeteer.setTitleTimed("%message.level3.outOfBounds", 2.5);
|
pupeteer.setTitleTimed("%message.level3.outOfBounds", 2.5);
|
||||||
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
||||||
world.getDimension("Overworld").runCommand("/fill -133 68 272 -148 68 258 air replace sweet_berry_bush");
|
world.getDimension("Overworld").runCommand("/fill -133 68 272 -148 68 258 air replace sweet_berry_bush");
|
||||||
world.getDimension("Overworld").runCommand("/fill -133 67 272 -148 67 258 magma replace cobblestone");
|
world.getDimension("Overworld").runCommand("/fill -133 67 272 -148 67 258 magma replace cobblestone");
|
||||||
world.getDimension("overworld").runCommand("/execute at @e[tag=KillingPandas] run kill @e[type=panda, r=10]");
|
let volume: BlockVolume = new BlockVolume(vector3(-131, 69, 284), vector3(-131, 69, 284));
|
||||||
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
|
|
||||||
teleportAndFaceAgent(level3StartPosition, vector3(-148, 68, 265));
|
|
||||||
return false;
|
return false;
|
||||||
} else if (isComplete) {
|
} else if (isComplete) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -46,18 +46,23 @@ const level4: Level = new Level(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isOutOfBounds) {
|
if (isOutOfBounds) {
|
||||||
|
teleportAndFaceAgent(level4StartPosition, vector3(-175, 62, 261));
|
||||||
|
|
||||||
pupeteer.sendWorldMessage("%message.level4.outOfBounds");
|
pupeteer.sendWorldMessage("%message.level4.outOfBounds");
|
||||||
pupeteer.setTitleTimed("%message.level4.outOfBounds", 2.5);
|
pupeteer.setTitleTimed("%message.level4.outOfBounds", 2.5);
|
||||||
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
||||||
let volume: BlockVolume = new BlockVolume(vector3(-163, 67, 291), vector3(-163, 67, 291));
|
let volume: BlockVolume = new BlockVolume(vector3(-163, 67, 291), vector3(-163, 67, 291));
|
||||||
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
|
|
||||||
teleportAndFaceAgent(level4StartPosition, vector3(-175, 62, 261));
|
|
||||||
return false;
|
return false;
|
||||||
} else if (isComplete) {
|
} else if (isComplete) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
let volume: BlockVolume = new BlockVolume(vector3(-163, 67, 291), vector3(-163, 67, 291));
|
||||||
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -77,11 +77,13 @@ const level5: Level = new Level(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isOutOfBounds) {
|
if (isOutOfBounds) {
|
||||||
|
teleportAndFaceAgent(level5StartPosition, vector3(-226, 65, 229));
|
||||||
|
|
||||||
pupeteer.sendWorldMessage("%message.level5.outOfBounds");
|
pupeteer.sendWorldMessage("%message.level5.outOfBounds");
|
||||||
pupeteer.setTitleTimed("%message.level5.outOfBounds", 2.5);
|
pupeteer.setTitleTimed("%message.level5.outOfBounds", 2.5);
|
||||||
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
world.getDimension("overworld").runCommand("execute as @p run codebuilder runtime stop @s");
|
||||||
|
|
||||||
let volume: BlockVolume = new BlockVolume(vector3(-163, 67, 291), vector3(-163, 67, 291));
|
let volume: BlockVolume = new BlockVolume(vector3(-255, 67, 246), vector3(-255, 67, 246));
|
||||||
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
world.getDimension("overworld").fillBlocks(volume, MinecraftBlockTypes.RedstoneBlock);
|
||||||
|
|
||||||
for (let i = 0; i < diamondAndPickaxePositions.length; i++) {
|
for (let i = 0; i < diamondAndPickaxePositions.length; i++) {
|
||||||
@@ -91,7 +93,6 @@ const level5: Level = new Level(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
teleportAndFaceAgent(level5StartPosition, vector3(-226, 65, 229));
|
|
||||||
return false;
|
return false;
|
||||||
} else if (isComplete) {
|
} else if (isComplete) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -126,6 +126,8 @@ system.runInterval(async () => {
|
|||||||
gateState = GateState.open;
|
gateState = GateState.open;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 11:
|
||||||
|
Pupeteer.setActionBar("You completed the mission.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -149,7 +151,7 @@ world.afterEvents.chatSend.subscribe(async (event: ChatSendAfterEvent) => {
|
|||||||
world.getDimension("Overworld").runCommand("/fill -128 71 255 -128 74 276 barrier replace air");
|
world.getDimension("Overworld").runCommand("/fill -128 71 255 -128 74 276 barrier replace air");
|
||||||
world.getDimension("Overworld").runCommand("/fill -154 69 255 -154 74 276 barrier replace air");
|
world.getDimension("Overworld").runCommand("/fill -154 69 255 -154 74 276 barrier replace air");
|
||||||
world.getDimension("Overworld").runCommand("/fill -182 69 255 -182 74 276 barrier replace air");
|
world.getDimension("Overworld").runCommand("/fill -182 69 255 -182 74 276 barrier replace air");
|
||||||
mindKeeper.set(CURRENT_LEVEL, 8);
|
mindKeeper.set(CURRENT_LEVEL, 0);
|
||||||
world.sendMessage("currentlevel = " + mindKeeper.get(CURRENT_LEVEL));
|
world.sendMessage("currentlevel = " + mindKeeper.get(CURRENT_LEVEL));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -269,6 +271,12 @@ triggerManager.RegisterFunctionTrigger("PastLevel4", async (event) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
triggerManager.RegisterFunctionTrigger("CompletedTheMission", async (event) => {
|
||||||
|
if (mindKeeper.get(CURRENT_LEVEL) == 10) {
|
||||||
|
mindKeeper.increment(CURRENT_LEVEL);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Commands.register(PREFIX, "info", (arg) => {
|
Commands.register(PREFIX, "info", (arg) => {
|
||||||
world.sendMessage("-----------------");
|
world.sendMessage("-----------------");
|
||||||
world.sendMessage("Current level: " + mindKeeper.get(CURRENT_LEVEL));
|
world.sendMessage("Current level: " + mindKeeper.get(CURRENT_LEVEL));
|
||||||
|
|||||||