#Trouble creating custom egg.

1 messages · Page 1 of 1 (latest)

steady orbit
#

Hi, I’ve copied the vanilla egg scripts from GitHub and managed to make them spawn the correct mob. I’ve also changed the texture for when the egg is thrown. However, I’m having trouble changing the texture of the egg while it’s being held. Any help would be appreciated!

This is the code I'm using.

#

ENTITY SCRIPT

  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:egg",
      "materials": {
        "default": "egg"
      },
      "textures": {
        "default": "textures/items/iron_enriched_egg.png"
      },
      "geometry": {
        "default": "geometry.item_sprite"
      },
      "render_controllers": [
        "controller.render.item_sprite"
      ],
      "animations": {
        "flying": "animation.actor.billboard"
      },
      "scripts": {
        "animate": [
          "flying"
        ]
      }
    }
  }
}```
#

BEHAVIOR SCRIPT.

  "format_version": "1.12.0",
  "minecraft:entity": {
    "description": {
      "identifier": "minecraft:egg",
      "is_spawnable": false,
      "is_summonable": true,
      "is_experimental": false
    },
    "components": {
      "minecraft:collision_box": {
        "width": 0.25,
        "height": 0.25
      },
      "minecraft:projectile": {
        "on_hit": {
          "impact_damage": {
            "damage": 0,
            "knockback": true,
            "destroy_on_hit": true
          },
          "spawn_chance": {
            "first_spawn_chance": 8,
            "second_spawn_chance": 32,
            "first_spawn_count": 1,
            "second_spawn_count": 4,
            "spawn_definition": "minecraft:cow",
            "spawn_baby": true
          },
          "remove_on_hit": {},
          "particle_on_hit": {
            "particle_type": "iconcrack",
            "num_particles": 6,
            "on_entity_hit": true,
            "on_other_hit": true
          }
        },
        "power": 1.5,
        "gravity": 0.03,
        "angle_offset": 0.0
      },
        "minecraft:physics": {
      },
      "minecraft:pushable": {
        "is_pushable": true,
        "is_pushable_by_piston": true
      },
      "minecraft:conditional_bandwidth_optimization": {
        "default_values": {
          "max_optimized_distance": 80.0,
          "max_dropped_ticks": 7,
          "use_motion_prediction_hints": true
        }
      }
    }
  }
}```
gaunt echo
#

You'll need to set ylthe vanilla egg item to use your texture in item_textures.json

wheat meadow
steady orbit
steady orbit
wheat meadow
gaunt echo
#

Use a namespace besides minecraft

wheat meadow
#

I also only noticed after BlazeDrake pointed it out

steady orbit
# gaunt echo Use a namespace besides minecraft

I've tried that and then nothing shows in-game. Might be easier if I explain what the purpose is. It's basically a chicken add-on that produces ores, I have an iron chicken that lays iron nuggets but to get an iron chicken I want to use a vanilla egg crafted with iron, that produces an "iron-enriched egg" that in turn will hatch Iron chickens. As is said at the beginning I have tried changing the name spaces and then it all goes wrong. I feel like I'm missing something stupid.

gaunt echo
#

Try changing the identifier in both the bp and rp to something like stew:iron_egg

#

Also, is your content log on?

#

And finally, you'd need to make an item too to actually shoot the egg