mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 20:16:00 +01:00
Merge branch 'mc/1.13'
This commit is contained in:
commit
ee4d84ee0a
@ -141,11 +141,10 @@ private void renderThread() {
|
||||
try {
|
||||
ticket.render();
|
||||
} catch (IOException e) {
|
||||
if (ticket.getRenderAttempts() < 3) {
|
||||
Logger.global.logDebug("Failed to render tile " + ticket.getTile() + " of map '" + ticket.getMapType().getId() + "', rescheduling for " + (ticket.getRenderAttempts() + 1) + ". attempt..");
|
||||
createTicket(ticket); //this might be a temporary issue, so we reschedule ticket for another attempt
|
||||
if (ticket.getRenderAttempts() <= 1) {
|
||||
createTicket(ticket);
|
||||
} else {
|
||||
Logger.global.logError("Failed to render tile " + ticket.getTile() + " of map '" + ticket.getMapType().getId() + "'!", e);
|
||||
Logger.global.logDebug("Failed to render tile " + ticket.getTile() + " of map '" + ticket.getMapType().getId() + "' after " + ticket.getRenderAttempts() + " render-attempts! (" + e.toString() + ")");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -21,9 +21,13 @@ public MapUpdateHandler() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldSaveToDisk(UUID world) {
|
||||
public void onWorldSaveToDisk(final UUID world) {
|
||||
RenderManager renderManager = Plugin.getInstance().getRenderManager();
|
||||
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(5000); // wait 5 sec before rendering so saving has finished to avoid render-errors
|
||||
|
||||
synchronized (updateBuffer) {
|
||||
Iterator<MapType> iterator = updateBuffer.keys().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@ -35,6 +39,9 @@ public void onWorldSaveToDisk(UUID world) {
|
||||
}
|
||||
|
||||
}
|
||||
} catch (InterruptedException ignore) {}
|
||||
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user