From 15cf132ada979787c216f0f4af04cf2a453d9f50 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sat, 2 May 2020 17:50:22 -0500 Subject: [PATCH] show-mc --- DynmapCore/bin/.gitignore | 1 - .../src/main/resources/extracted/web/js/coord.js | 11 ++++++++++- forge-1.10.2/src/main/resources/configuration.txt | 1 + forge-1.11.2/src/main/resources/configuration.txt | 1 + forge-1.12.2/src/main/resources/configuration.txt | 1 + forge-1.13.2/src/main/resources/configuration.txt | 1 + forge-1.8.9/src/main/resources/configuration.txt | 1 + forge-1.9.4/src/main/resources/configuration.txt | 1 + spigot/src/main/resources/configuration.txt | 1 + 9 files changed, 17 insertions(+), 2 deletions(-) delete mode 100644 DynmapCore/bin/.gitignore diff --git a/DynmapCore/bin/.gitignore b/DynmapCore/bin/.gitignore deleted file mode 100644 index ddf9c656..00000000 --- a/DynmapCore/bin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/main/ diff --git a/DynmapCore/src/main/resources/extracted/web/js/coord.js b/DynmapCore/src/main/resources/extracted/web/js/coord.js index 29a84106..b97225c6 100644 --- a/DynmapCore/src/main/resources/extracted/web/js/coord.js +++ b/DynmapCore/src/main/resources/extracted/web/js/coord.js @@ -3,6 +3,7 @@ componentconstructors['coord'] = function(dynmap, configuration) { var Coord = L.Control.extend({ valfield: $(''), mcrfield: $(''), + chunkfield: $(''), onAdd: function(map) { if(configuration.hidey) @@ -17,6 +18,10 @@ componentconstructors['coord'] = function(dynmap, configuration) { $('
').appendTo(this._container); this.mcrfield.addClass('coord-control-value').text('').appendTo(this._container); } + if(configuration['show-chunk']) { + $('
').appendTo(this._container); + this.chunkfield.addClass('coord-control-value').text('').appendTo(this._container); + } this._update(); return this.getContainer(); }, @@ -44,7 +49,9 @@ componentconstructors['coord'] = function(dynmap, configuration) { else coord.valfield.text(Math.round(loc.x) + ',' + loc.y + ',' + Math.round(loc.z)); if(configuration['show-mcr']) - coord.mcrfield.text('r.' + Math.floor(loc.x/512) + '.' + Math.floor(loc.z/512) + '.mcr'); + coord.mcrfield.text('r.' + Math.floor(loc.x/512) + '.' + Math.floor(loc.z/512) + '.mca'); + if(configuration['show-chunk']) + coord.chunkfield.text('Chunk: ' + Math.floor(loc.x/16) + ',' + Math.floor(loc.z/16)); }); dynmap.map.on('mouseout', function(mevent) { if(!dynmap.map) return; @@ -54,5 +61,7 @@ componentconstructors['coord'] = function(dynmap, configuration) { coord.valfield.text('---,---,---'); if(configuration['show-mcr']) coord.mcrfield.text('--------'); + if(configuration['show-chunk']) + coord.chunkfield.text('Chunk: ---,---'); }); }; diff --git a/forge-1.10.2/src/main/resources/configuration.txt b/forge-1.10.2/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.10.2/src/main/resources/configuration.txt +++ b/forge-1.10.2/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/forge-1.11.2/src/main/resources/configuration.txt b/forge-1.11.2/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.11.2/src/main/resources/configuration.txt +++ b/forge-1.11.2/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/forge-1.12.2/src/main/resources/configuration.txt b/forge-1.12.2/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.12.2/src/main/resources/configuration.txt +++ b/forge-1.12.2/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/forge-1.13.2/src/main/resources/configuration.txt b/forge-1.13.2/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.13.2/src/main/resources/configuration.txt +++ b/forge-1.13.2/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/forge-1.8.9/src/main/resources/configuration.txt b/forge-1.8.9/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.8.9/src/main/resources/configuration.txt +++ b/forge-1.8.9/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/forge-1.9.4/src/main/resources/configuration.txt b/forge-1.9.4/src/main/resources/configuration.txt index 2d33f6db..4e1ad63f 100644 --- a/forge-1.9.4/src/main/resources/configuration.txt +++ b/forge-1.9.4/src/main/resources/configuration.txt @@ -175,6 +175,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent diff --git a/spigot/src/main/resources/configuration.txt b/spigot/src/main/resources/configuration.txt index 9de84ea6..daf10d7d 100644 --- a/spigot/src/main/resources/configuration.txt +++ b/spigot/src/main/resources/configuration.txt @@ -176,6 +176,7 @@ components: label: "Location" hidey: false show-mcr: false + show-chunk: false # Note: more than one logo component can be defined #- class: org.dynmap.ClientComponent