Jump to content

Does my crop grow all stages?


Kander16

Recommended Posts

Hello,

 

I have a problem with my crops, everytime i jump on it, the farmland becomes dirt. But my crop isn't destroyed (It keeps just growing at the dirt) and i wanted to fix that but i don't know how, i uses the BlockCarrot code for my other crops, but that does not fix it.

 

Thanks

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Hmmm, I am trying to figure it out.

 

What does it needs to be? 0, 1, 2, 3 and 4?

 

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int side, int metadata)
    {
        if (metadata < 7)
        {
            if (metadata == 6)
            {
            	metadata = 5;
            }

            return this.iconArray[metadata >> 1];
        }
        else
        {
            return this.iconArray[3];
        }
    }

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Then what do I do, cause i use the code from blockcarrot.class, that crop has 4 stages and uses also uses

this code:

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int side, int metadata)
    {
        if (metadata < 7)
        {
            if (metadata == 6)
            {
            	metadata = 5;
            }

            return this.iconArray[metadata >> 1];
        }
        else
        {
            return this.iconArray[3];
        }

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

Link to comment
Share on other sites

Ok, but where in this code?

 

    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int side, int metadata)
    {
        if (metadata < 7)
        {
            if (metadata == 6)
            {
            	metadata = 5;
            }

            return this.iconArray[metadata >> 1];
        }
        else
        {
            return this.iconArray[4];
        }

 

 

Cause i don't see where you get the values 0-2

 

It doesn't have to do anything with return this.iconArray[metadata >> 1]; ?

Creator of the Master Chef Mod and many more to come.

 

If I helped you, please click the 'thank you' button.

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.