Class GridPattern
java.lang.Object
com.github.darksoulq.abyssallib.common.color.pattern.GridPattern
- All Implemented Interfaces:
ColorProvider
A procedural color provider that generates a 2D grid pattern on the XZ plane.
This pattern consists of a background color and thin lines that repeat at a set interval.
-
Constructor Summary
ConstructorsConstructorDescriptionGridPattern(org.bukkit.Color bg, org.bukkit.Color line, double size, double thickness) Constructs a new GridPattern. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Colorget(org.bukkit.util.Vector pos, double progress) Calculates the grid color for the given position.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ColorProvider
filter, get
-
Constructor Details
-
GridPattern
public GridPattern(org.bukkit.Color bg, org.bukkit.Color line, double size, double thickness) Constructs a new GridPattern.- Parameters:
bg- The backgroundColor.line- TheColorof the grid lines.size- The spacing between lines.thickness- The thickness of the lines.
-
-
Method Details
-
get
public org.bukkit.Color get(org.bukkit.util.Vector pos, double progress) Calculates the grid color for the given position.- Specified by:
getin interfaceColorProvider- Parameters:
pos- The spatialVectorposition.progress- The interpolation progress (unused).- Returns:
lineif the position falls within a line's thickness, otherwisebg.
-