<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FCustom-Items</id>
	<title>Tutorials/Custom-Items - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FCustom-Items"/>
	<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=Tutorials/Custom-Items&amp;action=history"/>
	<updated>2026-04-14T23:45:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.figuramc.org/index.php?title=Tutorials/Custom-Items&amp;diff=117&amp;oldid=prev</id>
		<title>Manuel: Automated upload of converted .txt file.</title>
		<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=Tutorials/Custom-Items&amp;diff=117&amp;oldid=prev"/>
		<updated>2024-09-26T20:45:07Z</updated>

		<summary type="html">&lt;p&gt;Automated upload of converted .txt file.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;import Emoji from ‘@site/src/components/Emoji’; import FileTreeRoot from ‘@site/src/components/FileTree/Root’; import FileTreeNode from ‘@site/src/components/FileTree/Node’;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;custom-items&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Custom Items =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Custom items tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using Figura you can make custom items that are visible in first and third person.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You’ll need to use the Item [[../enums/ModelPartParentTypes|keyword]] and the item_render event combined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;item-keyword&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Item Keyword ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you give a Blockbench group the Item keyword (by starting the group name with &amp;lt;code&amp;gt;Item&amp;lt;/code&amp;gt;) it will be primed and ready to be used as an item. Without the event the Item group will vanish- and so will every item you hold. It has to be Item with a capital I.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;img src={require(&amp;quot;@site/static/img/items/good-keyword.png&amp;quot;).default} width=&amp;quot;400&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;item-render-event&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Item Render Event ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The item_render event runs once a frame for every item you’re rendering and they do their own things in their own version of the event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to make the Item show up you must return it in the item_render event. This example assumes the bbmodel is named &amp;lt;code&amp;gt;model&amp;lt;/code&amp;gt; and that the keyworded group is named Item. If you wish to test this change &amp;lt;code&amp;gt;model&amp;lt;/code&amp;gt; to your bbmodel name and the Item group to your version.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function events.item_render()&lt;br /&gt;
&lt;br /&gt;
    return models.model.Item&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will replace every single item you’re holding with your custom item&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;replacing-specific-items&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Replacing Specific Items ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here’s an exmaple for replacing a single item by id:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function events.item_render(item)&lt;br /&gt;
&lt;br /&gt;
    if item.id == &amp;quot;minecraft:crossbow&amp;quot; then&lt;br /&gt;
&lt;br /&gt;
        return models.model.ItemBow&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here’s an exmaple for replacing a single item by name:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function events.item_render(item)&lt;br /&gt;
&lt;br /&gt;
    if item:getName() == &amp;quot;Lightning&amp;quot; then&lt;br /&gt;
&lt;br /&gt;
        return models.model.ItemBow&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can use the event’s arguments to get different information from the item you’re holding, and they are: the itemstack, rendering mode, position, rotation, scale, and if its in the left hand. [[../enums/ItemDisplayModes|Possible item rendering modes.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function events.item_render(item, mode, pos, rot, scale, left)&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is storing all the values you can get, but in most cases you only need item and sometimes mode. Let’s replace bows, shields, and all swords. These are all for a blockbench model that looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;FileTreeRoot&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;model.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;ItemSword&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;ItemBow&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;ItemShield&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function events.item_render(item)&lt;br /&gt;
&lt;br /&gt;
    if item.id == &amp;quot;minecraft:bow&amp;quot; then&lt;br /&gt;
&lt;br /&gt;
        return models.model.ItemBow&lt;br /&gt;
&lt;br /&gt;
    elseif item.id == &amp;quot;minecraft:shield&amp;quot; then&lt;br /&gt;
&lt;br /&gt;
        return models.model.ItemShield&lt;br /&gt;
&lt;br /&gt;
    elseif item.id:find(&amp;quot;sword&amp;quot;) then&lt;br /&gt;
&lt;br /&gt;
        return models.model.ItemSword&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The find function is searching the id for the word ‘sword’ so you don’t need to type in every single sword id. This also makes it compatible with modded swords.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;things-to-note&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Things To Note ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Do &amp;#039;&amp;#039;not&amp;#039;&amp;#039; put the Item group inside any other group. The Blockbench outliner should look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;FileTreeRoot&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;model.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Item&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;FileTreeRoot&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;model.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Item&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Item2&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
because you can have more than one of these keywords. Do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; nest Item keywords inside another. And, do &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; have more than one custom item per instance of the Item keyword.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;img src={require(&amp;quot;@site/static/img/items/bad-location.png&amp;quot;).default} width=&amp;quot;400&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You &amp;#039;&amp;#039;&amp;#039;could&amp;#039;&amp;#039;&amp;#039; put your Item group in another group but be careful, doing so makes it easier to cause unwanted behavior. For example, if you put it into RightArm or LeftArm it will be force unrendered, defeating the point of it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;2&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;0,0,0 in Blockbench is where the player will be holding the item in the world&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Manuel</name></author>
	</entry>
</feed>