Fix placing blocks in water
This commit is contained in:
@@ -815,24 +815,25 @@ public class LegacyAgent extends Agent {
|
|||||||
npc.look(BlockFace.DOWN);
|
npc.look(BlockFace.DOWN);
|
||||||
|
|
||||||
// maybe put this in lower if statement onGround()
|
// maybe put this in lower if statement onGround()
|
||||||
scheduler.runTaskLater(plugin, () -> {
|
if (m0 != Material.WATER)
|
||||||
npc.sneak();
|
scheduler.runTaskLater(plugin, () -> {
|
||||||
npc.setItem(new ItemStack(Material.COBBLESTONE));
|
npc.sneak();
|
||||||
npc.punch();
|
npc.setItem(new ItemStack(Material.COBBLESTONE));
|
||||||
npc.look(BlockFace.DOWN);
|
npc.punch();
|
||||||
|
npc.look(BlockFace.DOWN);
|
||||||
scheduler.runTaskLater(plugin, () -> {
|
|
||||||
npc.look(BlockFace.DOWN);
|
scheduler.runTaskLater(plugin, () -> {
|
||||||
}, 1);
|
npc.look(BlockFace.DOWN);
|
||||||
|
}, 1);
|
||||||
blockCheck.placeBlock(npc, playerNPC, place);
|
|
||||||
|
blockCheck.placeBlock(npc, playerNPC, place);
|
||||||
if (!towerList.containsKey(playerNPC)) {
|
|
||||||
if (c) {
|
if (!towerList.containsKey(playerNPC)) {
|
||||||
towerList.put(playerNPC, playerNPC.getLocation());
|
if (c) {
|
||||||
}
|
towerList.put(playerNPC, playerNPC.getLocation());
|
||||||
}
|
}
|
||||||
}, 3);
|
}
|
||||||
|
}, 3);
|
||||||
|
|
||||||
if (npc.isBotOnGround()) {
|
if (npc.isBotOnGround()) {
|
||||||
if (target.getLocation().distance(playerNPC.getLocation()) < 16) {
|
if (target.getLocation().distance(playerNPC.getLocation()) < 16) {
|
||||||
|
|||||||
Reference in New Issue
Block a user