Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,53 +1,13 @@
package net.modificationstation.stationapi.api.client.render;

import net.modificationstation.stationapi.api.client.render.material.MaterialFinder;
import net.modificationstation.stationapi.api.client.render.material.RenderMaterial;
import net.modificationstation.stationapi.api.client.render.mesh.MeshBuilder;
import net.modificationstation.stationapi.api.client.render.model.BakedModelRenderer;
import net.modificationstation.stationapi.api.util.Identifier;
import org.jetbrains.annotations.Nullable;

/**
* Interface for rendering plug-ins that provide enhanced capabilities
* for model lighting, buffering and rendering. Such plug-ins implement the
* enhanced model rendering interfaces specified by the Fabric API.
*/
public interface Renderer {
/**
* Obtain a new {@link MeshBuilder} instance used to create
* baked models with enhanced features.
*
* <p>Renderer does not retain a reference to returned instances and they should be re-used for
* multiple models when possible to avoid memory allocation overhead.
*/
MeshBuilder meshBuilder();

/**
* Obtain a new {@link MaterialFinder} instance used to retrieve
* standard {@link RenderMaterial} instances.
*
* <p>Renderer does not retain a reference to returned instances and they should be re-used for
* multiple materials when possible to avoid memory allocation overhead.
*/
MaterialFinder materialFinder();

/**
* Return a material previously registered via {@link #registerMaterial(Identifier, RenderMaterial)}.
* Will return null if no material was found matching the given identifier.
*/
@Nullable
RenderMaterial materialById(Identifier id);

/**
* Register a material for re-use by other mods or models within a mod.
* The registry does not persist registrations - mods must create and register
* all materials at game initialization.
*
* <p>Returns false if a material with the given identifier is already present,
* leaving the existing material intact.
*/
boolean registerMaterial(Identifier id, RenderMaterial material);

/**
* Obtain a new {@link BakedModelRenderer} instance used to render
* baked models.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading