{"id":166191,"date":"2026-06-09T21:15:35","date_gmt":"2026-06-09T18:15:35","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/"},"modified":"2026-06-09T21:15:35","modified_gmt":"2026-06-09T18:15:35","slug":"viewmodels","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/","title":{"rendered":"Viewmodel"},"content":{"rendered":"<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/yX6n-QmeGFU\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>&#8220;`<br \/>\n&#8220;`<br \/>\n# About Me<br \/>\nVanilla Viewmodels is a Datapack Library which adds an &#8220;animation controller&#8221; for your OBJMC rendered viewmodels ingame. To work with the datapack, you must have:<br \/>\n&#8211; An Animated (Generic in Blockbench) Model.<br \/>\n&#8211; objmc installed locally.<br \/>\n&#8211; A Basic Understanding of How Resourcepacks and Datapacks work.<br \/>\n&#8220;`<br \/>\n&#8220;`<br \/>\n# Utility:<br \/>\n&#8211; ## How it works.<br \/>\n  Since objmc only exports model+texture, it should be noted that the datapack adopts certain conventions to make sure that it works as intended. OBJMC, by default, will not &#8220;prepare you a datapack\/resourcepack&#8221; like how plugins like AnimatedJava does. Hence, creating a resourcepack that correctly follows this datapack&#8217;s convention is CRUCIAL.<\/p>\n<p>### Model in Resourcepack<br \/>\nThe optional &#8216;id&#8217; parameter accepted in the &#8220;play-animation&#8221; utils command requires a valid item_model component value. Since every objmc animation exports into its own model+texture, you must:<br \/>\n&#8211; Create an Item Model JSON that resembles the model. `e.g. &#8216;first_person:weapons\/glock&#8217; at assets\/first_person\/items\/weapons\/glock.json`<br \/>\n&#8211; Animations for the Model MUST be included in this item_model folder, where the &#8220;model with animation&#8221; is a model toggled when **STRING CUSTOM-MODEL-DATA value === ANIMATION-NAME**.<br \/>\n![code snippet](https:\/\/cdn.modrinth.com\/data\/cached_images\/b78abdc2a361919693921e38f729714d987f31bf.png)<br \/>\nHence, every animation is a CustomModelData string in the item_model JSON file. Obviously, this implies that adding multiple animations would mean that you&#8217;ll have to export every animation into its OBJ sequences => put them through OBJMC.py => take the condensed model and mention it in the item_model component.<\/p>\n<p>### Registering Models in Datapack.<br \/>\nTo Register an OBJMC Animated Model in the datapack, open the function file `vm:global\/load` and add a registry in the data modify line!<br \/>\n![code snippet](https:\/\/cdn.modrinth.com\/data\/cached_images\/7ed5ff9777292c1a3e8a6a5320d5e819c47781b7.png)<\/p>\n<p>Here&#8217;s how a registry entry&#8217;s structure looks like:<br \/>\n&#8220;`<br \/>\n{<br \/>\n  id: &#8220;first_person:weapons\/glock&#8221;, \/\/ item_model component<br \/>\n  animations: [<br \/>\n      {<br \/>\n          &#8220;name&#8221;:&#8221;equip&#8221;,<br \/>\n          &#8220;start&#8221;: 0,<br \/>\n          &#8220;end&#8221;: 30,<br \/>\n          keyframe_functions: [<br \/>\n            { at: 0, function_file: &#8216;test:equip&#8217; },       \/\/ Run a function file @ 0th keyframe.<br \/>\n            { at: 30, function_file: &#8216;test:end_animation&#8217; },<br \/>\n            { at: 25, function_file: &#8216;test:gun_sfx&#8217; }<br \/>\n          ]<br \/>\n      },<br \/>\n      {<br \/>\n          &#8220;name&#8221;: &#8220;shoot1&#8221;,<br \/>\n          &#8220;start&#8221;: 0,<br \/>\n          &#8220;end&#8221;: 8,<br \/>\n          &#8220;keyframe_functions&#8221;: [<br \/>\n              { at: 0, function_file: &#8216;gun:shoot&#8217; }<br \/>\n          ]<br \/>\n      }<br \/>\n  ]<br \/>\n}<br \/>\n&#8220;`<\/p>\n<p>&#8211; ## Playing an Animation<br \/>\nto play an Animation, run the command:<br \/>\n&#8220;`<br \/>\nfunction vm:animations\/play {args:{}}<br \/>\n&#8220;`<br \/>\nthe `args:{}` field is used to tweak parameters, namely:<br \/>\n&#8220;`<br \/>\nid: it stores\/applies the *item_model* component value<br \/>\nanimation: it stores the name of the animation.<br \/>\nframe: the frame at which the animation should start.<br \/>\n&#8220;`<br \/>\nan example command:<br \/>\n&#8220;`<br \/>\nfunction vm:animations\/play {args:{id:&#8221;first_person:weapons\/glock&#8221;, animation: &#8220;equip&#8221;, frame: 10}}<br \/>\n&#8220;`<br \/>\nThis command will,<br \/>\n&#8211; change the item model of the potion item to first_person_weapons\/glock<br \/>\n&#8211; set the animation-to-be-played to &#8220;equip&#8221; (this is handled by setting animation name equal to custom_model_data string that changes the model into one with different animation texture data)<br \/>\n&#8211; set the starting frame to 0 (potion color is set to 8388608+10)<br \/>\n&#8220;`<br \/>\n&#8220;`<br \/>\n&#8211; ## Stopping an Animation<br \/>\nto stop an animation, simply run the command:<br \/>\n&#8220;`<br \/>\nfunction vm:animations\/stop<br \/>\n&#8220;`<br \/>\n&#8220;`<br \/>\n&#8220;`<br \/>\n# Credits<br \/>\n&#8211; Godlander [&#038; the contributors on objmc github repository.] \u2014\u2014 For Making OBJMC (and thus, viewmodels) in Minecraft possible!<br \/>\n&#8211; GhostScoutW (@ghostscout on discord) \u2014\u2014 For making a Guide on how to setup a working viewmodel project with OBJMC!<br \/>\n&#8211; pinkiuses (creator of ATMOS: Minecraft Edition) \u2014\u2014 For coming up with the idea of using OBJMC as viewmodels!<br \/>\n&#8211; And you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This datapack makes animating viewmodels with OBJMC easier!<\/p>\n","protected":false},"featured_media":166192,"template":"","meta":{"_minecraft_slug":"viewmodels","_minecraft_project_id":"mRTz0PJv","_minecraft_author":"barden","_minecraft_license":"MIT","_minecraft_downloads":9,"_minecraft_follows":0,"_minecraft_client_side":"optional","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"viewmodels.zip","_minecraft_size_bytes":120631,"_minecraft_version_count":2,"_minecraft_updated_at":"2026-05-16T00:27:24.937802Z","_minecraft_date_created":"2026-05-11T04:55:50.609201Z","_minecraft_date_modified":"2026-05-13T16:34:09.247232Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/viewmodels","_minecraft_icon_attachment_id":166192,"_minecraft_imported_at":"2026-06-09T18:15:35+00:00","_minecraft_import_hash":"0bd969088d7f46038597bd4205a5ea55","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[84,89,873,92],"mod_loader":[86],"minecraft_version":[102,62,37,40,41,73,74,38,78,79,80,81,82,83,167,163],"class_list":["post-166191","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-datapack","mod_category-game-mechanics","mod_category-library","mod_category-utility","mod_loader-datapack","minecraft_version-1-20-6","minecraft_version-1-21","minecraft_version-1-21-1","minecraft_version-1-21-10","minecraft_version-1-21-11","minecraft_version-1-21-2","minecraft_version-1-21-3","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-1-21-9","minecraft_version-26-1","minecraft_version-26-1-1","minecraft_version-26-1-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Viewmodel - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Viewmodel - Minecraft\" \/>\n<meta property=\"og:description\" content=\"This datapack makes animating viewmodels with OBJMC easier!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/\",\"name\":\"Viewmodel - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp\",\"datePublished\":\"2026-06-09T18:15:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp\",\"width\":96,\"height\":96},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/viewmodels\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Viewmodel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Viewmodel - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/","og_locale":"en_US","og_type":"article","og_title":"Viewmodel - Minecraft","og_description":"This datapack makes animating viewmodels with OBJMC easier!","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/","name":"Viewmodel - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp","datePublished":"2026-06-09T18:15:35+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/viewmodels-icon-58b715c2b73dea7a70ee12b77575a8ef1e645754_96.webp","width":96,"height":96},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/viewmodels\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Viewmodel"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/166191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/166192"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=166191"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=166191"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=166191"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=166191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}