mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
parent
837340dc51
commit
a38c9dd000
1 changed files with 49 additions and 0 deletions
49
MinecraftClient/config/ChatBots/OreMiner.cs
Normal file
49
MinecraftClient/config/ChatBots/OreMiner.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
//MCCScript 1.0
|
||||||
|
|
||||||
|
MCC.LoadBot(new OreMiner());
|
||||||
|
|
||||||
|
//MCCScript Extensions
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This bot can mine blocks that auto-spawn at given locations
|
||||||
|
/// </summary>
|
||||||
|
public class OreMiner: ChatBot
|
||||||
|
{
|
||||||
|
// === CONFIG - REPLACE BLOCK LOCATION x y z VALUES HERE ===
|
||||||
|
List<Location> location = new List<Location>()
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue