baritone complies faster if the files are less bytes
This commit is contained in:
parent
658048ff2d
commit
80a4757242
@ -111,19 +111,15 @@ public interface MovementHelper extends ActionCosts, Helper {
|
|||||||
|
|
||||||
static Ternary canWalkThroughBlockState(IBlockState state) {
|
static Ternary canWalkThroughBlockState(IBlockState state) {
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
|
|
||||||
if (block == Blocks.AIR) {
|
if (block == Blocks.AIR) {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block == Blocks.FIRE || block == Blocks.TRIPWIRE || block == Blocks.WEB || block == Blocks.END_PORTAL || block == Blocks.COCOA || block instanceof BlockSkull || block instanceof BlockTrapDoor || block == Blocks.END_ROD) {
|
if (block == Blocks.FIRE || block == Blocks.TRIPWIRE || block == Blocks.WEB || block == Blocks.END_PORTAL || block == Blocks.COCOA || block instanceof BlockSkull || block instanceof BlockTrapDoor || block == Blocks.END_ROD) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Baritone.settings().blocksToAvoid.value.contains(block)) {
|
if (Baritone.settings().blocksToAvoid.value.contains(block)) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block instanceof BlockDoor || block instanceof BlockFenceGate) {
|
if (block instanceof BlockDoor || block instanceof BlockFenceGate) {
|
||||||
// TODO this assumes that all doors in all mods are openable
|
// TODO this assumes that all doors in all mods are openable
|
||||||
if (block == Blocks.IRON_DOOR) {
|
if (block == Blocks.IRON_DOOR) {
|
||||||
@ -131,17 +127,14 @@ public interface MovementHelper extends ActionCosts, Helper {
|
|||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block == Blocks.CARPET) {
|
if (block == Blocks.CARPET) {
|
||||||
return MAYBE;
|
return MAYBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block instanceof BlockSnow) {
|
if (block instanceof BlockSnow) {
|
||||||
// snow layers cached as the top layer of a packed chunk have no metadata, we can't make a decision based on their depth here
|
// snow layers cached as the top layer of a packed chunk have no metadata, we can't make a decision based on their depth here
|
||||||
// it would otherwise make long distance pathing through snowy biomes impossible
|
// it would otherwise make long distance pathing through snowy biomes impossible
|
||||||
return MAYBE;
|
return MAYBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block instanceof BlockLiquid) {
|
if (block instanceof BlockLiquid) {
|
||||||
if (state.getValue(BlockLiquid.LEVEL) != 0) {
|
if (state.getValue(BlockLiquid.LEVEL) != 0) {
|
||||||
return NO;
|
return NO;
|
||||||
@ -149,11 +142,9 @@ public interface MovementHelper extends ActionCosts, Helper {
|
|||||||
return MAYBE;
|
return MAYBE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block instanceof BlockCauldron) {
|
if (block instanceof BlockCauldron) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
try { // A dodgy catch-all at the end, for most blocks with default behaviour this will work, however where blocks are special this will error out, and we can handle it when we have this information
|
try { // A dodgy catch-all at the end, for most blocks with default behaviour this will work, however where blocks are special this will error out, and we can handle it when we have this information
|
||||||
if (block.isPassable(null, null)) {
|
if (block.isPassable(null, null)) {
|
||||||
return YES;
|
return YES;
|
||||||
|
Loading…
Reference in New Issue
Block a user