Class StandaloneGeometryBakingContext
java.lang.Object
net.minecraftforge.client.model.geometry.StandaloneGeometryBakingContext
- All Implemented Interfaces:
IGeometryBakingContext
A geometry baking context that is not bound to block/item model loading.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StandaloneGeometryBakingContextprivate final booleanstatic final ResourceLocationprivate final ResourceLocationprivate final @Nullable ResourceLocationprivate final Transformationprivate final ItemTransformsprivate final booleanprivate final booleanprivate final BiPredicate<String,Boolean> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateStandaloneGeometryBakingContext(ResourceLocation modelName, Predicate<String> materialCheck, Function<String, Material> materialLookup, boolean isGui3d, boolean useBlockLight, boolean useAmbientOcclusion, ItemTransforms transforms, Transformation rootTransform, @Nullable ResourceLocation renderTypeHint, BiPredicate<String, Boolean> visibilityTest) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder(IGeometryBakingContext parent) create(Map<String, ResourceLocation> textures) create(ResourceLocation modelName) create(ResourceLocation modelName, Map<String, ResourceLocation> textures) getMaterial(String name) Resolves the final texture name, taking into account texture aliases and replacements.Returns the name of the model being baked for logging and caching purposes..@Nullable ResourceLocationReturns a hint of the render type this model should use. Custom loaders may ignore this..Returns the root transformation to be applied to all variants of this model, regardless of item transforms..Returns the transforms for display in item form..booleanhasMaterial(String name) Checks if a material is present in the model.booleanisComponentVisible(String component, boolean fallback) Queries the visibility of a component of this model.booleanisGui3d()Returns true if this model should render in 3D in a GUI, false otherwise.booleanReturns true if per-vertex ambient occlusion should be used for this model, false otherwise.booleanReturns true if block lighting should be used for this model, false otherwise.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.model.geometry.IGeometryBakingContext
getRenderType
-
Field Details
-
LOCATION
-
INSTANCE
-
modelName
-
materialCheck
-
materialLookup
-
isGui3d
private final boolean isGui3d -
useBlockLight
private final boolean useBlockLight -
useAmbientOcclusion
private final boolean useAmbientOcclusion -
transforms
-
rootTransform
-
renderTypeHint
-
visibilityTest
-
-
Constructor Details
-
StandaloneGeometryBakingContext
private StandaloneGeometryBakingContext(ResourceLocation modelName, Predicate<String> materialCheck, Function<String, Material> materialLookup, boolean isGui3d, boolean useBlockLight, boolean useAmbientOcclusion, ItemTransforms transforms, Transformation rootTransform, @Nullable @Nullable ResourceLocation renderTypeHint, BiPredicate<String, Boolean> visibilityTest)
-
-
Method Details
-
create
-
create
-
create
public static StandaloneGeometryBakingContext create(ResourceLocation modelName, Map<String, ResourceLocation> textures) -
getModelName
Description copied from interface:IGeometryBakingContextReturns the name of the model being baked for logging and caching purposes..- Specified by:
getModelNamein interfaceIGeometryBakingContext- Returns:
- the name of the model being baked for logging and caching purposes.
-
hasMaterial
Description copied from interface:IGeometryBakingContextChecks if a material is present in the model.- Specified by:
hasMaterialin interfaceIGeometryBakingContext- Parameters:
name- The name of the material- Returns:
- true if the material is present, false otherwise
-
getMaterial
Description copied from interface:IGeometryBakingContextResolves the final texture name, taking into account texture aliases and replacements.- Specified by:
getMaterialin interfaceIGeometryBakingContext- Parameters:
name- The name of the material- Returns:
- The material, or the missing texture if not found
-
isGui3d
public boolean isGui3d()Description copied from interface:IGeometryBakingContextReturns true if this model should render in 3D in a GUI, false otherwise.- Specified by:
isGui3din interfaceIGeometryBakingContext- Returns:
- true if this model should render in 3D in a GUI, false otherwise
-
useBlockLight
public boolean useBlockLight()Description copied from interface:IGeometryBakingContextReturns true if block lighting should be used for this model, false otherwise.- Specified by:
useBlockLightin interfaceIGeometryBakingContext- Returns:
- true if block lighting should be used for this model, false otherwise
-
useAmbientOcclusion
public boolean useAmbientOcclusion()Description copied from interface:IGeometryBakingContextReturns true if per-vertex ambient occlusion should be used for this model, false otherwise.- Specified by:
useAmbientOcclusionin interfaceIGeometryBakingContext- Returns:
- true if per-vertex ambient occlusion should be used for this model, false otherwise
-
getTransforms
Description copied from interface:IGeometryBakingContextReturns the transforms for display in item form..- Specified by:
getTransformsin interfaceIGeometryBakingContext- Returns:
- the transforms for display in item form.
-
getRootTransform
Description copied from interface:IGeometryBakingContextReturns the root transformation to be applied to all variants of this model, regardless of item transforms..- Specified by:
getRootTransformin interfaceIGeometryBakingContext- Returns:
- the root transformation to be applied to all variants of this model, regardless of item transforms.
-
getRenderTypeHint
Description copied from interface:IGeometryBakingContextReturns a hint of the render type this model should use. Custom loaders may ignore this..- Specified by:
getRenderTypeHintin interfaceIGeometryBakingContext- Returns:
- a hint of the render type this model should use. Custom loaders may ignore this.
-
isComponentVisible
Description copied from interface:IGeometryBakingContextQueries the visibility of a component of this model.- Specified by:
isComponentVisiblein interfaceIGeometryBakingContext- Parameters:
component- The component for which to query visibilityfallback- The default visibility if an override isn't found- Returns:
- The visibility of the component
-
builder
-
builder
-