Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

  • Author

There you go:

 

http://pastebin.com/4u86w7q9

 

Also, my crop won't go to the 5th stage, the crop is ready for harvesting when its at stage 4. I can see it cause the block hasn't loaded the 5th stage.

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

 

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

  • Author

Ok, but where did you find 'getPlantType'? (in what class file)

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

 

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

  • Author

It works, thank you.

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

 

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

  • Author

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.

  • Author

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.

  • Author

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.

  • Author

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.

  • Author

So,          return this.iconArray[3]; need to be changed to 4, from 0-4 (5 icons)?

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

 

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

  • Author

Do you know how to fix this then?

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

 

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

  • Author

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.

  • Author

Ok.

 

How do i create a numer from 0-4?

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

 

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

  • Author

Thank you. Diesieben07

 

 

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

 

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

  • Author

Thank you. Diesieben07

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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.