You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/de/bluecolored/bluemap/api/BlueMapMap.java
+31-1Lines changed: 31 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,9 @@
28
28
importcom.flowpowered.math.vector.Vector3d;
29
29
importcom.flowpowered.math.vector.Vector3i;
30
30
31
+
importjava.util.Optional;
32
+
importjava.util.function.Predicate;
33
+
31
34
/**
32
35
* This class represents a map that is rendered by BlueMap of a specific world ({@link BlueMapWorld}).
33
36
* Each map belongs to a map configured in BlueMap's configuration file (in the <code>maps: []</code> list).
@@ -64,7 +67,34 @@ public interface BlueMapMap {
64
67
* @return the tile-offset in blocks
65
68
*/
66
69
Vector2igetTileOffset();
67
-
70
+
71
+
/**
72
+
* <p></p>Sets a filter that determines if a specific (hires) tile of this map should be updated or not.
73
+
* If this filter returns false for a tile, the "render"-process of this tile will be cancelled and the tile will be left untouched.</p>
74
+
* <p><b>Warning:</b> Using this method will harm the integrity of the map! Since BlueMap will still assume that the tile got updated properly.</p>
75
+
* <p>Any previously set filters will get overwritten with the new one. You can get the current filter using {@link #getTileFilter()} and combine them if you wish.</p>
76
+
* @param filter The filter that will be used from now on.
77
+
*/
78
+
voidsetTileFilter(Predicate<Vector2i> filter);
79
+
80
+
/**
81
+
* Freezes or unfreezes the map in the same way the `/bluemap freeze` command does.
82
+
* BlueMap will no longer attempt to update this map if it is frozen.
83
+
* @param frozen Whether the map will be frozen or not
84
+
*/
85
+
voidsetFrozen(booleanfrozen);
86
+
87
+
/**
88
+
* Checks if the map is currently frozen
89
+
* @return true if the map is frozen, false otherwise
90
+
*/
91
+
booleanisFrozen();
92
+
93
+
/**
94
+
* Returns the currently set TileFilter. The default TileFilter is equivalent to <code>t -> true</code>.
95
+
*/
96
+
Predicate<Vector2i> getTileFilter();
97
+
68
98
/**
69
99
* Converts a block-position to a map-tile-coordinate for this map
0 commit comments