Skip to content

Commit d43c7c4

Browse files
committed
Apply spotless foxes and a comment
1 parent 4b8245d commit d43c7c4

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,14 @@ private static Collection<Vector2i> getRegions(BmMap map, Vector2i center, int r
132132
.forEach(regions::add);
133133

134134
// also update regions that are present as map-tile-state files (they might have been rendered before but deleted now)
135+
// (a little hacky as we are operating on raw tile-state files -> maybe find a better way?)
135136
Grid tileGrid = map.getHiresModelManager().getTileGrid();
136137
Grid cellGrid = MapTileState.GRID.multiply(tileGrid);
137138
try (Stream<GridStorage.Cell> stream = map.getStorage().tileState().stream()) {
138139
stream
139-
.filter(c -> { // filter out files that are fully UNKNOWN
140+
.filter(c -> {
141+
// filter out files that are fully UNKNOWN/NOT_GENERATED
142+
// this avoids unnecessarily converting UNKNOWN tiles into NOT_GENERATED tiles on force-updates
140143
try (CompressedInputStream in = c.read()) {
141144
if (in == null) return false;
142145
TileState[] states = TileInfoRegion.loadPalette(in.decompress());

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*
2+
* This file is part of BlueMap, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) Blue (Lukas Rieger) <https://bluecolored.de>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
125
package de.bluecolored.bluemap.core.world.mca.data;
226

327
import com.google.gson.reflect.TypeToken;

0 commit comments

Comments
 (0)