[TUTORIAL] How to make a custom spawn egg via .json

Started by endcollector on

Topic category: User side tutorials

Last seen on 13:20, 25. Apr 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to make a custom spawn egg via .json

Hello! This is my first Mcreator tutorial and it is mostly meant for users that don't understand the usage of json or are beginners.

(I mostly made this because I'm not the biggest fan of making items just to spawn a mob)

WORKS FOR 1.16.5, 1.17.1, 1.18.2 (not sure about 1.12.2)


Step 1:

Make your custom texture and import it into Mcreator (make sure you select "item" as the category

 

Step 2:

Lock your entity's code and open the file that ends in "_entity_spawn_egg.json" and replace the code in it with this code:

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "MODID:items/TEXTURE_NAME"
  }
}

Replace MODID with your mod ID and TEXTURE_NAME with the spawn egg texture name that you imported. Save it and you are done!

 

How to use a custom model instead of just a texture:

 

Step 1:

Make your custom model for your spawn egg in a program like Blockbench, export the model, open it, and copy the code inside.

 

Step 2:

Import your model's texture (select the block category), then lock your entity's code and open the file that ends in "_entity_spawn_egg.json" and replace the code in it with the code you just copied. 

 

Step 3:

In the model code you copied down add MODID:blocks/ to the area where the textures are defined (make sure to replace MODID with your mod ID). See before and after:

Before:

Before

After:

After

Save it and you are done!


And that is it! if you have any questions please ask! I would love any feedback :)

Last seen on 20:50, 27. Jul 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it doesnt work... i cant…
Tue, 05/23/2023 - 01:24

it doesnt work... i cant even put code in there