Package net.minecraftforge.client
Class RenderTypeHelper
java.lang.Object
net.minecraftforge.client.RenderTypeHelper
Provides helper functions replacing those in
ItemBlockRenderTypes
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull RenderType
getEntityRenderType
(RenderType chunkRenderType, boolean cull) Provides aRenderType
usingDefaultVertexFormat.NEW_ENTITY
for the givenDefaultVertexFormat.BLOCK
format.static @NotNull RenderType
getFallbackItemRenderType
(ItemStack stack, BakedModel model, boolean cull) Provides a fallbackRenderType
for the givenItemStack
in the case that none is explicitly specified.static @NotNull RenderType
getMovingBlockRenderType
(RenderType renderType) Provides aRenderType
fit 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 aRenderType
usingDefaultVertexFormat.NEW_ENTITY
for the givenDefaultVertexFormat.BLOCK
format. This should be called for eachRenderType
returned byIForgeBakedModel.getRenderTypes(BlockState, RandomSource, ModelData)
.Mimics the behavior of vanilla's
ItemBlockRenderTypes.getRenderType(BlockState, boolean)
. -
getMovingBlockRenderType
Provides aRenderType
fit for rendering moving blocks given the specified chunk render type. This should be called for eachRenderType
returned 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 fallbackRenderType
for the givenItemStack
in 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
.
-