Class ItemModelGenerator
java.lang.Object
net.minecraft.client.renderer.block.model.ItemModelGenerator
- All Implemented Interfaces:
ResolvableModel,UnbakedModel,UnbakedModelExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static enumNested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel
ResolvableModel.ResolverNested classes/interfaces inherited from interface net.minecraft.client.resources.model.UnbakedModel
UnbakedModel.GuiLight -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ResourceLocationprivate static final floatprivate static final floatprivate static final BlockElementFace.UVsprivate static final BlockElementFace.UVsprivate static final TextureSlots.DataFields inherited from interface net.minecraft.client.resources.model.UnbakedModel
PARTICLE_TEXTURE_REFERENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static QuadCollectionbake(TextureSlots p_387202_, ModelBaker p_405519_, ModelState p_387172_, ModelDebugName p_405600_) private static QuadCollectionbake(TextureSlots pTextureSlots, SpriteGetter pSprites, ModelState pModelState, ModelDebugName pDebugName) private static voidcheckTransition(ItemModelGenerator.SpanFacing pSpanFacing, List<ItemModelGenerator.Span> pListSpans, SpriteContents pContents, int pFrameIndex, int pPixelX, int pPixelY, int pSpriteWidth, int pSpriteHeight, boolean pTransparent) private static voidcreateOrExpandSpan(List<ItemModelGenerator.Span> pListSpans, ItemModelGenerator.SpanFacing pSpanFacing, int pPixelX, int pPixelY) private static List<BlockElement> createSideElements(SpriteContents pSprite, String pTexture, int pTintIndex) geometry()private static List<ItemModelGenerator.Span> getSpans(SpriteContents pSprite) guiLight()private static booleanisTransparent(SpriteContents pSprite, int pFrameIndex, int pPixelX, int pPixelY, int pSpriteWidth, int pSpriteHeight) static List<BlockElement> processFrames(int pTintIndex, String pTexture, SpriteContents pSprite) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.resources.model.UnbakedModel
ambientOcclusion, parent, transformsMethods inherited from interface net.neoforged.neoforge.client.extensions.UnbakedModelExtension
fillAdditionalProperties, resolveDependencies
-
Field Details
-
GENERATED_ITEM_MODEL_ID
-
LAYERS
-
MIN_Z
private static final float MIN_Z- See Also:
-
MAX_Z
private static final float MAX_Z- See Also:
-
TEXTURE_SLOTS
-
SOUTH_FACE_UVS
-
NORTH_FACE_UVS
-
-
Constructor Details
-
ItemModelGenerator
public ItemModelGenerator()
-
-
Method Details
-
textureSlots
- Specified by:
textureSlotsin interfaceUnbakedModel
-
geometry
- Specified by:
geometryin interfaceUnbakedModel
-
guiLight
- Specified by:
guiLightin interfaceUnbakedModel
-
bake
private static QuadCollection bake(TextureSlots p_387202_, ModelBaker p_405519_, ModelState p_387172_, ModelDebugName p_405600_) -
bake
private static QuadCollection bake(TextureSlots pTextureSlots, SpriteGetter pSprites, ModelState pModelState, ModelDebugName pDebugName) -
processFrames
public static List<BlockElement> processFrames(int pTintIndex, String pTexture, SpriteContents pSprite) -
createSideElements
private static List<BlockElement> createSideElements(SpriteContents pSprite, String pTexture, int pTintIndex) -
getSpans
-
checkTransition
private static void checkTransition(ItemModelGenerator.SpanFacing pSpanFacing, List<ItemModelGenerator.Span> pListSpans, SpriteContents pContents, int pFrameIndex, int pPixelX, int pPixelY, int pSpriteWidth, int pSpriteHeight, boolean pTransparent) -
createOrExpandSpan
private static void createOrExpandSpan(List<ItemModelGenerator.Span> pListSpans, ItemModelGenerator.SpanFacing pSpanFacing, int pPixelX, int pPixelY) -
isTransparent
private static boolean isTransparent(SpriteContents pSprite, int pFrameIndex, int pPixelX, int pPixelY, int pSpriteWidth, int pSpriteHeight)
-