Jump to content

Recommended Posts

Posted

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.

Posted

Also, i don't know if my crop grows all my stages.

 

Could you please take a look at this?

My crop should grow 5 stages, but i think it skipped the 4th stage.

 

Thanks.

 

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

 

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

Posted

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.

Posted

So, i need to change something in this line?

 

return this.iconArray[3] --> return this.iconArray[4];

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

 

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

Posted

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.

Posted

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.

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.