From a38c9dd0004112e14334349f2afaac9ea6ee8eff Mon Sep 17 00:00:00 2001 From: ORelio Date: Sat, 19 Sep 2020 12:16:15 +0200 Subject: [PATCH] Add OreMiner.cs Script by ReinforceZwei from #1254 --- MinecraftClient/config/ChatBots/OreMiner.cs | 49 +++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 MinecraftClient/config/ChatBots/OreMiner.cs diff --git a/MinecraftClient/config/ChatBots/OreMiner.cs b/MinecraftClient/config/ChatBots/OreMiner.cs new file mode 100644 index 00000000..e08e1e76 --- /dev/null +++ b/MinecraftClient/config/ChatBots/OreMiner.cs @@ -0,0 +1,49 @@ +//MCCScript 1.0 + +MCC.LoadBot(new OreMiner()); + +//MCCScript Extensions + +/// +/// This bot can mine blocks that auto-spawn at given locations +/// +public class OreMiner: ChatBot +{ + // === CONFIG - REPLACE BLOCK LOCATION x y z VALUES HERE === + List location = new List() + { + new Location(x, y, z), + new Location(x2, y2, z2), + new Location(x3, y3, z3), + // Add more here + }; + // === END OF CONFIG === + int index = 0; + + public override void Initialize() + { + LogToConsole("Bot enabled!"); + } + + public override void Update() + { + Material blockType = GetWorld().GetBlock(location[index]).Type; + switch (blockType) + { + //Adjust here block types to mine + case Material.DiamondOre: + case Material.EmeraldOre: + case Material.GoldOre: + case Material.IronOre: + case Material.CoalOre: + case Material.LapisOre: + case Material.RedstoneOre: + case Material.NetherQuartzOre: + DigBlock(location[index]); + break; + } + index++; + if (index >= location.Count) + index = 0; + } +}