Skip to content

Commit 9390025

Browse files
committed
Optimize search command for tile entities
1 parent 82f960f commit 9390025

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/de/themoep/entitydetection/searcher/ChunkSearchResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void teleport(Player sender, SearchResultEntry<ChunkLocation> entry, int
6262
}
6363
}
6464

65-
for (BlockState b : chunk.getTileEntities()) {
65+
for (BlockState b : chunk.getTileEntities(false)) {
6666
if (b.getType().toString().equals(entry.getEntryCount().get(0).getKey())) {
6767
loc = b.getLocation().add(0, 1, 0);
6868
break;

src/main/java/de/themoep/entitydetection/searcher/EntitySearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void start() {
155155
scheduled++;
156156
scheduler.runAtLocation(chunk.getBlock(0, 0, 0).getLocation(), task -> {
157157
try {
158-
for (BlockState state : chunk.getTileEntities()) {
158+
for (BlockState state : chunk.getTileEntities(false)) {
159159
Multimap<Class, Location> multiMap = blockStates.get(state.getType());
160160
if (multiMap == null) {
161161
multiMap = MultimapBuilder.hashKeys().arrayListValues().build();

0 commit comments

Comments
 (0)