[INACTIVE][MECH] Gastronomic 1.5 (other thread inactive) [818]

Discussion in 'Inactive/Unsupported Plugins' started by jonathanyc, Jun 10, 2011.

  1. Offline

    jonathanyc

    [​IMG]
    The first specialised hunger plugin for Bukkit!
    Now with Thirst - open GastronomicWater Spoiler!
    Alright, I tried to fix the problems in Gastronomic but the code proved too unwieldy for me to modify. Therefore, I made a new plugin, Hungry, which at the moment provides all "critical" functionality of Gastronomic. It will eventually add even more features. It's thread is available here.

    Bugs Fixed:
    • Trapdoors were not on the list of openable blocks to check, this could be exploited
    • A bunch of code errors (some possibly due to decompilation)
    Bugs To Fix:
    • Warning during plugin startup about deprecated PlayerJoinEvent signature
    Original Threads:
    http://forums.bukkit.org/threads/me...dding-realism-through-hunger-798.18241/page-4
    http://forums.bukkit.org/threads/in...1-3-4-adding-realism-through-hunger-766.2685/

    Download:
    http://icebrg.us/dl/Gastronomic.jar
    Mercurial repository at: https://bitbucket.org/jonathanyc/gastronomic/overview
    Submit an issue: https://bitbucket.org/jonathanyc/gastronomic/issues/new

    Permissions:
    http://forums.bukkit.org/threads/ad...ow-with-real-multiworld-permissions-766.5974/
    or, preferably:
    http://forums.bukkit.org/threads/ad...row-is-today-733-818.18140/page-4#post-350408

    Ever felt like something was missing from Bukkit? A sense of immersion, of depth? Ever felt like people shouldn't be able to survive for weeks without a single piece of food? Gastronomic provides a reason to kill those pigs, catch that fish, and cook that bread. So gather up your [wheatpicked], [redmushroom] and [meat], and keep reading.

    Features:
    • User-specified hunger intervals, increments, and damage amounts.
    • Per-item hunger restoration amounts.
    • 'Effects' system allowing very customisable health restoration/damage effects.
    • Permissions support.
    Permissions:
    Give gastronomic.admin.* support to trusted players, and gastronomic.player.* permissions to all, or configure permissions manually from the list below.


    Code:
    gastronomic.admin.enable - gives access to the /gastronomic command. gastronomic.admin.reload - gives access to the /gastronomic reload command. gastronomic.admin.sethunger - gives access to the /sethunger command. gastronomic.player.checkhunger - gives access to the /hunger command. gastronomic.player.checkfood - gives access to the /food command. gastronomic.disablehunger - give this permission to disable hunger for the user/group.
    Commands:


    Code:
    /gastronomic - enables and disables plugin. /gastronomic reload - reloads all configuration files. /hunger - checks your current hunger level. /sethunger [player name] [hunger level] - sets player's hunger to the specified amount. /food [id] - tells the player how much hunger the id restores. /food list - lists how much hunger each food id restores.
    Known issues:
    • If configuration files are deleted for any reason, the server may show some scary messages. Don't worry, it should work out fine! If not, report please :).
    • In GastronomicWater, users must left click to empty buckets (bug with bukkit not calling correct events on bucket use)
    Planned Features:
    • Iconomy Support?
    Mechanics
    Each player is given a hunger value, starting at 0. Every so often, at a user-specified interval, every user's hunger level goes up by a specified increment. This goes on until their hunger level reaches 100, and they begin to starve. At every following interval, damage will be taken until food is eaten, restoring hunger levels back to 0.

    Credits
    • Firstly to this thread for inspiring the creation of Gastronomic. Thanks to Bashur and the other posters in that thread!
    • Secondly to TimberJaw, whose Hey0 mod (here) served as ideas for some of my plugin's functionality.
    • A Very Special Thanks To FullWall To Allow me To Continue This Amazing Plugin!
    • ... and a thanks to chernobyl360 for continuing FullWall's work
    Configuration File
    Example available at http://pastebin.com/XgDKSCiX.

    Changelog:
    V1.5 - Fixed bug with trapdoors, etc.
    V1.4 - Updated to CB798
    v1.3.4 - compatibility, bugfixes.
     
    kahlilnc and Flipp like this.
  2. Offline

    Flipp

    Thank you very much, this Plugin has to live!
     
  3. Offline

    Spycoclown

    Thats so great i was realy disappointed as i heart that this plugin was dead. But you saved it.

    When i type in /food 297 i got this message.
    Code:
    12:23:25 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'food' in plugin Gastronomic v1.5
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:404)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:314)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
            at com.fullwall.Gastronomic.Food.FoodManager.get(FoodManager.java:70)
            at com.fullwall.Gastronomic.Gastronomic.listFood(Gastronomic.java:197)
            at com.fullwall.Gastronomic.Gastronomic.onCommand(Gastronomic.java:122)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    


    Hope i could help a bit ;)

    Thx alot
     
  4. Offline

    T4L_Goose

    Why is the foodstuffs config file empty? how do I add food to it and what is the correct syntax?
     
  5. Offline

    jonathanyc

    @Spycoclown: I'll try to fix that ASAP (within 24 hours). I am pretty sure I know what caused that bug - I saw it when I was looking over the code. Thanks for the report!

    @T4L_Goose: By default, there should be no configuration file - I'll upload an example on ASAP.

    Sorry for the delay, I have some things to finish up before I can jump into Summer. ;)
     
  6. Offline

    TheBarkingFrog

    Thanks so much for picking this up, my players love this plugin :D
     
  7. Offline

    Spycoclown

    no problem we are so happy that some one pick it up thx alot
     
  8. Offline

    Nitnelave

    Do you have support for Permissions 3? If so, I'll try this plugin to see if there isn't too many bugs ^^
     
  9. Offline

    Tyrant451

    I would love to see the default foodstuffs config file.
     
  10. Offline

    jonathanyc

    I'll be adding that as soon as I get home - I can't work on this computer, but I should be back home soon. I hope there aren't too many bugs. ;)

    At the moment, I'm not sure if the lack of a config file is due to a bug or if it is by default, but here is the default one.

    I'll be home soon, thanks for being patient :)
     
  11. Offline

    Spycoclown

    why does the hunger dont get higher? i still have a level of 0 after 2 hours?

    with the food propeties it works. when i type in /sethunger Spycoclown 100
    Then i have a hunger of 100
    the i eat an appel and the hunger is at 0

    But the hunger dont get higher from alone.

    i dont know if it is wrong but my server gives me this message:
    19:57:53 [SEVERE] Nag author: 'fullwall' of 'Gastronomic' about the following: o nPlayerJoin has been replaced with a new signature, (PlayerJoinEvent)
    but the server dont crashes.
     
  12. Offline

    Jeyge

    You are in the Admin group and have the gastronomic.disablehunger permission. Use - '-gastronomic.disablehunger' to fix this.
     
  13. Offline

    T4L_Goose

    A bug people are reporting on my server: When you take hunger damage and you're wearing armor, the armor will actually take the damage, and not you.

    Also, they're saying that on occasion, you can still right click on a chest or something with food in your hand, and your hunger will be reduced, but you won't eat the food.

    Also, this doesn't seem to work on Bukkit 860. People get hungry even when they're offline.

    PS: Is it possible to make the interval work from the last time someone ate something? Instead of it being global?
     
  14. Offline

    SwearWord

    What exactly is the interval?
     
  15. Offline

    T4L_Goose

    The interval is the amount of time between "hunger" periods.
     
  16. Offline

    Tyrant451

    Thank you very much :)
     
  17. Offline

    jonathanyc

    Might take a little longer than 24 hours (referring to my previous post in which I stated 24 hours as the "deadline") - I'm currently in the process of rewriting parts of Gastronomic to make it more readable/maintainable. All of the bugs which you guys reported should be fixed, which I have written down as:
    • Default foodstuffs file not being written
    • Deprecated onPlayerJoin event
    • Armor taking hunger damage
    • Clicking on chest reducing hunger but not consuming food
    • Getting hungry when offline
    Thanks to all who reported the bugs!

    About making the interval local, I'll look to see if that is practical, but it probably won't be in this update.

    Thanks again.
     
  18. Offline

    T4L_Goose

    Thanks dude. Keep up the good work.
     
  19. Offline

    Taranis01

    @jonathanyc
    do you mean that:
    if not...yeah, thats what i get after login ^^

    thank you for carry on Gastronomic!
     
  20. Offline

    nutlnw7410

    i got this when i use /sethunger
    Code:
    2554-06-12 23:25:17 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'sethunger' in plugin Gastronomic v1.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:128)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:281)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:684)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:677)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:217)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at com.fullwall.Gastronomic.Gastronomic.onCommand(Gastronomic.java:136)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
     
  21. Offline

    Dangirdas

    This needs to be updated to 860!
     
  22. Offline

    TelephoneKiosk

    I'll be watching this thread until some of the bugs are fixed
     
  23. Offline

    jonathanyc

    In theory, it should work in its present form in 860.

    I'm not updating the tag until I fix the bugs reported previously - doing so is proving to be a pain, as Gastronomic's design seems to be purposely made esoteric.
     
  24. Offline

    TelephoneKiosk

    I'm confused about how to configure the time in which the hunger level increases in the config file.
     
  25. Offline

    Taranis01

    @TelephoneKiosk
    interval=2000
    i guess its using 'Ticks', so you need to add '20' for every 1 second u want to add
     
  26. Offline

    jonathanyc

    Quick status update: this project is not dead, I'm almost finished atm. Sorry for the wait. :(
     
  27. Offline

    TelephoneKiosk

    I installed it but my hunger level doesn't increase for some reason.
     
  28. Offline

    Spycoclown

    @TelephoneKiosk

     
  29. Offline

    fullwall

  30. Offline

    dvdbrander

    Could you make a function that makes you walk/mine slower instead of dying?
     

Share This Page