Class BlockModel
java.lang.Object
net.minecraft.client.renderer.block.model.BlockModel
- All Implemented Interfaces:
ResolvableModel
,UnbakedModel
,IUnbakedModelExtension
,ExtendedUnbakedModel
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel
ResolvableModel.Resolver
Nested classes/interfaces inherited from interface net.minecraft.client.resources.model.UnbakedModel
UnbakedModel.GuiLight
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<BlockElement> static final com.google.gson.Gson
private final UnbakedModel.GuiLight
private final Boolean
private UnbakedModel
private final ResourceLocation
private final RenderTypeGroup
private final Transformation
private final TextureSlots.Data
private final ItemTransforms
Fields inherited from interface net.minecraft.client.resources.model.UnbakedModel
DEFAULT_AMBIENT_OCCLUSION, DEFAULT_GUI_LIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionBlockModel
(ResourceLocation p_273263_, List<BlockElement> p_272668_, TextureSlots.Data p_386899_, Boolean p_272676_, UnbakedModel.GuiLight p_387948_, ItemTransforms p_273480_) BlockModel
(ResourceLocation p_273263_, List<BlockElement> p_272668_, TextureSlots.Data p_386899_, Boolean p_272676_, UnbakedModel.GuiLight p_387948_, ItemTransforms p_273480_, Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String, Boolean> partVisibility) -
Method Summary
Modifier and TypeMethodDescriptionbake
(TextureSlots p_387258_, ModelBaker p_388168_, ModelState p_111453_, boolean p_111455_, boolean p_387632_, ItemTransforms p_386577_, ContextMap additionalProperties) bake
override with additional context.void
fillAdditionalProperties
(ContextMap.Builder propertiesBuilder) Appends additional properties for this model to the builder.static BlockModel
fromStream
(Reader p_111462_) Deprecated.(package private) List
<BlockElement> (package private) ResourceLocation
void
resolveDependencies
(ResolvableModel.Resolver p_386874_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.model.ExtendedUnbakedModel
bake
-
Field Details
-
GSON
public static final com.google.gson.Gson GSON -
elements
-
guiLight
-
hasAmbientOcclusion
-
transforms
-
textureSlots
-
parent
-
parentLocation
-
rootTransform
-
renderTypeGroup
-
partVisibility
-
-
Constructor Details
-
BlockModel
public BlockModel(@Nullable ResourceLocation p_273263_, List<BlockElement> p_272668_, TextureSlots.Data p_386899_, @Nullable Boolean p_272676_, @Nullable UnbakedModel.GuiLight p_387948_, @Nullable ItemTransforms p_273480_) -
BlockModel
public BlockModel(@Nullable ResourceLocation p_273263_, List<BlockElement> p_272668_, TextureSlots.Data p_386899_, @Nullable Boolean p_272676_, @Nullable UnbakedModel.GuiLight p_387948_, @Nullable ItemTransforms p_273480_, @Nullable Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String, Boolean> partVisibility)
-
-
Method Details
-
fromStream
Deprecated.Neo: useUnbakedModelParser.parse(Reader)
instead -
getAmbientOcclusion
- Specified by:
getAmbientOcclusion
in interfaceUnbakedModel
-
getGuiLight
- Specified by:
getGuiLight
in interfaceUnbakedModel
-
resolveDependencies
- Specified by:
resolveDependencies
in interfaceResolvableModel
-
getParent
- Specified by:
getParent
in interfaceUnbakedModel
-
getTextureSlots
- Specified by:
getTextureSlots
in interfaceUnbakedModel
-
getTransforms
- Specified by:
getTransforms
in interfaceUnbakedModel
-
bake
public BakedModel bake(TextureSlots p_387258_, ModelBaker p_388168_, ModelState p_111453_, boolean p_111455_, boolean p_387632_, ItemTransforms p_386577_, ContextMap additionalProperties) Description copied from interface:IUnbakedModelExtension
bake
override with additional context. Consider inheriting fromExtendedUnbakedModel
which overrides the vanillabake
method.- Specified by:
bake
in interfaceExtendedUnbakedModel
- Specified by:
bake
in interfaceIUnbakedModelExtension
- Parameters:
additionalProperties
- additional properties provided by NeoForge or mods
-
getElements
-
getParentLocation
-
fillAdditionalProperties
Description copied from interface:IUnbakedModelExtension
Appends additional properties for this model to the builder.This method will already have been called on the parent models. It can modify the properties added by a parent model and/or add its own. This ensures that the properties are merged across the model parent-child chain.
The context map containing all the properties will be passed as the last parameter to
IUnbakedModelExtension.bake(TextureSlots, ModelBaker, ModelState, boolean, boolean, ItemTransforms, ContextMap)
.- Specified by:
fillAdditionalProperties
in interfaceIUnbakedModelExtension
- See Also:
-
UnbakedModelParser.parse(Reader)
instead