Class SceneGraphPath

java.lang.Object
com.thecsdev.commonmc.api.client.gui.util.SceneGraphPath

@Environment(CLIENT) public final class SceneGraphPath extends Object
Represents a path in the scene graph from a parent TElement down to a child TElement, via all intermediate elements.

Each segment in the path specifies the expected Class type of the child TElement at that segment, as well as the expected index of that child within its parent segment.

  • Constructor Details

    • SceneGraphPath

      public SceneGraphPath(@NotNull @NotNull Class<? extends TElement> child, int childIndex, @Nullable @Nullable SceneGraphPath path) throws NullPointerException
      Creates a new SceneGraphPath segment instance.
      Parameters:
      child - The expected Class type of the child TElement at this segment.
      childIndex - The expected index of the child TElement within its parent at this segment.
      path - The next segment in the scene graph path, or null if this is the last segment.
      Throws:
      NullPointerException - If child is null.
  • Method Details