diff --git a/MinecraftClient/config/ChatBots/CobblestoneMiner.cs b/MinecraftClient/config/ChatBots/CobblestoneMiner.cs new file mode 100644 index 00000000..0b8474d5 --- /dev/null +++ b/MinecraftClient/config/ChatBots/CobblestoneMiner.cs @@ -0,0 +1,37 @@ +//MCCScript 1.0 + +MCC.LoadBot(new CobblestoneMiner()); + +//MCCScript Extensions + +public class CobblestoneMiner: ChatBot +{ + // === CONFIG - REPLACE COBBLESTONE LOCATION x y z VALUES HERE === + // You need to stand in front of the cobblestone block to mine + // Also make sure the Cobblestone will regenerate e.g. using water and lava + Location cobblestone = new Location(x, y, z); + // === END OF CONFIG === + + public override void Initialize() + { + LogToConsole("Bot enabled!"); + } + + public override void Update() + { + Material blockType = GetWorld().GetBlock(cobblestone).Type; + switch (blockType) + { + case Material.Stone: + PlayerDigging(0, cobblestone, 1); + Thread.Sleep(100); + PlayerDigging(2, cobblestone, 1); + break; + case Material.Cobblestone: + PlayerDigging(0, cobblestone, 1); + Thread.Sleep(100); + PlayerDigging(2, cobblestone, 1); + break; + } + } +} \ No newline at end of file diff --git a/MinecraftClient/config/ChatBots/TreeFarmer.cs b/MinecraftClient/config/ChatBots/TreeFarmer.cs new file mode 100644 index 00000000..eb9ed623 --- /dev/null +++ b/MinecraftClient/config/ChatBots/TreeFarmer.cs @@ -0,0 +1,64 @@ +//MCCScript 1.0 + +MCC.LoadBot(new TreeFarmer()); + +//MCCScript Extensions + +public class TreeFarmer : ChatBot +{ + // You need to stand in front of the sapling and put items in your inventory hotbar: + // - First slot on the left (Slot 0): Axe for digging the tree + // - Second slot on the left (Slot 1): Sapling stack for planting the tree + // Then set sapling location below, login with MCC and load this script + + // === CONFIG - REPLACE SAPLING LOCATION x y z VALUES HERE === + Location sapling = new Location(x, y, z); + // === END OF CONFIG === + + public override void Update() + { + Material blockType = GetWorld().GetBlock(sapling).Type; + switch (blockType) + { + case Material.OakSapling: + // Still a sapling, nothing to do + break; + case Material.OakLog: + // Tree has grown, dig 4 blocks + ChangeSlot(0); + PlayerDigging(0, sapling, 1); + Thread.Sleep(100); + PlayerDigging(2, sapling, 1); + // 1 + PlayerDigging(0, new Location(sapling.X, sapling.Y + 1, sapling.Z), 1); + Thread.Sleep(100); + PlayerDigging(2, new Location(sapling.X, sapling.Y + 1, sapling.Z), 1); + // 2 + PlayerDigging(0, new Location(sapling.X, sapling.Y + 2, sapling.Z), 1); + Thread.Sleep(100); + PlayerDigging(2, new Location(sapling.X, sapling.Y + 2, sapling.Z), 1); + // 3 + PlayerDigging(0, new Location(sapling.X, sapling.Y + 3, sapling.Z), 1); + Thread.Sleep(100); + PlayerDigging(2, new Location(sapling.X, sapling.Y + 3, sapling.Z), 1); + // 4 + PlayerDigging(0, new Location(sapling.X, sapling.Y + 4, sapling.Z), 1); + Thread.Sleep(100); + PlayerDigging(2, new Location(sapling.X, sapling.Y + 4, sapling.Z), 1); + break; + case Material.Air: + // No tree, plant something + ChangeSlot(1); + SendPlaceBlock(sapling); + break; + default: + // Other block, cannot grow trees here + LogToConsole("Block at " + sapling + " is not a sapling: " + blockType + "..."); + break; + } + } + public override void Initialize() + { + + } +} \ No newline at end of file