Class ClientUtil

java.lang.Object
com.hammy275.immersivemc.client.ClientUtil

public class ClientUtil extends Object
  • Field Details

    • maxLight

      public static final int maxLight
    • immersiveLeftClickCooldown

      public static int immersiveLeftClickCooldown
  • Constructor Details

    • ClientUtil

      public ClientUtil()
  • Method Details

    • clearDisabledImmersives

      public static void clearDisabledImmersives()
    • createConfigScreenInfo

      public static ImmersiveConfigScreenInfo createConfigScreenInfo(String keyName, Supplier<net.minecraft.world.item.ItemStack> optionItem, Function<ActiveConfig,Boolean> configGetter, BiConsumer<ActiveConfig,Boolean> configSetter)
    • playerPos

      public static net.minecraft.world.phys.Vec3 playerPos()
      Gets player position while accounting for partial ticks (getFrameTime())
      Returns:
      Player position while accounting for partial ticks
    • getStartAndEndOfLookTrace

      public static net.minecraft.util.Tuple<net.minecraft.world.phys.Vec3,net.minecraft.world.phys.Vec3> getStartAndEndOfLookTrace(net.minecraft.world.entity.player.Player player)
    • setRightClickCooldown

      public static void setRightClickCooldown(int amount)
    • getPlacementModeIndirect

      public static PlacementMode getPlacementModeIndirect()
    • getPlacementModeIndirect

      public static PlacementMode getPlacementModeIndirect(boolean leftClickAlreadyDoesSomething)
    • getClosestDirection

      public static net.minecraft.core.Direction getClosestDirection(net.minecraft.world.phys.Vec3 velocity)
      Get Direction best represented by the velocity of a controller
      Parameters:
      velocity - Velocity from getVelocity()
      Returns:
      A Direction best representing the current direction of the velocity.
    • openBag

      public static void openBag(net.minecraft.world.entity.player.Player player)
    • findImmersive

      @Nullable public static <I extends ImmersiveInfo> I findImmersive(Immersive<I,?> immersive, net.minecraft.core.BlockPos pos)