Class CampfireTicker

java.lang.Object
com.hammy275.immersivemc.common.ticker.AbstractTicker
com.hammy275.immersivemc.server.ticker.CampfireTicker

public class CampfireTicker extends AbstractTicker
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onPlayerDisconnect(net.minecraft.world.entity.player.Player player)
    Cleanup to run on player disconnect.
    protected boolean
    shouldTick(net.minecraft.world.entity.player.Player player, org.vivecraft.api.data.VRPose pose, org.vivecraft.api.data.VRPoseHistory poseHistory)
    Method that checks if the action should be performed (usually).
    protected void
    tick(net.minecraft.world.entity.player.Player playerIn, org.vivecraft.api.data.VRPose pose, org.vivecraft.api.data.VRPoseHistory poseHistory)
    Tick method that performs some action (usually).

    Methods inherited from class AbstractTicker

    doTick, setCooldown

    Methods inherited from class Object

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

  • Constructor Details

    • CampfireTicker

      public CampfireTicker()
  • Method Details

    • tick

      protected void tick(net.minecraft.world.entity.player.Player playerIn, org.vivecraft.api.data.VRPose pose, org.vivecraft.api.data.VRPoseHistory poseHistory)
      Description copied from class: AbstractTicker
      Tick method that performs some action (usually). Called for each player on each tick when the player is not on cooldown and AbstractTicker.shouldTick(Player, VRPose, VRPoseHistory) returns true.
      Specified by:
      tick in class AbstractTicker
      Parameters:
      playerIn - The player running for this ticker.
      pose - The player's pose in VR.
      poseHistory - The player's pose history in VR.
    • shouldTick

      protected boolean shouldTick(net.minecraft.world.entity.player.Player player, org.vivecraft.api.data.VRPose pose, org.vivecraft.api.data.VRPoseHistory poseHistory)
      Description copied from class: AbstractTicker
      Method that checks if the action should be performed (usually). Called for each player on each tick when the player is not on cooldown.
      Specified by:
      shouldTick in class AbstractTicker
      Parameters:
      player - The player running for this ticker.
      pose - The player's pose in VR.
      poseHistory - The player's pose history in VR.
      Returns:
      Whether the AbstractTicker.tick(Player, VRPose, VRPoseHistory) method should be run for the player.
    • onPlayerDisconnect

      public void onPlayerDisconnect(net.minecraft.world.entity.player.Player player)
      Description copied from class: AbstractTicker
      Cleanup to run on player disconnect. Can be overridden to perform additional cleanup, but should always super call to clean up cooldown info.
      Overrides:
      onPlayerDisconnect in class AbstractTicker
      Parameters:
      player - The player disconnecting. Note that the player may not be in VR, and Vivecraft may not even be installed!