kFood is a plugin that abolishes minecraft's new food system and replaces it with a customizable system that resembles the way food used to work.
Why?
I made this plugin to get myself familliar with bukkit again, it has been a loooonng while since I coded with it. Oh and by the way, I just really didn't like the food system
Features
There are many plugins that reintroduce minecraft's old way of handling food. Most of them look to the material of the item to know how much food to apply; here kFood differs.
kFood's unique feature is to look at item names to identify which food it is. This has a few upsides:
The downside: if any major changes happen to bukkit's CraftItemStack class or NMS' ItemStack class this plugin will break and need updating.
anvilItems
The previous feature raises some questions regarding anvils. What happens when a player takes a piece of Rotten Flash and renames it to Golden Carrot?
On default if an anvilItem is eaten kFood will first check if an anvil name is specifically set. If not kFood will (for now) instead check against the original item's name.
foodLevels
Even though this plugin renders the foodbar practically useless, the effects of it do still remain. This allows for some interesting features. If you set your foodLevel lower than 3 for instance, players cannot run anymore. The way the client works, it won't even try to send a sprinting packet. If a player has a foodLevel higher than 17 it will slowly regenerate hearts.
kFood stores the foodLevel of all players in the main scoreboard under the " food" objective. Having a score_food of 0 (default) means that you have the default-food. This way you can use commandblocks or other plugins to give individual players different foodlevels, for instance to make a certain area where players can or cannot run.
Why?
I made this plugin to get myself familliar with bukkit again, it has been a loooonng while since I coded with it. Oh and by the way, I just really didn't like the food system
Features
- Ensure players' foodLevels stay static.
- Give individual players different foodLevels.
- Make eating food increase health instead of the foodLevel.
- Set the halfHeartsToAdd for each food.
- Configure some effects when eated.
- Configure new (instant) foods.
- Set which foods can be eaten instantly.
- Set which instantFoods should return a bowl.
There are many plugins that reintroduce minecraft's old way of handling food. Most of them look to the material of the item to know how much food to apply; here kFood differs.
kFood's unique feature is to look at item names to identify which food it is. This has a few upsides:
- More customization!
- (better) support for items from other plugins.
- (better) support for mods.
- The ability to give different kinds of fish different amounts of halfHeartsToHeal.
The downside: if any major changes happen to bukkit's CraftItemStack class or NMS' ItemStack class this plugin will break and need updating.
anvilItems
The previous feature raises some questions regarding anvils. What happens when a player takes a piece of Rotten Flash and renames it to Golden Carrot?
On default if an anvilItem is eaten kFood will first check if an anvil name is specifically set. If not kFood will (for now) instead check against the original item's name.
foodLevels
Even though this plugin renders the foodbar practically useless, the effects of it do still remain. This allows for some interesting features. If you set your foodLevel lower than 3 for instance, players cannot run anymore. The way the client works, it won't even try to send a sprinting packet. If a player has a foodLevel higher than 17 it will slowly regenerate hearts.
kFood stores the foodLevel of all players in the main scoreboard under the " food" objective. Having a score_food of 0 (default) means that you have the default-food. This way you can use commandblocks or other plugins to give individual players different foodlevels, for instance to make a certain area where players can or cannot run.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.20
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
kFood is a free Minecraft Java mod. Compatible with Minecraft 1.20. Downloaded 543 times (via Spigot). Download it and open it directly in the game.
![[IMG]](http://proxy.spigotmc.org/4147070d886e4f9435ff351ce6e25b456ac4a118?url=https%3A%2F%2Fraw.githubusercontent.com%2F7kasper%2FkFood%2Fmaster%2FkFood%2FkFoodBanner.png)