Use surface icon for maps named "surface" in nether/end worlds

This commit is contained in:
James Lyne 2021-06-13 00:40:03 +01:00
parent 7c7a84ab3f
commit c65da2ad03

View File

@ -81,10 +81,10 @@ export default defineComponent({
if (/(^|_)nether(_|$)/i.test(this.world.name) || (this.world.name == 'DIM-1')) { if (/(^|_)nether(_|$)/i.test(this.world.name) || (this.world.name == 'DIM-1')) {
worldType = 'nether'; worldType = 'nether';
mapType = (map.name == 'nether') ? 'surface' : 'flat'; mapType = ['surface', 'nether'].includes(map.name) ? 'surface' : 'flat';
} else if (/(^|_)end(_|$)/i.test(this.world.name) || (this.world.name == 'DIM1')) { } else if (/(^|_)end(_|$)/i.test(this.world.name) || (this.world.name == 'DIM1')) {
worldType = 'the_end'; worldType = 'the_end';
mapType = (map.name == 'the_end') ? 'surface' : 'flat'; mapType = ['surface', 'the_end'].includes(map.name) ? 'surface' : 'flat';
} else { } else {
worldType = 'world'; worldType = 'world';
mapType = ['surface', 'flat', 'biome', 'cave'].includes(map.name) ? map.name : 'flat'; mapType = ['surface', 'flat', 'biome', 'cave'].includes(map.name) ? map.name : 'flat';