Class SleepFinishedTimeEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.SleepFinishedTimeEvent
This event is fired when all players are asleep and the time should be set to day.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.
- 
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.level.LevelEvent
LevelEvent.CreateSpawnPosition, LevelEvent.Load, LevelEvent.PotentialSpawns, LevelEvent.Save, LevelEvent.UnloadNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result - 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionlongbooleansetTimeAddition(long newTimeIn) Sets the new time which should be set when all players wake upMethods inherited from class net.neoforged.neoforge.event.level.LevelEvent
getLevelMethods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult 
- 
Field Details
- 
newTime
private long newTime - 
minTime
private final long minTime 
 - 
 - 
Constructor Details
- 
SleepFinishedTimeEvent
 
 - 
 - 
Method Details
- 
getNewTime
public long getNewTime()- Returns:
 - the new time
 
 - 
setTimeAddition
public boolean setTimeAddition(long newTimeIn) Sets the new time which should be set when all players wake up- Parameters:
 newTimeIn- The new time at wakeup- Returns:
 falseif newTimeIn was lower than current time
 
 -