diff --git a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java index 1a093586..6f20526f 100644 --- a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java +++ b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java @@ -40,6 +40,7 @@ public void onEnable() { new MetricsLite(this); //save world so the level.dat is present on new worlds + Logger.global.logInfo("Saving all worlds once, to make sure the level.dat is present..."); for (World world : getServer().getWorlds()) { world.save(); } diff --git a/BlueMapBukkit/src/main/resources/plugin.yml b/BlueMapBukkit/src/main/resources/plugin.yml index 7f686cea..4a371da5 100644 --- a/BlueMapBukkit/src/main/resources/plugin.yml +++ b/BlueMapBukkit/src/main/resources/plugin.yml @@ -1,8 +1,7 @@ name: BlueMap description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)" main: de.bluecolored.bluemap.bukkit.BukkitPlugin -version: 0.2.1 -api-version: 1.12.2 +version: "0.3.0-mc1.12" author: "Blue (TBlueF / Lukas Rieger)" authors: [Blue (TBlueF / Lukas Rieger)] website: "https://github.com/BlueMap-Minecraft" diff --git a/BlueMapCommon/src/main/resources/mcmod.info b/BlueMapCommon/src/main/resources/mcmod.info index 1282eeab..c65bb6ce 100644 --- a/BlueMapCommon/src/main/resources/mcmod.info +++ b/BlueMapCommon/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ { "modid": "bluemap", "name": "BlueMap", - "version": "0.2.1-mc1.12", + "version": "0.3.0-mc1.12", "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", "url": "https://github.com/BlueMap-Minecraft", "authorList": [ diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java index c2eb74b0..4a3f13b0 100644 --- a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java +++ b/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java @@ -2,6 +2,6 @@ public class BlueMap { - public static final String VERSION = "0.2.1-mc1.12"; + public static final String VERSION = "0.3.0-mc1.12"; } diff --git a/BlueMapCore/src/main/webroot/js/libs/BlueMap.js b/BlueMapCore/src/main/webroot/js/libs/BlueMap.js index 777dc504..663941b9 100644 --- a/BlueMapCore/src/main/webroot/js/libs/BlueMap.js +++ b/BlueMapCore/src/main/webroot/js/libs/BlueMap.js @@ -475,15 +475,15 @@ export default class BlueMap { let displayAlert = () => { let alert = $(``).appendTo(alertBox); alert.find('.alert-close-button').click(() => { - alert.fadeOut(200, () => alert.remove()); + alert.stop().fadeOut(200, () => alert.remove()); }); - alert.fadeIn(200); + alert.stop().fadeIn(200); }; if (id !== undefined) { let sameAlert = alertBox.find(`.alert[data-alert-id=${id}]`); if (sameAlert.length > 0) { - alertBox.fadeOut(200, () => { + alertBox.stop().fadeOut(200, () => { alertBox.html(''); alertBox.show(); }); @@ -493,7 +493,7 @@ export default class BlueMap { let oldAlerts = alertBox.find('.alert'); if (oldAlerts.length > 0){ - alertBox.fadeOut(200, () => { + alertBox.stop().fadeOut(200, () => { alertBox.html(''); alertBox.show(); displayAlert(); diff --git a/BlueMapCore/src/main/webroot/js/libs/Controls.js b/BlueMapCore/src/main/webroot/js/libs/Controls.js index da71cfb4..7effecd9 100644 --- a/BlueMapCore/src/main/webroot/js/libs/Controls.js +++ b/BlueMapCore/src/main/webroot/js/libs/Controls.js @@ -215,41 +215,43 @@ export default class Controls { } updateHeights() { - function between(n, min, max) { - return n >= min && n < max; - } + function between(n, min, max) { + return n >= min && n < max; + } - let inTile = (pos, thisPos) => { - return between(pos.x, thisPos.x - this.tileSize.x, thisPos.x) && - between(pos.z, thisPos.z - this.tileSize.z, thisPos.z); - }; + let inTile = (pos, thisPos) => { + return between(pos.x, thisPos.x - this.tileSize.x, thisPos.x) && + between(pos.z, thisPos.z - this.tileSize.z, thisPos.z); + }; - let tileChildren = (targetPos) => { - return this.heightScene.children.filter(child => inTile(child.position, targetPos)) - }; + let tileChildren = (targetPos) => { + return this.heightScene.children.filter(child => inTile(child.position, targetPos)) + }; + // check hight at target + try { let rayStart = new Vector3(this.targetPosition.x, 300, this.targetPosition.z); this.raycaster.set(rayStart, this.rayDirection); this.raycaster.near = 1; this.raycaster.far = 300; let intersects = this.raycaster.intersectObjects(tileChildren(this.targetPosition)); - if (intersects.length > 0){ + if (intersects.length > 0) { this.minHeight = intersects[0].point.y; - //this.targetPosition.y = this.minHeight; - } else { - //this.targetPosition.y = 0; } + } catch (ignore){} - rayStart.set(this.camera.position.x, 300, this.camera.position.z); + // check height at camera + try { + let rayStart = new Vector3(this.camera.position.x, 300, this.camera.position.z); this.raycaster.set(rayStart, this.rayDirection); - intersects.length = 0; - intersects = this.raycaster.intersectObjects(tileChildren(this.camera.position)); - if (intersects.length > 0){ - if (intersects[0].point.y > this.minHeight){ + let intersects = this.raycaster.intersectObjects(tileChildren(this.camera.position)); + if (intersects.length > 0) { + if (intersects[0].point.y > this.minHeight) { this.minHeight = intersects[0].point.y; } } + } catch (ignore){} } updateMouseMoves = () => {