Interface VisualEmbedding

All Superinterfaces:
VisualizationContext
All Known Implementing Classes:
AbstractEmbeddedEnvironment, NestedEmbeddedEnvironment, TopLevelEmbeddedEnvironment

@BackendImplemented public interface VisualEmbedding extends VisualizationContext
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    collectLight(net.minecraft.world.level.BlockAndTintGetter level, int minX, int minY, int minZ, int sizeX, int sizeY, int sizeZ)
    Collect light information from the given level for the given box.
    void
    Delete this embedding.
    void
    Reset any collected lighting information.
    void
    transforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal)
    Set the transformation matrices for the embedding.

    Methods inherited from interface com.jozufozu.flywheel.api.visualization.VisualizationContext

    createEmbedding, instancerProvider, renderOrigin
  • Method Details

    • transforms

      void transforms(org.joml.Matrix4fc pose, org.joml.Matrix3fc normal)
      Set the transformation matrices for the embedding.
      Parameters:
      pose - The model matrix.
      normal - The normal matrix.
    • collectLight

      void collectLight(net.minecraft.world.level.BlockAndTintGetter level, int minX, int minY, int minZ, int sizeX, int sizeY, int sizeZ)
      Collect light information from the given level for the given box.

      Call this method on as many or as few boxes as you need to encompass all child visuals of this embedding.

      After this method is called, instances rendered from this embedding within the given box will be lit as if they were in the given level.

      Parameters:
      level - The level to collect light information from.
      minX - The minimum x coordinate of the box.
      minY - The minimum y coordinate of the box.
      minZ - The minimum z coordinate of the box.
      sizeX - The size of the box in the x direction.
      sizeY - The size of the box in the y direction.
      sizeZ - The size of the box in the z direction.
    • invalidateLight

      void invalidateLight()
      Reset any collected lighting information.
    • delete

      void delete()
      Delete this embedding.

      After this method exits, the embedding will continue to function in the state it was in before this method was called. Once all child instancers are deleted, the resources owned by this embedding will be freed. Creating new instancers after calling this method will throw an error.