Hunger Mechanics

Hunger Mechanics a mod that adds hunger related features and changes to how the player can do actions they normally could: such as No eating while HUNGER effect is ON, Hunger Text (for hunger status), Slower block breaking while hungry, No jumping while hungry (might want to use slabs/stairs/ladders/vines or teleportation in this situation), Passive Slowness (Gravity Effect), Salmonela (Hunger effect when raw meat is eaten), Sprinting Exhaustion, No damage done when hungry, and Heavy Armor.

Video Review

THE MOD IS ABANDONED!

I have plans of returning to this after some real life issues are dealt with. Thank you for your consideration!

If anyone wants to update this or continue development the source is on github.

BRIEF DESCRIPTION
Hunger in Minecraft is just too linear in my opinion. You get hungry, you eat food, you get hungry again you eat food again and so on. Nothing really special happens if you are low on hunger. There is no real threat from being hungry. Simply eat a cooked potato and you are good to go in no time.

This mod attempts to fix this linearity by introducing some fun mechanics to the game based on how hungry you get.

This is a simple mod I made for my own upcoming modpack(link to be added at a later date if it ever gets public).

Some aspects of the mod can be configured in the config file.

THIS IS DEVELOPED FOR SINGLE-PLAYER, MULTIPLAYER IS PLANNED!

IF INSTALLED ON SERVER IT WILL CRASH!

LONGER DESCRIPTION
By default there are certain materials that slow the player when walking on them. This is purely based on the materials of the blocks themselves. All of those materials are hardcoded, custom materials by other mods will not be valid option and will not slow the player at all. You can either find a list of those materials online or you can experiment with blocks ingame to find out the level of slowness you will get. While walking on a block that makes you slower you will also get hungry faster.

You will lose hunger even if you are standing around doing nothing.

Iron/Gold/Diamond Armors are considered a heavy piece of equipment. So much so that you will lose more hunger while wearing it and also sink to the bottom of a river if you try to cross it. This applies to oceans as well, so be careful when you are ON a boat (to not fall off).

You cannot jump if you are too hungry (You can swim though). This will really make your head spin trying to find a way to get home. Slabs will be your best friend from here on out.

Why are you eating raw meat, don't you know that you might get sick? Any meat item that is not cooked has a chance to give you the hunger effect. You should be more careful about what you eat.

Oh I forgot to mention the most important part... the HUNGER effect will not let you eat anymore because it is considered to be a HARMFUL effect that gets you SICK!

DISCORD SERVER
https://discord.gg/eBNYpbVWbK

Videos:

https://www.youtube.com/watch?v=yRw6p75XDds

FEATURES LIST
I cannot really show off any parts of the mod without making a video, which sadly I lack the creativity to make.

If you feel like theses features need more explanation feel free to leave a comment.

No eating while HUNGER effect is ON
Remove the ability for the player to eat if the HUNGER effect is on.

Instant foods will count though!!! This is intended and will not change.

Hunger Text
Added a TEXT on screen showing you your hungry stages. By default there are 4 stages.



Slower block breaking while hungry
Slower block breaking speed based on your hungry stage.

No jumping while hungry
Remove the ability for the player to jump when too low on hunger.

Passive Slowness (Gravity Effect)
Add slowness effect when walking on different block materials. This will require more hunger to move around though.

Technical Stuff

This was achieved by creating a new potion effect called hungermechanics:gravity. It has no texture for obvious reasons.

FOR MODPACK USERS: You can use it instead of slowness if you need the slowness effect also present on the player at the same time. REMOVED in version 1.3+ Version 1.4+: Instead now the speed can be directly modified through configs.

Salmonela (Hunger effect when raw meat is eaten)
Add hunger effect level 3 for 5 seconds when eating any food (60% chance) in the config file. Look for salmonela in config in order to disable or change the food list. By default on minecraft:tropical_fish is currently there as an example.

Sprinting Exhaustion
Add extra food exhaustion when sprinting

This mechanic is ADDED to the base vanilla value. Do not set this too high! You have been warned.

No damage done when hungry
Attacking while at starving/dying stage the player does less damage.

Heavy Armor
Players will sink on the bottom of any water block, based on what armor they are wearing. (LOOK IN CONFIG) This only applies to Chestplate and Leggings! Boots and Head will be ignored!

Players will lose more hunger based on anything they are wearing from this list.

POSSIBLE UPDATES in no particular order
No knockback when hungry.

Heavy Armors config to have a list of water blocks (in case of modded fluids)

Exhaustion when in swimming animation only

CREDITS
Mojang

Forge team

MCreator

FlowerChild (your ideas are the best!)

ACKNOWLEDGEMENTS
I am not a programmer.

I am only doing this as a hobby on my spare time.

My code will not be the best I know that and I understand that.

If you have a better solution to a problem/you are frustrated by something in my mod/or simply my code sucks then please tell me in a nice and civilized manner stating my mistakes and pointing out solutions or sources to read more on those matters. Comments and PMs being rude/uncivilized or otherwise inhumane will be ignored and possibly deleted. I do not care about how much experience you might have if we cannot communicate in a civilized manner and express our opinions. As I said I am not a programmer I might not understand what I did wrong or how to solve a problem that you might find EASY, at least let me figure it out in peace or point me to the right direction. Thank you!