mirror of https://github.com/cabaletta/baritone
Move up and fix access modifiers
This commit is contained in:
parent
24c23e28ec
commit
28ba97c3de
|
@ -85,6 +85,14 @@ import static baritone.api.pathing.movement.ActionCosts.COST_INF;
|
||||||
|
|
||||||
public final class BuilderProcess extends BaritoneProcessHelper implements IBuilderProcess {
|
public final class BuilderProcess extends BaritoneProcessHelper implements IBuilderProcess {
|
||||||
|
|
||||||
|
private static final Set<Property<?>> ORIENTATION_PROPS =
|
||||||
|
ImmutableSet.of(
|
||||||
|
RotatedPillarBlock.AXIS, HorizontalDirectionalBlock.FACING,
|
||||||
|
StairBlock.FACING, StairBlock.HALF, StairBlock.SHAPE,
|
||||||
|
PipeBlock.NORTH, PipeBlock.EAST, PipeBlock.SOUTH, PipeBlock.WEST, PipeBlock.UP,
|
||||||
|
TrapDoorBlock.OPEN, TrapDoorBlock.HALF
|
||||||
|
);
|
||||||
|
|
||||||
private HashSet<BetterBlockPos> incorrectPositions;
|
private HashSet<BetterBlockPos> incorrectPositions;
|
||||||
private LongOpenHashSet observedCompleted; // positions that are completed even if they're out of render distance and we can't make sure right now
|
private LongOpenHashSet observedCompleted; // positions that are completed even if they're out of render distance and we can't make sure right now
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -1010,15 +1018,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Set<Property<?>> orientationProps =
|
private static boolean sameBlockstate(BlockState first, BlockState second) {
|
||||||
ImmutableSet.of(
|
|
||||||
RotatedPillarBlock.AXIS, HorizontalDirectionalBlock.FACING,
|
|
||||||
StairBlock.FACING, StairBlock.HALF, StairBlock.SHAPE,
|
|
||||||
PipeBlock.NORTH, PipeBlock.EAST, PipeBlock.SOUTH, PipeBlock.WEST, PipeBlock.UP,
|
|
||||||
TrapDoorBlock.OPEN, TrapDoorBlock.HALF
|
|
||||||
);
|
|
||||||
|
|
||||||
private boolean sameBlockstate(BlockState first, BlockState second) {
|
|
||||||
if (first.getBlock() != second.getBlock()) {
|
if (first.getBlock() != second.getBlock()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1031,7 +1031,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
ImmutableMap<Property<?>, Comparable<?>> map2 = second.getValues();
|
ImmutableMap<Property<?>, Comparable<?>> map2 = second.getValues();
|
||||||
for (Property<?> prop : map1.keySet()) {
|
for (Property<?> prop : map1.keySet()) {
|
||||||
if (map1.get(prop) != map2.get(prop)
|
if (map1.get(prop) != map2.get(prop)
|
||||||
&& !(ignoreDirection && orientationProps.contains(prop))
|
&& !(ignoreDirection && ORIENTATION_PROPS.contains(prop))
|
||||||
&& !ignoredProps.contains(prop.getName())) {
|
&& !ignoredProps.contains(prop.getName())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1039,7 +1039,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean containsBlockState(Collection<BlockState> states, BlockState state) {
|
private static boolean containsBlockState(Collection<BlockState> states, BlockState state) {
|
||||||
for (BlockState testee : states) {
|
for (BlockState testee : states) {
|
||||||
if (sameBlockstate(testee, state)) {
|
if (sameBlockstate(testee, state)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -1048,7 +1048,7 @@ public final class BuilderProcess extends BaritoneProcessHelper implements IBuil
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean valid(BlockState current, BlockState desired, boolean itemVerify) {
|
private static boolean valid(BlockState current, BlockState desired, boolean itemVerify) {
|
||||||
if (desired == null) {
|
if (desired == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue