Jump to content

Updating Code


Sparhawk

Recommended Posts

G'Day Everyone,

 

I am trying to teach myself modding for Minecraft. Is there anywhere that I can learn the differences in Forge code from Minecraft 1.8 to 1.11.2? For example...

 

GameRegistry.addRecipe(new ItemStack(Blocks.sapling),
                "XXX",
                "XYX",
                "XXX",
                'X', Blocks.leaves, 'Y', Items.stick);   

 

creates an oak sapling in Minecraft 1.8.

 

The 1.11.2 version of this code

 

GameRegistry.addRecipe(new ItemStack(Blocks.SAPLING),
                "XXX",
                "XYX",
                "XXX",
                'X', Blocks.LEAVES, 'Y', Items.STICK);   

 

doesn't. The only difference that I can see is the capitalisation.

 

Any help is appreciated.

 

thanks

Link to comment
Share on other sites

thanks for the reply. this is all I have as I have only just started this.



   

Spoiler

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class SkyblockEmergencyServices
{

    public void init(FMLInitializationEvent event)
    {
            GameRegistry.addRecipe(new ItemStack(Blocks.SAPLING),
                "XXX",
                "XYX",
                "XXX",
                'X', Blocks.LEAVES, 'Y', Items.STICK);    
                            
    }
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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