Class ServerTickEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.tick.ServerTickEvent
- Direct Known Subclasses:
ServerTickEvent.Post
,ServerTickEvent.Pre
public abstract class ServerTickEvent
extends net.neoforged.bus.api.Event
Base class of the two server tick events.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
ServerTickEvent.Post
is fired once per server tick, after the server performs work for the current tick.static class
ServerTickEvent.Pre
is fired once per server tick, before the server performs work for the current tick. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BooleanSupplier
private final net.minecraft.server.MinecraftServer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServerTickEvent
(BooleanSupplier hasTime, net.minecraft.server.MinecraftServer server) -
Method Summary
-
Field Details
-
hasTime
-
server
private final net.minecraft.server.MinecraftServer server
-
-
Constructor Details
-
ServerTickEvent
-
-
Method Details
-
hasTime
public boolean hasTime()Returns true if the server has enough time to perform any additional tasks (usually IO related) during the current tick, otherwise false.- Returns:
- true if the server has enough time to perform any additional tasks (usually IO related) during the current tick, otherwise false
-
getServer
public net.minecraft.server.MinecraftServer getServer()Returns the server instance.- Returns:
- the server instance
-