aoeu
This commit is contained in:
parent
c68367b865
commit
93856c2832
@ -271,7 +271,7 @@ public class Baritone {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isAir(BlockPos pos) {
|
public static boolean isAir(BlockPos pos) {
|
||||||
return Baritone.get(pos).getBlock().equals(Block.getBlockById(0));
|
return Baritone.get(pos).getBlock().equals(Blocks.AIR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void findPathInNewThread(final boolean talkAboutIt) {
|
public static void findPathInNewThread(final boolean talkAboutIt) {
|
||||||
@ -385,7 +385,7 @@ public class Baritone {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
IBlockState state = Baritone.get(pos);
|
IBlockState state = Baritone.get(pos);
|
||||||
if (state.getBlock().equals(Block.getBlockById(0))) {
|
if (state.getBlock().equals(Blocks.AIR)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switchtotool(state);
|
switchtotool(state);
|
||||||
|
@ -283,7 +283,7 @@ public class MickeyMine extends ManagerTick {
|
|||||||
ArrayList<BlockPos> shouldBeRemoved = new ArrayList<BlockPos>();
|
ArrayList<BlockPos> shouldBeRemoved = new ArrayList<BlockPos>();
|
||||||
for (BlockPos isMined : needsToBeMined) {
|
for (BlockPos isMined : needsToBeMined) {
|
||||||
Block block = Baritone.get(isMined).getBlock();
|
Block block = Baritone.get(isMined).getBlock();
|
||||||
if (isGoalBlock(isMined) || block.equals(Block.getBlockById(0)) || block.equals(Block.getBlockFromName("minecraft:torch")) || block.equals(Blocks.BEDROCK)) {
|
if (isGoalBlock(isMined) || block.equals(Blocks.AIR) || block.equals(Block.getBlockFromName("minecraft:torch")) || block.equals(Blocks.BEDROCK)) {
|
||||||
hasBeenMined.add(isMined);
|
hasBeenMined.add(isMined);
|
||||||
shouldBeRemoved.add(isMined);
|
shouldBeRemoved.add(isMined);
|
||||||
updateBlocks(isMined);
|
updateBlocks(isMined);
|
||||||
@ -300,7 +300,7 @@ public class MickeyMine extends ManagerTick {
|
|||||||
ArrayList<BlockPos> shouldBeRemoved = new ArrayList<BlockPos>();
|
ArrayList<BlockPos> shouldBeRemoved = new ArrayList<BlockPos>();
|
||||||
for (BlockPos isMined : priorityNeedsToBeMined) {
|
for (BlockPos isMined : priorityNeedsToBeMined) {
|
||||||
Block block = Baritone.get(isMined).getBlock();
|
Block block = Baritone.get(isMined).getBlock();
|
||||||
if (block.equals(Block.getBlockById(0)) || block.equals(Block.getBlockFromName("minecraft:torch")) || block.equals(Blocks.BEDROCK)) {
|
if (block.equals(Blocks.AIR) || block.equals(Block.getBlockFromName("minecraft:torch")) || block.equals(Blocks.BEDROCK)) {
|
||||||
hasBeenMined.add(isMined);
|
hasBeenMined.add(isMined);
|
||||||
shouldBeRemoved.add(isMined);
|
shouldBeRemoved.add(isMined);
|
||||||
updateBlocks(isMined);
|
updateBlocks(isMined);
|
||||||
|
@ -67,7 +67,7 @@ public class ActionBridge extends ActionPlaceOrBreak {
|
|||||||
if (f instanceof BlockLadder || f instanceof BlockVine) {
|
if (f instanceof BlockLadder || f instanceof BlockVine) {
|
||||||
return COST_INF;
|
return COST_INF;
|
||||||
}
|
}
|
||||||
if (blocksToPlace[0].equals(Block.getBlockById(0)) || (!isWater(blocksToPlace[0]) && blocksToPlace[0].isReplaceable(Minecraft.getMinecraft().world, positionsToPlace[0]))) {
|
if (blocksToPlace[0].equals(Blocks.AIR) || (!isWater(blocksToPlace[0]) && blocksToPlace[0].isReplaceable(Minecraft.getMinecraft().world, positionsToPlace[0]))) {
|
||||||
for (BlockPos against1 : against) {
|
for (BlockPos against1 : against) {
|
||||||
if (Baritone.isBlockNormalCube(against1)) {
|
if (Baritone.isBlockNormalCube(against1)) {
|
||||||
return WC + PLACE_ONE_BLOCK_COST + getTotalHardnessOfBlocksToBreak(ts);
|
return WC + PLACE_ONE_BLOCK_COST + getTotalHardnessOfBlocksToBreak(ts);
|
||||||
|
@ -89,7 +89,7 @@ public abstract class ActionPlaceOrBreak extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static double getHardness(ToolSet ts, IBlockState block, BlockPos position) {
|
public static double getHardness(ToolSet ts, IBlockState block, BlockPos position) {
|
||||||
if (!block.equals(Block.getBlockById(0)) && !canWalkThrough(position)) {
|
if (!block.equals(Blocks.AIR) && !canWalkThrough(position)) {
|
||||||
if (avoidBreaking(position)) {
|
if (avoidBreaking(position)) {
|
||||||
return COST_INF;
|
return COST_INF;
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ public class SchematicBuilder {
|
|||||||
|
|
||||||
public HashSet<BlockPos> getAllBlocksToPlaceShiftedUp() {
|
public HashSet<BlockPos> getAllBlocksToPlaceShiftedUp() {
|
||||||
HashSet<BlockPos> toPlace = new HashSet<>();
|
HashSet<BlockPos> toPlace = new HashSet<>();
|
||||||
Block air = Block.getBlockById(0);
|
Block air = Blocks.AIR;
|
||||||
for (int y = 0; y < schematic.getHeight(); y++) {
|
for (int y = 0; y < schematic.getHeight(); y++) {
|
||||||
for (int x = 0; x < schematic.getWidth(); x++) {
|
for (int x = 0; x < schematic.getWidth(); x++) {
|
||||||
for (int z = 0; z < schematic.getLength(); z++) {
|
for (int z = 0; z < schematic.getLength(); z++) {
|
||||||
|
@ -151,7 +151,7 @@ public class Memory extends Manager {
|
|||||||
@Override
|
@Override
|
||||||
public void onTick() {
|
public void onTick() {
|
||||||
if (air == null) {
|
if (air == null) {
|
||||||
air = Block.getBlockById(0);
|
air = Blocks.AIR;
|
||||||
}
|
}
|
||||||
playersCurrentlyInRange.clear();
|
playersCurrentlyInRange.clear();
|
||||||
for (EntityPlayer pl : Minecraft.getMinecraft().world.playerEntities) {
|
for (EntityPlayer pl : Minecraft.getMinecraft().world.playerEntities) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user