java.lang.Object
me.fami6xx.rpuniverse.core.misc.raycast.RayCast

public class RayCast extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, double maxDistance)
     
    RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, double maxDistance, double increment)
     
    RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, org.bukkit.Location endLocation, double maxDistance)
     
    RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, org.bukkit.Location endLocation, double maxDistance, double increment)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addIgnoredMaterials(org.bukkit.Material... materials)
    Add materials to ignore when RayCast hits a block
    When RayCast hits a liquid or a block algorithm checks its material if its see through (Like Glass, Water, Grass, Flowers etc.)
    Shoots RayCast in given direction and looping through blocks it hits
    showLoopedBlocks(org.bukkit.entity.Player player)
    Shows blocks RayCast went through
    showRayCast(org.bukkit.entity.Player player)
    Shows RayCast via particles

    Methods inherited from class java.lang.Object

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

    • RayCast

      public RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, double maxDistance)
    • RayCast

      public RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, double maxDistance, double increment)
    • RayCast

      public RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, org.bukkit.Location endLocation, double maxDistance)
    • RayCast

      public RayCast(org.bukkit.util.Vector vector, org.bukkit.World world, org.bukkit.Location startLocation, org.bukkit.Location endLocation, double maxDistance, double increment)
  • Method Details

    • showRayCast

      public RayCast showRayCast(org.bukkit.entity.Player player)
      Shows RayCast via particles
      Parameters:
      player - Player you want to show the ray cast
      Returns:
      Returns this
    • showLoopedBlocks

      public RayCast showLoopedBlocks(org.bukkit.entity.Player player)
      Shows blocks RayCast went through
      Parameters:
      player - Player you want to show the looped blocks
      Returns:
      Returns this
    • enableIgnoreSeeThroughMaterials

      public RayCast enableIgnoreSeeThroughMaterials()
      When RayCast hits a liquid or a block algorithm checks its material if its see through (Like Glass, Water, Grass, Flowers etc.)
      Returns:
      Returns this
    • addIgnoredMaterials

      public RayCast addIgnoredMaterials(org.bukkit.Material... materials)
      Add materials to ignore when RayCast hits a block
      Parameters:
      materials - Blocks you want to ignore when shooting RayCast
      Returns:
      Returns this
    • shoot

      public RayCastResult shoot()
      Shoots RayCast in given direction and looping through blocks it hits
      Returns:
      Returns a result of this RayCast