Interface IPlayerContext


public interface IPlayerContext
Since:
11/12/2018
Author:
Brady
  • Method Details

    • minecraft

      net.minecraft.client.Minecraft minecraft()
    • player

      net.minecraft.client.player.LocalPlayer player()
    • playerController

    • world

      net.minecraft.world.level.Level world()
    • entities

      default Iterable<net.minecraft.world.entity.Entity> entities()
    • entitiesStream

      default Stream<net.minecraft.world.entity.Entity> entitiesStream()
    • worldData

    • objectMouseOver

      net.minecraft.world.phys.HitResult objectMouseOver()
    • playerFeet

    • playerFeetAsVec

      default net.minecraft.world.phys.Vec3 playerFeetAsVec()
    • playerHead

      default net.minecraft.world.phys.Vec3 playerHead()
    • playerMotion

      default net.minecraft.world.phys.Vec3 playerMotion()
    • viewerPos

    • playerRotations

    • eyeHeight

      @Deprecated static double eyeHeight(boolean ifSneaking)
      Deprecated.
      Use entity.getEyeHeight(Pose.CROUCHING) instead
      Returns the player's eye height, taking into account whether or not the player is sneaking.
      Parameters:
      ifSneaking - Whether or not the player is sneaking
      Returns:
      The player's eye height
    • getSelectedBlock

      default Optional<net.minecraft.core.BlockPos> getSelectedBlock()
      Returns the block that the crosshair is currently placed over. Updated once per tick.
      Returns:
      The position of the highlighted block
    • isLookingAt

      default boolean isLookingAt(net.minecraft.core.BlockPos pos)