Class TickHandler

java.lang.Object
com.pixelmonmod.pixelmon.TickHandler

public class TickHandler extends Object
Handles tick events.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Timer for syncing Minecraft time with system time.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • worldCounter

      public int worldCounter
      Timer 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)