[TUTORIAL] 2d Texture In GUI and 3d Texture In Hand 👾

Started by Pizz4Ninja on

Topic category: User side tutorials

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] 2d Texture In GUI and 3d Texture In Hand 👾
Mon, 03/04/2024 - 04:12 (edited)

SUPPORTS MCREATOR 2023.4 RELEASE

(For 1.19.4 and possibly less use forge:separate-perspective instead of forge:separate_transforms, you will also want to use your_mod_name:items/cool_item_texture and your_mod_name:blocks/cool_item_texture)

 

Hello!

Today I will walk you through a Guide of how to create items that appear as 2d in your inventory and 3d in your hand! ❤️


Creating the Item

First off open Blockbench and select Java Block/Item 🧱

Java Item
         Java Block/Item Selection Menu

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Once you've created your model and model texture export both of them to Mcreator and give them your selected names 📜

Now create your item and make sure that the item has the model linked and make sure that you also link the main texture (The 2d one)

 

Item Model
                                                                    Item Model


Once you've finished everything else for your item Lock the Code and open the .json code file 📰

 

Lock Code
                  Lock Code

Json Code

   Click the .json file to enter the coding area 👾

 

 


Once you've done that it should show something near this

 Default Code

It always depends on the item and sometime it has things like size or rotation but this is usually the base 🤖


Changing the Code

Now that you're ready to edit the code follow these steps exactly

 

  • Remove all of the current code, if there is more than showed in the image delete that too
  • Paste This in:

{
  "loader": "forge:separate_transforms",
  "gui_light": "front",
  "base": {
    "parent": "your_mod_name:custom/cool_item_model",
    "textures": {
      "0": "your_mod_name:block/cool_item_model_texture"
    },
    "display": {
      "thirdperson_righthand": {
        "translation": [
          0,
          3,
          1
        ],
        "scale": [
          0.55,
          0.55,
          0.55
        ]
      },
      "thirdperson_lefthand": {
        "translation": [
          0,
          3,
          1
        ],
        "scale": [
          0.55,
          0.55,
          0.55
        ]
      },
      "firstperson_righthand": {
        "rotation": [
          -0,
          -0,
          -0
        ],
        "translation": [
          0,
          3,
          1
        ]
      },
      "firstperson_lefthand": {
        "rotation": [
          0,
          0,
          -0
        ],
        "translation": [
          0,
          3,
          1
        ]
      },
      "ground": {
        "translation": [
          0,
          3,
          1
        ],
        "scale": [
          0.55,
          0.55,
          0.55
        ]
      },
      "fixed": {
        "rotation": [
          0,
          -90,
          0
        ],
        "translation": [
          0,
          3,
          1
        ]
      }
    }
  },
  "perspectives": {
    "gui": {
      "parent": "item/generated",
      "textures": {
        "layer0": "your_mod_name:item/cool_item_texture"
      },
      "gui_light": "front"
    }
  }
}

Of course you can change things like translation, scale and rotation later to fit to your liking! 👍

 

To explain the texture and model linkings:
 

"your_mod_name:custom/cool_item_model" is the model name. An example is "wizards_and_warders:custom/fire_wand_model"

The first part is your mod name, then the model name (The file you imported, the .json one)

 

"your_mod_name:block/cool_item_model_texture" is the model texture. An example is "wizards_and_warders:block/fire_wand_model_texture"

The first part is your mod name, then the model texture (The file you imported with the .json one, the .png texture file)

 

"your_mod_name:item/cool_item_texture" is the item texture. An example is "wizards_and_warders:item/fire_wand_texture"

The first part is your mod name, then the item texture (The image file you created for the item in your inventory and GUI)


 

Thank you for reading this post! If you need help feel free to comment ❤️

(After the new update I will update this code to make sure it still works. Update, it does! c:)

Edited by Pizz4Ninja on Mon, 03/04/2024 - 04:12
Last seen on 05:19, 26. Mar 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to make the…
Sat, 02/17/2024 - 03:12

Is it possible to make the 2D item also display in the item frames? Only displayed in the GUI

Last seen on 11:04, 8. May 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, is it possible to make…
Fri, 03/01/2024 - 17:57

Hi, is it possible to make the ground and item frame/fixed models 2d also like the gui one?

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, all you have to do is…
Fri, 03/01/2024 - 18:16

Yes, all you have to do is get the code for those and add them into it

 

for example just use “ground” instead of like third person

Last seen on 11:04, 8. May 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do i also have to write '…
Sun, 03/03/2024 - 15:59

Do i also have to write ''Gui_light'' or ''ground_light''

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no   just use blockbench to…
Sun, 03/03/2024 - 16:53

no

 

just use blockbench to find some of this out and join the neotoolkit server (in my discord post there someone gave the code for it)

Last seen on 16:24, 27. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you have the code for the…
Sun, 04/14/2024 - 06:41

Do you have the code for the ground and item frame models?

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No, it is very easy to find…
Mon, 04/15/2024 - 16:22

No, it is very easy to find though.

You can just use Blockbench for the code and paste it in

Last seen on 16:24, 27. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I can find it in block bench…
Tue, 04/16/2024 - 05:33

I can find it in block bench but I have no clue how to make it render lmaoo which parts do I need to copy?

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Someone made the ground one…
Wed, 04/17/2024 - 22:37

Someone made the ground one:

If anyone else wants to do this, scroll down to "perspectives" in the .json file and paste this code underneath the "gui" perspective.

"ground": {
      "parent": "item/generated",
      "textures": {
        "layer0": "your_mod_name:item/cool_item_texture"
      }
    }
Last seen on 16:24, 27. Apr 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
appreciate this
Thu, 04/18/2024 - 11:44

appreciate this

Last seen on 14:25, 8. May 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i tried in every way…
Mon, 04/22/2024 - 17:58

i tried in every way possible but neither the texture on the 3d model in the hand and the ground code don't work, please help

Last seen on 16:23, 7. May 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is confirmed to work,…
Mon, 04/22/2024 - 18:49

It is confirmed to work, this is a problem on your end