User Tools

Site Tools


tutorial:spawn_egg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:spawn_egg [2023/01/15 01:30] – [Creating the Spawn Egg] solidblocktutorial:spawn_egg [2023/01/15 01:33] (current) – [Creating the Spawn Egg] solidblock
Line 10: Line 10:
 } }
 </code> </code>
-:!:This example is used for versions //before// 1.19.3, as Minecraft 1.19.3 directly added iron golem spawn eggs. However, you can create spawn eggs for other entity types. In 1.19.3, remember to remove the ''group'' method invoke.+:!: This example is used for versions //before// 1.19.3, as Minecraft 1.19.3 directly added iron golem spawn eggs. However, you can create spawn eggs for other entity types. In 1.19.3, remember to remove the ''group'' method invoke. To add the spawn egg to item groups in 1.19.3, see [[itemgroup]].
  
 The spawn egg item takes an entity type, a primary and secondary color, and an item settings option. The spawn egg item takes an entity type, a primary and secondary color, and an item settings option.
Line 30: Line 30:
 =====Giving the Spawn Egg a Texture===== =====Giving the Spawn Egg a Texture=====
 If you ran the game now, your spawn egg wouldn't have a texture, so to give it a texture you would need to do as follows: If you ran the game now, your spawn egg wouldn't have a texture, so to give it a texture you would need to do as follows:
-<file javascript src/main/resources/assets/modid/models/item/iron_golem_spawn_egg.json>+<file javascript src/main/resources/assets/tutorial/models/item/iron_golem_spawn_egg.json>
 { {
   "parent": "item/template_spawn_egg"   "parent": "item/template_spawn_egg"
Line 36: Line 36:
 </file> </file>
  
-Make sure to also add this to your lang file. +Make sure to also add this to your [[lang]] file. 
-<file javascript src/main/resources/assets/modid/lang/en_us.json>+<file javascript src/main/resources/assets/tutorial/lang/en_us.json>
 { {
-    "item.modid.iron_golem_spawn_egg": "Iron Golem Spawn Egg"+    "item.tutorial.iron_golem_spawn_egg": "Iron Golem Spawn Egg"
 } }
 </file> </file>
tutorial/spawn_egg.1673746257.txt.gz · Last modified: 2023/01/15 01:30 by solidblock