Skip to content

Commit

Permalink
Fix to maze navigator
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveyBiggers committed Mar 21, 2018
1 parent 2615754 commit e0aa74d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Malmo/samples/Python_examples/mouse_steering_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def GetMissionXML( agent_host, seed, include_beacon ):
<ServerHandlers>
<FlatWorldGenerator generatorString="3;7,220*1,5*3,2;3;,biome_1" />
<DrawingDecorator>
<DrawCuboid x1="-2" y1="225" z1="-2" x2="41" y2="225" z2="41" type="stone" variant="smooth_granite"/>
<DrawCuboid x1="-2" y1="226" z1="-2" x2="41" y2="226" z2="41" type="air"/>
<DrawCuboid x1="-1" y1="226" z1="-1" x2="40" y2="226" z2="40" type="purpur_block"/>
</DrawingDecorator>
<MazeDecorator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private void findSubgoals(Cell[] grid, Cell start, Cell end)
int cellindex = cellx + cellz * width;
if (cellindex < 0 || cellindex >= grid.length || grid[cellindex] == null)
walkable = false;
if (walkable && gapHeight > optimalPathHeight && !gapBlock.equals(Blocks.AIR.getDefaultState()))
if (walkable && gapHeight > optimalPathHeight && !gapBlock.getBlock().getDefaultState().equals(Blocks.AIR.getDefaultState()))
{
// The "gaps" are in fact walls, so we need to be a bit more conservative with our path, since the
// player has a width of 0.4 cells. We do this in a very unsophisticated, brute-force manor by testing
Expand Down

0 comments on commit e0aa74d

Please sign in to comment.