Wrong Spawn Egg

Started by kamehamehaa on Sat, 10/29/2016 - 23:18

Topic category: Help with modding (Java Edition)

Last seen on 23:22, 28. Nov 2016
Joined Oct 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.

Last seen on 23:22, 28. Nov 2016
Joined Oct 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 :/

Last seen on 08:29, 18. Sep 2019
Joined Dec 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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.)

Last seen on 23:22, 28. Nov 2016
Joined Oct 2016
User points:

User statistics:

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

Thanks mate, it worked perfectly :) 

Last seen on 07:55, 25. Oct 2020
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:I have an idea to implement
Sun, 10/30/2016 - 16:50

@#4 Now that is a perfect example of how events should be used ;)