2020-06-12 00:11:19 +02:00
|
|
|
//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:
|
2020-06-13 23:47:25 +02:00
|
|
|
DigBlock(0, cobblestone, 1);
|
2020-06-12 00:11:19 +02:00
|
|
|
Thread.Sleep(100);
|
2020-06-13 23:47:25 +02:00
|
|
|
DigBlock(2, cobblestone, 1);
|
2020-06-12 00:11:19 +02:00
|
|
|
break;
|
|
|
|
|
case Material.Cobblestone:
|
2020-06-13 23:47:25 +02:00
|
|
|
DigBlock(0, cobblestone, 1);
|
2020-06-12 00:11:19 +02:00
|
|
|
Thread.Sleep(100);
|
2020-06-13 23:47:25 +02:00
|
|
|
DigBlock(2, cobblestone, 1);
|
2020-06-12 00:11:19 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|