Skip to content

Commit

Permalink
Fixes bug where a walked on block that was walked on for less than 5 …
Browse files Browse the repository at this point in the history
…points would give errors.
  • Loading branch information
matjojo committed May 10, 2019
1 parent ffc1bbc commit 818d5d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DesirePathsDataHolder {
speedThreshold = 20; // Player moves 6, 22, 28 when crouching, walking, running.
MAX_TRAMPLE = 5 * 5; // the amount of ticks that you'd have to walk on this block
// since you take, when walking, 100/22 = 4.5 ticks per block,
// we'd want you to walk over the block about 5 times before getting a desire path
// we'd want you to walk over the block about 5 times before going to the next stage
DESIRE_PATH_PROPERTY = IntegerProperty.create("desiretramples", 0, DesirePathsDataHolder.MAX_TRAMPLE);
UNTRAMPLE_PER_RANDOM_TICK = 5;
}
Expand Down Expand Up @@ -108,6 +108,8 @@ private static Block getPreviousBlock(Block block, World world) {
return Blocks.MYCELIUM;
} else if (block.equals(DesirePathInitializer.PODZOL_DIRT_INTER)) {
return Blocks.PODZOL;
} else if (block.equals(Blocks.DIRT)) {
return Blocks.DIRT;
}

MinecraftServer server = world.getServer();
Expand Down

0 comments on commit 818d5d9

Please sign in to comment.