Fix Miner/Farmer addon scripts (#1047)

This commit is contained in:
ORelio 2020-06-13 23:47:25 +02:00
parent 87302bafab
commit 09bfe92071
4 changed files with 17 additions and 17 deletions

View file

@ -23,14 +23,14 @@ public class CobblestoneMiner: ChatBot
switch (blockType)
{
case Material.Stone:
PlayerDigging(0, cobblestone, 1);
DigBlock(0, cobblestone, 1);
Thread.Sleep(100);
PlayerDigging(2, cobblestone, 1);
DigBlock(2, cobblestone, 1);
break;
case Material.Cobblestone:
PlayerDigging(0, cobblestone, 1);
DigBlock(0, cobblestone, 1);
Thread.Sleep(100);
PlayerDigging(2, cobblestone, 1);
DigBlock(2, cobblestone, 1);
break;
}
}

View file

@ -21,9 +21,9 @@ public class SugarCaneMiner : ChatBot
{
if (DetectSugarCane(sugarCane, fullHeight))
{
PlayerDigging(0, sugarCane, 1);
DigBlock(0, sugarCane, 1);
Thread.Sleep(1);
PlayerDigging(2, sugarCane, 1);
DigBlock(2, sugarCane, 1);
}
}

View file

@ -26,25 +26,25 @@ public class TreeFarmer : ChatBot
case Material.OakLog:
// Tree has grown, dig 4 blocks
ChangeSlot(0);
PlayerDigging(0, sapling, 1);
DigBlock(0, sapling, 1);
Thread.Sleep(100);
PlayerDigging(2, sapling, 1);
DigBlock(2, sapling, 1);
// 1
PlayerDigging(0, new Location(sapling.X, sapling.Y + 1, sapling.Z), 1);
DigBlock(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);
DigBlock(2, new Location(sapling.X, sapling.Y + 1, sapling.Z), 1);
// 2
PlayerDigging(0, new Location(sapling.X, sapling.Y + 2, sapling.Z), 1);
DigBlock(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);
DigBlock(2, new Location(sapling.X, sapling.Y + 2, sapling.Z), 1);
// 3
PlayerDigging(0, new Location(sapling.X, sapling.Y + 3, sapling.Z), 1);
DigBlock(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);
DigBlock(2, new Location(sapling.X, sapling.Y + 3, sapling.Z), 1);
// 4
PlayerDigging(0, new Location(sapling.X, sapling.Y + 4, sapling.Z), 1);
DigBlock(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);
DigBlock(2, new Location(sapling.X, sapling.Y + 4, sapling.Z), 1);
break;
case Material.Air:
// No tree, plant something