From 812c23e1cae8181aa92f652f166c671623cfc61b Mon Sep 17 00:00:00 2001 From: Brady Date: Mon, 24 Sep 2018 14:47:48 -0500 Subject: [PATCH] Fix compiler error and revert addAll meme --- src/main/java/baritone/cache/CachedWorld.java | 4 +++- src/main/java/baritone/cache/WorldProvider.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/baritone/cache/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java index 6973bdb1a..393c93fb6 100644 --- a/src/main/java/baritone/cache/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -116,7 +116,9 @@ public final class CachedWorld implements Helper { int regionZ = zoff + playerRegionZ; CachedRegion region = getOrCreateRegion(regionX, regionZ); if (region != null) { - res.addAll(region.getLocationsOf(block)); + for (BlockPos pos : region.getLocationsOf(block)) { + res.add(pos); + } } } } diff --git a/src/main/java/baritone/cache/WorldProvider.java b/src/main/java/baritone/cache/WorldProvider.java index 786bda96c..1ccbfe538 100644 --- a/src/main/java/baritone/cache/WorldProvider.java +++ b/src/main/java/baritone/cache/WorldProvider.java @@ -49,7 +49,7 @@ public enum WorldProvider implements IWorldProvider, Helper { private WorldData currentWorld; @Override - public final IWorldData getCurrentWorld() { + public final WorldData getCurrentWorld() { return this.currentWorld; }