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 enum
Nested 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 TypeFieldDescriptionstatic final ResourceLocation
private static final float
private static final float
private static final BlockElementFace.UVs
private static final BlockElementFace.UVs
private static final TextureSlots.Data
Fields inherited from interface net.minecraft.client.resources.model.UnbakedModel
PARTICLE_TEXTURE_REFERENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static QuadCollection
bake
(TextureSlots p_387202_, ModelBaker p_405519_, ModelState p_387172_, ModelDebugName p_405600_) private static QuadCollection
bake
(TextureSlots pTextureSlots, SpriteGetter pSprites, ModelState pModelState, ModelDebugName pDebugName) 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) private static void
createOrExpandSpan
(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 boolean
isTransparent
(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, wait
Methods inherited from interface net.minecraft.client.resources.model.UnbakedModel
ambientOcclusion, parent, transforms
Methods 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:
textureSlots
in interfaceUnbakedModel
-
geometry
- Specified by:
geometry
in interfaceUnbakedModel
-
guiLight
- Specified by:
guiLight
in 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)
-