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

in your class extending itemFood, change the itemUseDuration thats wrong becase itemUseDuration is final

 

try making a class that extends Item and copy the code of ItemFood, call this class ItemFoodCustom or wtv and remove final from the itemUseDuration THEN try to make a class extends ItemFoodCustom and change the itemUseDuration

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

doesnt work

 

specify ?

 

logs, code, whats the goal of calling this method, whats not working, what are you trying to do

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

public StcmItemFood(int par1, int par2, float par3, boolean par4)

    {

        super(par1);

        this.itemUseDuration = 32;

        this.healAmount = par2;

        this.isWolfsFavoriteMeat = par4;

        this.saturationModifier = par3;

        this.setCreativeTab(CreativeTabs.tabFood);

    }

 

public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)

    {

        --par1ItemStack.stackSize;

        par3EntityPlayer.getFoodStats().addStats(this);

        par2World.playSoundAtEntity(par3EntityPlayer, "random.burp", 0.5F, par2World.rand.nextFloat() * 0.1F + 0.9F);

        this.onFoodEaten(par1ItemStack, par2World, par3EntityPlayer);

        return par1ItemStack;

    }

 

this is the problem when i hover over it sais :The method addStats(ItemFood) in the type FoodStats is not applicable for the arguments (StcmItemFood)

do you know what this function do ?

 

 

that the function you call when you want to add +1 to the number of things this person has eaten... which honestly you dont care ... you could just remove it and it wouldnt affect the item (except that the game wont keep track of how many of this item you have eaten)

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

  • Author

well for some issues i dont understand it still doesnt work.

i'll give that up for now.

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...

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.