mirror of https://github.com/cabaletta/baritone
Fix simulation not respecting `ignoreLava`
This commit is contained in:
parent
c0cdfb7781
commit
7a935fb2ea
|
@ -175,9 +175,9 @@ dependencies {
|
||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
launchAnnotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor'
|
launchAnnotationProcessor 'org.spongepowered:mixin:0.8.4-SNAPSHOT:processor'
|
||||||
launchImplementation('dev.babbaj:nether-pathfinder:0.21')
|
launchImplementation('dev.babbaj:nether-pathfinder:0.22')
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
implementation 'dev.babbaj:nether-pathfinder:0.21'
|
implementation 'dev.babbaj:nether-pathfinder:0.22'
|
||||||
}
|
}
|
||||||
|
|
||||||
mixin {
|
mixin {
|
||||||
|
|
|
@ -386,7 +386,7 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChunkEvent(ChunkEvent event) {
|
public void onChunkEvent(ChunkEvent event) {
|
||||||
if (event.isPostPopulate()) {
|
if (event.isPostPopulate() && this.context != null) {
|
||||||
final Chunk chunk = ctx.world().getChunk(event.getX(), event.getZ());
|
final Chunk chunk = ctx.world().getChunk(event.getX(), event.getZ());
|
||||||
this.context.queueForPacking(chunk);
|
this.context.queueForPacking(chunk);
|
||||||
}
|
}
|
||||||
|
@ -1069,13 +1069,13 @@ public final class ElytraBehavior extends Behavior implements IElytraBehavior, H
|
||||||
// Ensure that the goal is visible along the entire simulated path
|
// Ensure that the goal is visible along the entire simulated path
|
||||||
// Reverse order iteration since the last position is most likely to fail
|
// Reverse order iteration since the last position is most likely to fail
|
||||||
for (int i = result.steps.size() - 1; i >= 1; i--) {
|
for (int i = result.steps.size() - 1; i >= 1; i--) {
|
||||||
if (!clearView(context.start.add(result.steps.get(i)), goal, false)) {
|
if (!clearView(context.start.add(result.steps.get(i)), goal, context.ignoreLava)) {
|
||||||
continue outer;
|
continue outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Ensure that the goal is visible from the final position
|
// Ensure that the goal is visible from the final position
|
||||||
if (!clearView(context.start.add(result.steps.get(result.steps.size() - 1)), goal, false)) {
|
if (!clearView(context.start.add(result.steps.get(result.steps.size() - 1)), goal, context.ignoreLava)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue