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

    • getRegistryAccess

      public static net.minecraft.core.RegistryAccess getRegistryAccess()
    • lerpVec3

      public static net.minecraft.world.phys.Vec3 lerpVec3(net.minecraft.world.phys.Vec3 start, net.minecraft.world.phys.Vec3 end, float partialTick)
    • 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 the partial tick.
      Returns:
      The interpolated player position.
    • 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)
    • 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)