Package com.pixelmonmod.pixelmon
Class TickHandler
java.lang.Object
com.pixelmonmod.pixelmon.TickHandler
Handles tick events.
-
Field Summary
Modifier and TypeFieldDescriptionint
Timer for syncing Minecraft time with system time. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deregisterStarterList
(net.minecraft.server.level.ServerPlayer player) Removes a player from the starter Pokémon GUI list.void
onClientTick
(net.minecraftforge.event.TickEvent.ClientTickEvent event) void
onPlayerJoinedServer
(net.minecraftforge.event.entity.EntityJoinLevelEvent event) void
onPlayerTick
(net.minecraftforge.event.TickEvent.PlayerTickEvent event) Updates the player.void
onServerTick
(net.minecraftforge.event.TickEvent.ServerTickEvent event) Syncs world time and checks for opening the starter Pokémon GUI.void
onWorldTick
(net.minecraftforge.event.TickEvent.ServerTickEvent event) static void
registerStarterList
(net.minecraft.server.level.ServerPlayer player) Adds a player to the starter Pokémon GUI list.
-
Field Details
-
worldCounter
public int worldCounterTimer for syncing Minecraft time with system time.
-
-
Constructor Details
-
TickHandler
public TickHandler()
-
-
Method Details
-
onPlayerTick
public void onPlayerTick(net.minecraftforge.event.TickEvent.PlayerTickEvent event) Updates the player.- Parameters:
event
- The event that was fired.
-
onClientTick
public void onClientTick(net.minecraftforge.event.TickEvent.ClientTickEvent event) -
onServerTick
public void onServerTick(net.minecraftforge.event.TickEvent.ServerTickEvent event) Syncs world time and checks for opening the starter Pokémon GUI.- Parameters:
event
- The event that was fired.
-
onWorldTick
public void onWorldTick(net.minecraftforge.event.TickEvent.ServerTickEvent event) -
registerStarterList
public static void registerStarterList(net.minecraft.server.level.ServerPlayer player) Adds a player to the starter Pokémon GUI list.- Parameters:
player
- The player to add.
-
deregisterStarterList
public static void deregisterStarterList(net.minecraft.server.level.ServerPlayer player) Removes a player from the starter Pokémon GUI list.- Parameters:
player
- The player to remove.
-
onPlayerJoinedServer
public void onPlayerJoinedServer(net.minecraftforge.event.entity.EntityJoinLevelEvent event)
-