You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (mapOrWorld.equalsIgnoreCase(m.getId()) || mapOrWorld.equalsIgnoreCase(m.getName())){
175
+
map = m;
176
+
world = map.getWorld();
177
+
break;
178
+
}
179
+
}
180
+
181
+
if (world == null) {
182
+
for (Worldw : bluemap.getWorlds()) {
183
+
if (mapOrWorld.equalsIgnoreCase(w.getName())){
184
+
world = w;
185
+
break;
186
+
}
187
+
}
188
+
}
189
+
190
+
if (world == null) {
191
+
source.sendMessage(Text.of(TextColor.RED, "Could not find a world or map with this name or id ", TextColor.GRAY, "('" + mapOrWorld + "')", TextColor.RED, "! Maybe it is not configured in BlueMap's config?"));
192
+
}
193
+
194
+
world.invalidateChunkCache();
195
+
196
+
finalWorldworldToRender = world;
197
+
finalMapTypemapToRender = map;
198
+
if (mapToRender == null) {
199
+
newThread(() -> {
200
+
createWorldRenderTask(source, worldToRender, center, blockRadius);
201
+
}).start();
202
+
} else {
203
+
newThread(() -> {
204
+
createMapRenderTask(source, mapToRender, center, blockRadius);
205
+
}).start();
206
+
}
207
+
208
+
returntrue;
209
+
}
158
210
159
211
/**
160
212
* Command: /bluemap render [world]
@@ -172,7 +224,7 @@ public boolean executeRenderWorldCommand(CommandSource source, UUID worldUuid, V
172
224
Worldworld = bluemap.getWorld(worldUuid);
173
225
174
226
if (world == null) {
175
-
source.sendMessage(Text.of(TextColor.RED, "This world is not loaded with BlueMap! Maybe it is not configured?"));
227
+
source.sendMessage(Text.of(TextColor.RED, "This world is not loaded with BlueMap! Maybe it is not configured in BlueMap's config?"));
176
228
returnfalse;
177
229
}
178
230
@@ -307,6 +359,36 @@ private void createWorldRenderTask(CommandSource source, World world, Vector2i c
307
359
source.sendMessage(Text.of(TextColor.GREEN, "All render tasks created! Use /bluemap to view the progress!"));
world = mod.getUUIDForWorld((ServerWorld) player.getEntityWorld());
107
+
} catch (IOExceptionex) {
108
+
thrownewSimpleCommandExceptionType(newLiteralMessage("Could not detect the world you are currently in, try to define a world using /bluemap render <world>")).create();
109
+
}
110
+
111
+
returncommands.executeRenderWorldCommand(newForgeCommandSource(c.getSource()), world, center, blockRadius) ? 1 : 0;
0 commit comments