[Bug Report] /Feed command, overpowered in pvp world

Discussion in 'Help & Support / Errors & Bugs' started by spidawg, May 10, 2013.

  1. spidawg

    spidawg Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Oct 14, 2012
    Messages:
    225
    Trophy Points:
    26,050
    Gender:
    Male
    Ratings:
    +33
    Minecraft Username: spidawg
    Brief Description: the /feed command feeds your hunger level up to level 100 , whereas you can only eat up to level 20 with food items. The hunger level is not capped upon warping to the pvp world. This puts players with /feed command at an advantage over other players because they are not required to stop and eat for a very long time. (20 minutes versus 4 minutes)

    Instructions:
    1.a. Eat as much food as you can normally without using the /feed command.
    1.b. Go into pvp with no food to eat and do not eat anything while you are there.
    1.c. Run around in the PVP world for as long as you can before starving.
    1.d. When you start to starve, record that time as "item food", leave pvp arena.
    2.a. From outside the PVP world , use the /feed command
    2.b. Go into pvp with no food to eat and do not eat anything while you are there.
    2.c. Run around in the PVP arena for as long as you can before starving.
    2.d. When you start to starve, record that time as "command feed", leave pvp arena.
    3. Compare values of "item food" and "command feed"

    How many times did you recreate this bug?: 1

    Result: Your hunger level remains at 100 even when you cross the pvp gate.
    item food: ~4 minutes until starvation
    command feed: ~20 minutes until starvation

    Expected Result:
    - Your hunger level should be set to a maximum of 20 points when you cross the pvp gate.
    - Regardless of method of being fed prior to entering PVP world, you should start to starve within 4 minutes of constant running around

    Evidence: none
     
  2. JBuks

    JBuks Tycoon
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jun 18, 2012
    Messages:
    1,625
    Trophy Points:
    44,840
    Gender:
    Male
    Ratings:
    +507
    I'm not sure if this is any help, but I think it depends on what food you're eating, because /feed fills your saturation to 20, whereas if you're eating cookies they don't give as much saturation points which makes your hunger go down faster.
     
  3. kukelekuuk

    kukelekuuk C͕̹̲̽ͪ͐ͩ̔L̜̦̝͈ͦ̿̾̿ḘA̻̗̤̳̐ͭ̆̿̃̑ͭN̊̓͑̇ͯ
    Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    May 25, 2011
    Messages:
    10,061
    Trophy Points:
    80,160
    Ratings:
    +6,925
    that's not what he's saying.

    Your hungerbar itself has 20 slots, while the server can in reality make it a lot higher. In this case the /feed command fills your hungerbar 5 times past the limit.
     
  4. KHobbits

    KHobbits Builder
    Builder ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Aug 19, 2011
    Messages:
    257
    Trophy Points:
    47,290
    Gender:
    Male
    Ratings:
    +237

    This is not true.

    Please read the minecraft documentation for more details on how this works.

    In minecraft there are 3 health bars:
    Health
    Food
    Saturation

    Saturation is invisible, this bar works like the food bar, but is drawn from first, before food.
    Different foods heal different amounts of food and saturation, for example:
    Apple: heals 4 food (2 icons) and 2.4 saturation
    Baked Potato: heals 6 food (3 icons) but a massive 7.2 saturation.

    This means, a Baked Potato actually heals double the food visible on your bar, as your food level wont fall, while you have some saturation.


    The /feed command, sets you to 20 food, and 10 saturation.
    This should work out similar to the same effect as eating 2 baked potatoes in a row (at 4 food).
     
    #4 KHobbits, May 18, 2013
    Last edited: May 18, 2013
  5. kukelekuuk

    kukelekuuk C͕̹̲̽ͪ͐ͩ̔L̜̦̝͈ͦ̿̾̿ḘA̻̗̤̳̐ͭ̆̿̃̑ͭN̊̓͑̇ͯ
    Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    May 25, 2011
    Messages:
    10,061
    Trophy Points:
    80,160
    Ratings:
    +6,925
    Code:
        final int amount = 100;
     
    final FoodLevelChangeEvent flce = new FoodLevelChangeEvent(player, amount);
    ess.getServer().getPluginManager().callEvent(flce);
    if (flce.isCancelled())
    {
    throw new QuietAbortException();
    }
     
    player.setFoodLevel(flce.getFoodLevel());
    player.setSaturation(10);
    sender.sendMessage(sender.equals(player) ? _("feed") : _("feedOther", player.getDisplayName()));
    Doesn't this set the foodlevel to 100? If not, what is that 100 for?
     
  6. KHobbits

    KHobbits Builder
    Builder ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Aug 19, 2011
    Messages:
    257
    Trophy Points:
    47,290
    Gender:
    Male
    Ratings:
    +237

    This is just so the event throws a non standard value, so it can be told apart from standard food events.
     
  7. kukelekuuk

    kukelekuuk C͕̹̲̽ͪ͐ͩ̔L̜̦̝͈ͦ̿̾̿ḘA̻̗̤̳̐ͭ̆̿̃̑ͭN̊̓͑̇ͯ
    Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    May 25, 2011
    Messages:
    10,061
    Trophy Points:
    80,160
    Ratings:
    +6,925
    Okay, that makes sense.
     
  8. spidawg

    spidawg Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Oct 14, 2012
    Messages:
    225
    Trophy Points:
    26,050
    Gender:
    Male
    Ratings:
    +33
    I knew about the saturation but it's not really relevant dealing with factors of 5x

    But as of a while back it has been fixed.

    My "Food level indicator" no longer says 100 when i type /feed, it now says 20

    (Marco mod shows this value, I can't say where it was coming from but it was called %HUNGER%....)
     
  9. Capu111025

    Capu111025 Builder
    Builder ⛰️ Ex-Resident ⚒️

    Joined:
    May 31, 2013
    Messages:
    143
    Trophy Points:
    25,570
    Gender:
    Male
    Ratings:
    +19
    So could you set the
    Code:
    player.setSaturation(); 
    higher. You could have a donation that sets your feed to more saturation. Like feed+. Maybe saturation to 20 or so.

    Im thinking of donation for feed and may have a few dollars around left so maybe feed+ could be a extra $10 - $20
     
    #9 Capu111025, Jun 20, 2013
    Last edited: Jun 20, 2013
  10. spidawg

    spidawg Builder
    Builder ⛰️ Ex-President ⚒️⚒️

    Joined:
    Oct 14, 2012
    Messages:
    225
    Trophy Points:
    26,050
    Gender:
    Male
    Ratings:
    +33

    Because: of the OP'ness that would offer if they set your saturation abnormally high, again, this would not be recommended unless they specifically programmed for an exception to occur when you are changed into the PVP world, in order to address the issue as specified by the initial bug report, maybe in a slightly different form if it's the saturation rather than plain hunger.

    If you do feel strongly about this; i would suggest you submit this as an enhancement request rather than as a comment to my bug report -- certain people may have 'unfollowed' this and you might get more attention if you formalize your request using this process.