Class WorldMapTracker
java.lang.Object
com.hypixel.hytale.server.core.universe.world.WorldMapTracker
- All Implemented Interfaces:
Tickable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprivate Stringprivate static final intstatic final intprivate static final intprivate intprivate intprivate final HLongSetprivate final ReentrantReadWriteLockprivate static final com.hypixel.hytale.logger.HytaleLoggerstatic final intstatic final intstatic final floatprivate final HLongSetprivate final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<CompletableFuture<MapImage>> private final Playerprivate floatstatic final intprivate intprivate final CircleSpiralIteratorprivate booleanprivate TransformComponentstatic final floatprivate floatprivate Integer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidclearChunks(it.unimi.dsi.fastutil.longs.LongSet chunkIndices) voidcopyFrom(WorldMapTracker worldMapTracker) booleandiscoverZone(World world, String zoneName) booleandiscoverZones(World world, Set<String> zoneNames) intgetEffectiveViewRadius(World world) private booleanhasDiscoveredZone(String zoneName) booleanbooleanprivate intloadImages(World world, int chunkViewRadius, int playerChunkX, int playerChunkZ, int maxGeneration) private intloadWorldMap(World world, Box2D worldMapArea, int maxGeneration) private voidonZoneDiscovered(Ref<EntityStore> ref, WorldMapTracker.ZoneDiscoveryInfo zoneDiscoveryInfo, ComponentAccessor<EntityStore> componentAccessor) private voidprocessPendingReloadChunks(World world) voidvoidsendSettings(World world) voidsetAllowTeleportToCoordinates(World world, boolean allowTeleportToCoordinates) voidsetAllowTeleportToMarkers(World world, boolean allowTeleportToMarkers) voidsetClientHasWorldMapVisible(boolean visible) voidsetPlayerMapFilter(Predicate<PlayerRef> playerMapFilter) voidsetViewRadiusOverride(Integer viewRadiusOverride) private static booleanshouldBeVisible(int chunkViewRadius, int chunkX, int chunkZ, int x, int z) booleanshouldBeVisible(int chunkViewRadius, long chunkCoordinates) booleanvoidtick(float dt) private <T> voidtrySendMarker(int chunkViewRadius, int playerChunkX, int playerChunkZ, double markerX, double markerZ, float markerYaw, String markerId, String markerName, T param, TriFunction<String, String, T, MapMarker> markerSupplier) <T> voidtrySendMarker(int chunkViewRadius, int playerChunkX, int playerChunkZ, Vector3d markerPos, float markerYaw, String markerId, String markerDisplayName, T param, TriFunction<String, String, T, MapMarker> markerSupplier) voidtrySendMarker(int chunkViewRadius, int playerChunkX, int playerChunkZ, MapMarker marker) booleanundiscoverZone(World world, String zoneName) booleanundiscoverZones(World world, Set<String> zoneNames) private voidunloadImages(int chunkViewRadius, int playerChunkX, int playerChunkZ) voidupdateCurrentZoneAndBiome(Ref<EntityStore> ref, WorldMapTracker.ZoneDiscoveryInfo zoneDiscoveryInfo, String biomeName, ComponentAccessor<EntityStore> componentAccessor) private voidupdatePointsOfInterest(World world, int chunkViewRadius, int playerChunkX, int playerChunkZ) private voidupdateWorldMap(World world, float dt, WorldMapSettings worldMapSettings, int chunkViewRadius, int playerChunkX, int playerChunkZ) private voidwriteUpdatePacket(List<MapChunk> list)
-
Field Details
-
LOGGER
private static final com.hypixel.hytale.logger.HytaleLogger LOGGER -
UPDATE_SPEED
public static final float UPDATE_SPEED- See Also:
-
MIN_PLAYER_MARKER_UPDATE_SPEED
public static final float MIN_PLAYER_MARKER_UPDATE_SPEED- See Also:
-
RADIUS_MAX
public static final int RADIUS_MAX- See Also:
-
EMPTY_UPDATE_WORLD_MAP_SIZE
public static final int EMPTY_UPDATE_WORLD_MAP_SIZE- See Also:
-
EMPTY_MAP_CHUNK_SIZE
private static final int EMPTY_MAP_CHUNK_SIZE- See Also:
-
FULL_MAP_CHUNK_SIZE
private static final int FULL_MAP_CHUNK_SIZE- See Also:
-
MAX_IMAGE_GENERATION
public static final int MAX_IMAGE_GENERATION- See Also:
-
MAX_FRAME
public static final int MAX_FRAME- See Also:
-
player
-
spiralIterator
-
loadedLock
-
loaded
-
pendingReloadChunks
-
pendingReloadFutures
private final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<CompletableFuture<MapImage>> pendingReloadFutures -
sentMarkers
-
updateTimer
private float updateTimer -
playerMarkersUpdateTimer
private float playerMarkersUpdateTimer -
viewRadiusOverride
-
started
private boolean started -
sentViewRadius
private int sentViewRadius -
lastChunkX
private int lastChunkX -
lastChunkZ
private int lastChunkZ -
currentBiomeName
-
currentZone
-
allowTeleportToCoordinates
private boolean allowTeleportToCoordinates -
allowTeleportToMarkers
private boolean allowTeleportToMarkers -
clientHasWorldMapVisible
private boolean clientHasWorldMapVisible -
playerMapFilter
-
tempToRemove
-
tempToAdd
-
tempTestedMarkers
-
transformComponent
-
-
Constructor Details
-
WorldMapTracker
-
-
Method Details
-
tick
public void tick(float dt) -
updateCurrentZoneAndBiome
public void updateCurrentZoneAndBiome(@Nonnull Ref<EntityStore> ref, @Nullable WorldMapTracker.ZoneDiscoveryInfo zoneDiscoveryInfo, @Nullable String biomeName, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onZoneDiscovered
private void onZoneDiscovered(@Nonnull Ref<EntityStore> ref, @Nonnull WorldMapTracker.ZoneDiscoveryInfo zoneDiscoveryInfo, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
updateWorldMap
private void updateWorldMap(@Nonnull World world, float dt, @Nonnull WorldMapSettings worldMapSettings, int chunkViewRadius, int playerChunkX, int playerChunkZ) -
updatePointsOfInterest
private void updatePointsOfInterest(@Nonnull World world, int chunkViewRadius, int playerChunkX, int playerChunkZ) -
trySendMarker
public void trySendMarker(int chunkViewRadius, int playerChunkX, int playerChunkZ, @Nonnull MapMarker marker) -
trySendMarker
-
trySendMarker
-
unloadImages
private void unloadImages(int chunkViewRadius, int playerChunkX, int playerChunkZ) -
processPendingReloadChunks
-
loadImages
private int loadImages(@Nonnull World world, int chunkViewRadius, int playerChunkX, int playerChunkZ, int maxGeneration) -
loadWorldMap
-
writeUpdatePacket
-
getSentMarkers
-
getPlayer
-
clear
public void clear() -
clearChunks
public void clearChunks(@Nonnull it.unimi.dsi.fastutil.longs.LongSet chunkIndices) -
sendSettings
-
hasDiscoveredZone
-
discoverZone
-
undiscoverZone
-
discoverZones
-
undiscoverZones
-
isAllowTeleportToCoordinates
public boolean isAllowTeleportToCoordinates() -
setAllowTeleportToCoordinates
-
isAllowTeleportToMarkers
public boolean isAllowTeleportToMarkers() -
setAllowTeleportToMarkers
-
getPlayerMapFilter
-
setPlayerMapFilter
-
setClientHasWorldMapVisible
public void setClientHasWorldMapVisible(boolean visible) -
shouldUpdatePlayerMarkers
public boolean shouldUpdatePlayerMarkers() -
resetPlayerMarkersUpdateTimer
public void resetPlayerMarkersUpdateTimer() -
getViewRadiusOverride
-
getCurrentBiomeName
-
getCurrentZone
-
setViewRadiusOverride
-
getEffectiveViewRadius
-
shouldBeVisible
public boolean shouldBeVisible(int chunkViewRadius, long chunkCoordinates) -
copyFrom
-
shouldBeVisible
private static boolean shouldBeVisible(int chunkViewRadius, int chunkX, int chunkZ, int x, int z)
-