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 textureSlots, ModelBaker baker, ModelState modelState, ModelDebugName debugName) private static QuadCollectionbake(TextureSlots textureSlots, SpriteGetter sprites, ModelState modelState, ModelDebugName debugName) private static voidcheckTransition(ItemModelGenerator.SpanFacing spanFacing, List<ItemModelGenerator.Span> listSpans, SpriteContents contents, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight, boolean transparent) private static voidcreateOrExpandSpan(List<ItemModelGenerator.Span> listSpans, ItemModelGenerator.SpanFacing spanFacing, int pixelX, int pixelY) private static List<BlockElement> createSideElements(SpriteContents sprite, String texture, int tintIndex) geometry()private static List<ItemModelGenerator.Span> getSpans(SpriteContents sprite) guiLight()private static booleanisTransparent(SpriteContents sprite, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight) static List<BlockElement> processFrames(int tintIndex, String texture, SpriteContents sprite) 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 textureSlots, ModelBaker baker, ModelState modelState, ModelDebugName debugName) -
bake
private static QuadCollection bake(TextureSlots textureSlots, SpriteGetter sprites, ModelState modelState, ModelDebugName debugName) -
processFrames
public static List<BlockElement> processFrames(int tintIndex, String texture, SpriteContents sprite) -
createSideElements
private static List<BlockElement> createSideElements(SpriteContents sprite, String texture, int tintIndex) -
getSpans
-
checkTransition
private static void checkTransition(ItemModelGenerator.SpanFacing spanFacing, List<ItemModelGenerator.Span> listSpans, SpriteContents contents, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight, boolean transparent) -
createOrExpandSpan
private static void createOrExpandSpan(List<ItemModelGenerator.Span> listSpans, ItemModelGenerator.SpanFacing spanFacing, int pixelX, int pixelY) -
isTransparent
private static boolean isTransparent(SpriteContents sprite, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight)
-