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 enum(package private) static final recordNested 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 Identifierprivate static final floatprivate static final floatprivate static final BlockElementFace.UVsprivate static final BlockElementFace.UVsprivate static final TextureSlots.Dataprivate static final floatFields 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 voidcheckTransition(ItemModelGenerator.SideDirection sideDirection, Set<ItemModelGenerator.SideFace> output, SpriteContents sprite, int frame, int x, int y, int width, int height) private static List<BlockElement> createSideElements(SpriteContents sprite, String texture, int tintIndex) geometry()private static Collection<ItemModelGenerator.SideFace> getSideFaces(SpriteContents sprite) @Nullable UnbakedModel.GuiLightguiLight()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
-
UV_SHRINK
private static final float UV_SHRINK- See Also:
-
-
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) -
processFrames
public static List<BlockElement> processFrames(int tintIndex, String texture, SpriteContents sprite) -
createSideElements
private static List<BlockElement> createSideElements(SpriteContents sprite, String texture, int tintIndex) -
getSideFaces
-
checkTransition
private static void checkTransition(ItemModelGenerator.SideDirection sideDirection, Set<ItemModelGenerator.SideFace> output, SpriteContents sprite, int frame, int x, int y, int width, int height) -
isTransparent
private static boolean isTransparent(SpriteContents sprite, int frameIndex, int pixelX, int pixelY, int spriteWidth, int spriteHeight)
-