Class RayCast
java.lang.Object
me.fami6xx.rpuniverse.core.misc.raycast.RayCast
-
Constructor Summary
ConstructorsConstructorDescriptionRayCast(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 TypeMethodDescriptionaddIgnoredMaterials(org.bukkit.Material... materials)Add materials to ignore when RayCast hits a blockWhen RayCast hits a liquid or a block algorithm checks its material if its see through (Like Glass, Water, Grass, Flowers etc.)shoot()Shoots RayCast in given direction and looping through blocks it hitsshowLoopedBlocks(org.bukkit.entity.Player player)Shows blocks RayCast went throughshowRayCast(org.bukkit.entity.Player player)Shows RayCast via particles
-
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
Shows RayCast via particles- Parameters:
player- Player you want to show the ray cast- Returns:
- Returns this
-
showLoopedBlocks
Shows blocks RayCast went through- Parameters:
player- Player you want to show the looped blocks- Returns:
- Returns this
-
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
Add materials to ignore when RayCast hits a block- Parameters:
materials- Blocks you want to ignore when shooting RayCast- Returns:
- Returns this
-
shoot
Shoots RayCast in given direction and looping through blocks it hits- Returns:
- Returns a result of this RayCast
-