Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] [RESOLVED] Replenishing hunger without using an ItemFood
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
DiabolusNeil

[1.6.4] [RESOLVED] Replenishing hunger without using an ItemFood

By DiabolusNeil, January 20, 2014 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

DiabolusNeil    6

DiabolusNeil

DiabolusNeil    6

  • Stone Miner
  • DiabolusNeil
  • Members
  • 6
  • 88 posts
Posted January 20, 2014

I want to make an item to do this, but it won't be a food. I've looked at the ItemFood code, but I still can't figure out how it replenishes the player's hunger. Could someone help me?

  • Quote

if (user.hasKnowledgeOfJava) {

    if (user.question.hasCode) {

        return interpetHelpfulResponse(user.getQuestion());

    } else {

        return "Could you post your code please?";

    }

} else {

    return "Learn some freaking Java!";

}

Share this post


Link to post
Share on other sites

Draco18s    2401

Draco18s

Draco18s    2401

  • Reality Controller
  • Draco18s
  • Members
  • 2401
  • 15920 posts
Posted January 20, 2014

EntityPlayer#getFoodStats()

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

DiabolusNeil    6

DiabolusNeil

DiabolusNeil    6

  • Stone Miner
  • DiabolusNeil
  • Members
  • 6
  • 88 posts
Posted January 20, 2014

Thank you!

  • Quote

if (user.hasKnowledgeOfJava) {

    if (user.question.hasCode) {

        return interpetHelpfulResponse(user.getQuestion());

    } else {

        return "Could you post your code please?";

    }

} else {

    return "Learn some freaking Java!";

}

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • ChampionAsh5357
      [1.16.4] How i can put my strucnures in to FlatGenerationSettings.STRUCTURES

      By ChampionAsh5357 · Posted 1 minute ago

      The object itself is immutable, the data can be mutable. The issue is that the field accessor is private. ObfuscationReflectionHelper#getPrivateValue can be used to obtain the Map to which you can put the value during common setup.
    • ChampionAsh5357
      items not extending to java class(1.16)

      By ChampionAsh5357 · Posted 5 minutes ago

      Please provide the repository and a code snippet of where your exact problem is as your question seems to be worded incorrectly.
    • Klarks
      [1.16.4] How i can put my strucnures in to FlatGenerationSettings.STRUCTURES

      By Klarks · Posted 16 minutes ago

      How i can put my structures in to FlatGenerationSettings.STRUCTURES. The structures  var is final so i cant put mine like that FlatGenerationSettings.STRUCTURES.put(MyStructure.RUN_DOWN_HOUSE.get(), CONFIGURED_RUN_DOWN_HOUSE);
    • BobbyLikesCake
      1.16.4 (Heavily decent modded with around 150ish mods) Crash with exit code -1 most of the time and sometimes exit code 0.

      By BobbyLikesCake · Posted 17 minutes ago

      Hi, I need help with a heavily modded world. Whenever I hit a mob I get a crash on the world and then it takes 10 minutes to just get back in. I tried attaching the debug log with this but I couldnt do it either to help. Can anyone help with this? 2021-01-17-13.log.gz
    • The_Raven
      items not extending to java class(1.16)

      By The_Raven · Posted 29 minutes ago

      small question, but how to I make my registry items able to use the code in a java class. or could you tell me how to make the java class into an item. i know extends item, that's not what I'm talking about.
  • Topics

    • Klarks
      1
      [1.16.4] How i can put my strucnures in to FlatGenerationSettings.STRUCTURES

      By Klarks
      Started 16 minutes ago

    • The_Raven
      1
      items not extending to java class(1.16)

      By The_Raven
      Started 30 minutes ago

    • BobbyLikesCake
      0
      1.16.4 (Heavily decent modded with around 150ish mods) Crash with exit code -1 most of the time and sometimes exit code 0.

      By BobbyLikesCake
      Started 17 minutes ago

    • Rollng
      2
      Game crashes while loading world

      By Rollng
      Started 3 hours ago

    • Ripple
      1
      No file association

      By Ripple
      Started 51 minutes ago

  • Who's Online (See full list)

    • ChampionAsh5357
    • BobbyLikesCake
    • Heinzchen
    • Rollng
    • coalbricks
    • Caffeinated Pinkie
    • FrostyTerror
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.6.4] [RESOLVED] Replenishing hunger without using an ItemFood
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community