Skip to content

Commit 9bc6314

Browse files
committed
Merge branch 'master' into mc/1.12
2 parents efdd2c1 + 8cf7bb3 commit 9bc6314

File tree

6 files changed

+29
-27
lines changed

6 files changed

+29
-27
lines changed

BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public void onEnable() {
4040
new MetricsLite(this);
4141

4242
//save world so the level.dat is present on new worlds
43+
Logger.global.logInfo("Saving all worlds once, to make sure the level.dat is present...");
4344
for (World world : getServer().getWorlds()) {
4445
world.save();
4546
}

BlueMapBukkit/src/main/resources/plugin.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: BlueMap
22
description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)"
33
main: de.bluecolored.bluemap.bukkit.BukkitPlugin
4-
version: 0.2.1
5-
api-version: 1.12.2
4+
version: "0.3.0-mc1.12"
65
author: "Blue (TBlueF / Lukas Rieger)"
76
authors: [Blue (TBlueF / Lukas Rieger)]
87
website: "https://github.com/BlueMap-Minecraft"

BlueMapCommon/src/main/resources/mcmod.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"modid": "bluemap",
44
"name": "BlueMap",
5-
"version": "0.2.1-mc1.12",
5+
"version": "0.3.0-mc1.12",
66
"description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)",
77
"url": "https://github.com/BlueMap-Minecraft",
88
"authorList": [

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
public class BlueMap {
44

5-
public static final String VERSION = "0.2.1-mc1.12";
5+
public static final String VERSION = "0.3.0-mc1.12";
66

77
}

BlueMapCore/src/main/webroot/js/libs/BlueMap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,15 +475,15 @@ export default class BlueMap {
475475
let displayAlert = () => {
476476
let alert = $(`<div class="alert box" data-alert-id="${id}" style="display: none;"><div class="alert-close-button"></div>${content}</div>`).appendTo(alertBox);
477477
alert.find('.alert-close-button').click(() => {
478-
alert.fadeOut(200, () => alert.remove());
478+
alert.stop().fadeOut(200, () => alert.remove());
479479
});
480-
alert.fadeIn(200);
480+
alert.stop().fadeIn(200);
481481
};
482482

483483
if (id !== undefined) {
484484
let sameAlert = alertBox.find(`.alert[data-alert-id=${id}]`);
485485
if (sameAlert.length > 0) {
486-
alertBox.fadeOut(200, () => {
486+
alertBox.stop().fadeOut(200, () => {
487487
alertBox.html('');
488488
alertBox.show();
489489
});
@@ -493,7 +493,7 @@ export default class BlueMap {
493493

494494
let oldAlerts = alertBox.find('.alert');
495495
if (oldAlerts.length > 0){
496-
alertBox.fadeOut(200, () => {
496+
alertBox.stop().fadeOut(200, () => {
497497
alertBox.html('');
498498
alertBox.show();
499499
displayAlert();

BlueMapCore/src/main/webroot/js/libs/Controls.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -215,41 +215,43 @@ export default class Controls {
215215
}
216216

217217
updateHeights() {
218-
function between(n, min, max) {
219-
return n >= min && n < max;
220-
}
218+
function between(n, min, max) {
219+
return n >= min && n < max;
220+
}
221221

222-
let inTile = (pos, thisPos) => {
223-
return between(pos.x, thisPos.x - this.tileSize.x, thisPos.x) &&
224-
between(pos.z, thisPos.z - this.tileSize.z, thisPos.z);
225-
};
222+
let inTile = (pos, thisPos) => {
223+
return between(pos.x, thisPos.x - this.tileSize.x, thisPos.x) &&
224+
between(pos.z, thisPos.z - this.tileSize.z, thisPos.z);
225+
};
226226

227-
let tileChildren = (targetPos) => {
228-
return this.heightScene.children.filter(child => inTile(child.position, targetPos))
229-
};
227+
let tileChildren = (targetPos) => {
228+
return this.heightScene.children.filter(child => inTile(child.position, targetPos))
229+
};
230230

231+
// check hight at target
232+
try {
231233
let rayStart = new Vector3(this.targetPosition.x, 300, this.targetPosition.z);
232234
this.raycaster.set(rayStart, this.rayDirection);
233235
this.raycaster.near = 1;
234236
this.raycaster.far = 300;
235237
let intersects = this.raycaster.intersectObjects(tileChildren(this.targetPosition));
236238

237-
if (intersects.length > 0){
239+
if (intersects.length > 0) {
238240
this.minHeight = intersects[0].point.y;
239-
//this.targetPosition.y = this.minHeight;
240-
} else {
241-
//this.targetPosition.y = 0;
242241
}
242+
} catch (ignore){}
243243

244-
rayStart.set(this.camera.position.x, 300, this.camera.position.z);
244+
// check height at camera
245+
try {
246+
let rayStart = new Vector3(this.camera.position.x, 300, this.camera.position.z);
245247
this.raycaster.set(rayStart, this.rayDirection);
246-
intersects.length = 0;
247-
intersects = this.raycaster.intersectObjects(tileChildren(this.camera.position));
248-
if (intersects.length > 0){
249-
if (intersects[0].point.y > this.minHeight){
248+
let intersects = this.raycaster.intersectObjects(tileChildren(this.camera.position));
249+
if (intersects.length > 0) {
250+
if (intersects[0].point.y > this.minHeight) {
250251
this.minHeight = intersects[0].point.y;
251252
}
252253
}
254+
} catch (ignore){}
253255
}
254256

255257
updateMouseMoves = () => {

0 commit comments

Comments
 (0)