Class BakedRenderable
java.lang.Object
net.minecraftforge.client.model.renderable.BakedRenderable
- All Implemented Interfaces:
IRenderable<IModelData>
Wrapper to make it easier to draw baked models in renderers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BakedModelprivate static final Direction[]private final Random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BakedRenderableof(BakedModel model) Constructs a BakedRenderable from the given model.static BakedRenderableof(ResourceLocation model) Constructs a BakedRenderable from the given model location.voidrender(PoseStack poseStack, MultiBufferSource bufferSource, Function<ResourceLocation, RenderType> renderTypeFunction, int lightmapCoord, int overlayCoord, float partialTicks, IModelData renderValues) Draws the renderable by adding the geometry to the providedMultiBufferSourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.model.renderable.IRenderable
withValues
-
Field Details
-
MODEL_FACINGS
-
rand
-
model
-
-
Constructor Details
-
BakedRenderable
-
-
Method Details
-
of
Constructs a BakedRenderable from the given model location. The model is expected to have been baked ahead of time. You can ensure the model is baked by callingForgeModelBakery.addSpecialModel(ResourceLocation)from withinModelRegistryEvent. -
of
Constructs a BakedRenderable from the given model. -
render
public void render(PoseStack poseStack, MultiBufferSource bufferSource, Function<ResourceLocation, RenderType> renderTypeFunction, int lightmapCoord, int overlayCoord, float partialTicks, IModelData renderValues) Description copied from interface:IRenderableDraws the renderable by adding the geometry to the providedMultiBufferSource- Specified by:
renderin interfaceIRenderable<IModelData>- Parameters:
poseStack- the pose stackbufferSource- the target buffer source to dump the data intorenderTypeFunction- a function that provides a RenderType for the given texturelightmapCoord- the lightmap coordinates representing the current lighting conditions. SeeLightTextureoverlayCoord- the overlay coordinates representing the current overlay status. SeeOverlayTexturepartialTicks- the current time expressed in the fraction of a tick elapsed since the last client tick.renderValues- the context data used for rendering
-