Wrong Spawn Egg

Started by kamehamehaa on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wrong Spawn Egg
Sat, 10/29/2016 - 23:19 (edited)

Hey,

I have a problem. I tried creating a recipe for a Skeleton spawn egg, but it doesn't quite work. I can craft everything the way I want, but I don't receive a Skeleton Egg but an "empty" Spawn Egg. It does nothing when used.

I think the problem lies here : the code uses this 

 "ItemStack recStack = new ItemStack(Items.SPAWN_EGG, 1, 51);"

which i think is outdated. It's like saying "/give Player minecraft:spawn_egg 1 51", but that gives you the "empty" spawn egg.

It should be like this:

"  /give Player minecraft:spawn_egg 1 0 {EntityTag:{id:"Skeleton"}} "

but how do I get that in the Code? 

 

thanks for your help in advance

Edited by kamehamehaa on Sat, 10/29/2016 - 23:19
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I looked up the Skeleton ID
Sat, 10/29/2016 - 23:58

I looked up the Skeleton ID and it gave two. I would try, removing the (1,51); to a (1,33); and recompile that code.

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I looked up the Skeleton ID
Sun, 10/30/2016 - 00:02

I looked up the Skeleton ID and it gave two. I would try, removing the (1,51); to a (1,33); and recompile that code.

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:I looked up the Skeleton ID
Sun, 10/30/2016 - 00:08

no, i've just tested it. It doesn't matter which ID you use, you'll always just get the regular spawn egg :/

Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have an idea to implement
Sun, 10/30/2016 - 00:20

I have an idea to implement Skeleton egg, although its not dirrectly like a spawn egg.

First, go to "items" create the mod and name it "skeleton spawn egg" or whatever you want. Now do whatever for everything until you reach "Events" page. Choose "Right click on Block". Now here we get a little more confusing.

 

Locate the "Stacked Event" choose it, now choose "Add event result" now find "Consume item in Inventory" choose the egg you make. Now click "Add event result on the bottom. finnaly click "stacked event" again, choose 'Consume Item In Inventory" add that event, and again click add event on the bottom page. 

------------------------------------------------

This would make it so you could spawn in a Skeleton, but at the same time the egg will dissapear, (so you cant spawn infinte ammount of them, unless you want to.)

Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks mate, it worked
Sun, 10/30/2016 - 13:46

Thanks mate, it worked perfectly :)