Package net.minecraft.client
Class PeriodicNotificationManager
java.lang.Object
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<String,List<PeriodicNotificationManager.Notification>>>
net.minecraft.client.PeriodicNotificationManager
- All Implemented Interfaces:
AutoCloseable
,PreparableReloadListener
public class PeriodicNotificationManager
extends SimplePreparableReloadListener<Map<String,List<PeriodicNotificationManager.Notification>>>
implements AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
(package private) static class
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.mojang.serialization.Codec
<Map<String, List<PeriodicNotificationManager.Notification>>> private static final org.slf4j.Logger
private final ResourceLocation
private final it.unimi.dsi.fastutil.objects.Object2BooleanFunction
<String> private Timer
-
Constructor Summary
ConstructorDescriptionPeriodicNotificationManager
(ResourceLocation p_205293_, it.unimi.dsi.fastutil.objects.Object2BooleanFunction<String> p_205294_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(Map<String, List<PeriodicNotificationManager.Notification>> p_205318_, ResourceManager p_205319_, ProfilerFiller p_205320_) private long
private long
calculateOptimalPeriod
(List<PeriodicNotificationManager.Notification> p_205313_, long p_205314_) void
close()
protected Map
<String, List<PeriodicNotificationManager.Notification>> prepare
(ResourceManager p_205300_, ProfilerFiller p_205301_) private void
Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener
reload
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
CODEC
private static final com.mojang.serialization.Codec<Map<String,List<PeriodicNotificationManager.Notification>>> CODEC -
LOGGER
private static final org.slf4j.Logger LOGGER -
notifications
-
selector
-
timer
-
notificationTask
-
-
Constructor Details
-
PeriodicNotificationManager
public PeriodicNotificationManager(ResourceLocation p_205293_, it.unimi.dsi.fastutil.objects.Object2BooleanFunction<String> p_205294_)
-
-
Method Details
-
prepare
protected Map<String,List<PeriodicNotificationManager.Notification>> prepare(ResourceManager p_205300_, ProfilerFiller p_205301_) - Specified by:
prepare
in classSimplePreparableReloadListener<Map<String,
List<PeriodicNotificationManager.Notification>>>
-
apply
protected void apply(Map<String, List<PeriodicNotificationManager.Notification>> p_205318_, ResourceManager p_205319_, ProfilerFiller p_205320_) - Specified by:
apply
in classSimplePreparableReloadListener<Map<String,
List<PeriodicNotificationManager.Notification>>>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
stopTimer
private void stopTimer() -
calculateOptimalPeriod
private long calculateOptimalPeriod(List<PeriodicNotificationManager.Notification> p_205313_, long p_205314_) -
calculateInitialDelay
-