Jump to content

[Solved] [1.8] [1.10] Updating from 1.8 to 1.10.2


untamemadman

Recommended Posts

I am trying to update my mod from Minecraft 1.8 to 1.10.2

 

The issue I am having is my mod added a crafting recipe for spawn eggs however in either 1.9 or 1.10 Mojang changed how spawn eggs work, giving them NBT data instead of using damage values.

 

Could anyone help me make this change as I have never used NBT before

 

Example code:

 

 

//Skeleton

GameRegistry.addShapedRecipe(new ItemStack(Items.SPAWN_EGG, 1, 51), "ZZC", "ZXC", "ZCC", 'Z', new ItemStack(Items.ARROW),'C', new ItemStack(Items.BONE), 'X', new ItemStack(Items.EGG));

 

 

Link to comment
Share on other sites

You just need to create an Itemastack and apply the corrrect nbt to it. For the correct NBT look onto what nbt the egg has using NBTExplorer or using PlayerInteract (more specifically the right click event) and print out the stacks nbt.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.