Package com.supermartijn642.fusion.model
Class ModelBakingContextImpl
java.lang.Object
com.supermartijn642.fusion.model.ModelBakingContextImpl
- All Implemented Interfaces:
ModelBakingContext
Created 27/04/2023 by SuperMartijn642
-
Constructor Summary
ConstructorsConstructorDescriptionModelBakingContextImpl(net.minecraft.client.resources.model.ModelBakery modelBakery, Function<net.minecraft.client.resources.model.Material, net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.resources.ResourceLocation modelIdentifier) -
Method Summary
Modifier and TypeMethodDescriptiongetModel(net.minecraft.resources.ResourceLocation identifier) Gets the model corresponding to the given identifier.net.minecraft.client.resources.model.ModelBakerynet.minecraft.resources.ResourceLocationnet.minecraft.client.renderer.texture.TextureAtlasSpritegetTexture(SpriteIdentifier identifier) Gets the sprite for the given material.net.minecraft.client.renderer.texture.TextureAtlasSpritegetTexture(net.minecraft.resources.ResourceLocation atlas, net.minecraft.resources.ResourceLocation texture) Gets the sprite for the given atlas and texture.net.minecraft.client.resources.model.ModelStateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.supermartijn642.fusion.api.model.ModelBakingContext
getBlockTexture
-
Constructor Details
-
ModelBakingContextImpl
public ModelBakingContextImpl(net.minecraft.client.resources.model.ModelBakery modelBakery, Function<net.minecraft.client.resources.model.Material, net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.resources.ResourceLocation modelIdentifier)
-
-
Method Details
-
getModelBakery
public net.minecraft.client.resources.model.ModelBakery getModelBakery()- Specified by:
getModelBakeryin interfaceModelBakingContext- Returns:
- the model bakery
-
getTexture
public net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(SpriteIdentifier identifier) Description copied from interface:ModelBakingContextGets the sprite for the given material.- Specified by:
getTexturein interfaceModelBakingContext- Parameters:
identifier- identifier for the sprite
-
getTexture
public net.minecraft.client.renderer.texture.TextureAtlasSprite getTexture(net.minecraft.resources.ResourceLocation atlas, net.minecraft.resources.ResourceLocation texture) Description copied from interface:ModelBakingContextGets the sprite for the given atlas and texture.- Specified by:
getTexturein interfaceModelBakingContext- Parameters:
atlas- atlas which the texture is stitched totexture- texture identifier
-
getTransformation
public net.minecraft.client.resources.model.ModelState getTransformation()- Specified by:
getTransformationin interfaceModelBakingContext- Returns:
- the transformations which should be applied to the model
-
getModelIdentifier
public net.minecraft.resources.ResourceLocation getModelIdentifier()- Specified by:
getModelIdentifierin interfaceModelBakingContext- Returns:
- the identifier of the model.
-
getModel
Description copied from interface:ModelBakingContextGets the model corresponding to the given identifier. Only models which were returned fromModelType.getModelDependencies(Object)may be requested.- Specified by:
getModelin interfaceModelBakingContext- Parameters:
identifier- identifier for the model
-