Package net.minecraftforge.client
Class RenderTypeHelper
java.lang.Object
net.minecraftforge.client.RenderTypeHelper
Provides helper functions replacing those in
ItemBlockRenderTypes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RenderTypegetEntityRenderType(RenderType chunkRenderType, boolean cull) Provides aRenderTypeusingDefaultVertexFormat.NEW_ENTITYfor the givenDefaultVertexFormat.BLOCKformat.static @NotNull RenderTypegetFallbackItemRenderType(ItemStack stack, BakedModel model, boolean cull) Provides a fallbackRenderTypefor the givenItemStackin the case that none is explicitly specified.static @NotNull RenderTypegetMovingBlockRenderType(RenderType renderType) Provides aRenderTypefit for rendering moving blocks given the specified chunk render type.
-
Constructor Details
-
RenderTypeHelper
private RenderTypeHelper()
-
-
Method Details
-
getEntityRenderType
@NotNull public static @NotNull RenderType getEntityRenderType(RenderType chunkRenderType, boolean cull) Provides aRenderTypeusingDefaultVertexFormat.NEW_ENTITYfor the givenDefaultVertexFormat.BLOCKformat. This should be called for eachRenderTypereturned byIForgeBakedModel.getRenderTypes(BlockState, RandomSource, ModelData).Mimics the behavior of vanilla's
ItemBlockRenderTypes.getRenderType(BlockState, boolean). -
getMovingBlockRenderType
Provides aRenderTypefit for rendering moving blocks given the specified chunk render type. This should be called for eachRenderTypereturned byIForgeBakedModel.getRenderTypes(BlockState, RandomSource, ModelData).Mimics the behavior of vanilla's
ItemBlockRenderTypes.getMovingBlockRenderType(BlockState). -
getFallbackItemRenderType
@NotNull public static @NotNull RenderType getFallbackItemRenderType(ItemStack stack, BakedModel model, boolean cull) Provides a fallbackRenderTypefor the givenItemStackin the case that none is explicitly specified.Mimics the behavior of vanilla's
ItemBlockRenderTypes.getRenderType(ItemStack, boolean)but removes the need to query the model again if the item is aBlockItem.
-