Health and Hunger Tweaks

Health and Hunger Tweaks

805k Downloads

Instant crash when trying to eat anything.

PurpleHel opened this issue ยท 9 comments

commented

Doesn't matter what or where. Crash report looks similar to issue #8.

https://pastebin.com/Krgyme4f

minecraft 1.12, H&HT 2.1.1.

Happens with applecore 3.1.0 and 3.1.1

Custom modpack. Mods list https://pastebin.com/KcLWQnZF

commented

I've gotten the mods list down to about 80 by comparing my mods to the mods list from issue #8, but now I can't get minecraft to run, it errors out during initialization. :(

ActuallyAdditions-1.12.2-r130
angelRingToBauble-1.12-0.3.1.50+d4e654e
AppleCore-mc1.12.2-3.1.1
AutoRegLib-1.3-15
base-1.12.2-3.6.1
Baubles-1.12-1.5.2
bdlib-1.14.3.12-mc1.12.2
BetterBuildersWands-1.12-0.11.1.245+69d0d70
Bookshelf-1.12.2-2.3.523
Botania r1.10-353
BrandonsCore-1.12-2.4.0.152-universal
Ceramics-1.12-1.3.3b
ChanceCubes-1.12.2-3.1.0.217
Chisel-MC1.12-0.1.1.27
Clumps-3.0.0
CodeChickenLib-1.12.2-3.1.5.331-universal
CoFHCore-1.12.2-4.3.10.5-universal
CommonCapabilities-1.12-1.4.0
CookingForBlockheads_1.12.1-6.3.17
CraftTweaker2-1.12-4.1.3
CustomMainMenu-MC1.12.2-2.0.8
CyclopsCore-1.12.2-0.11.4
DarkUtils-1.12.2-1.8.192
Decocraft-2.5.4_1.12.2
Draconic-Evolution-1.12-2.3.9.283-universal
EnderZoo-1.12.1-1.4.0.49
environmentaltech-1.12.2-2.0.7b
etlunar-1.12.2-2.0.7a
EvilCraft-1.12.2-0.10.47
extrautils2-1.12-1.7.4
ExtremeReactors-1.12.2-0.4.5.46
foamfix-0.9.2-1.12.2-anarchy
forestry_1.12.2-5.8.0.246
FTBLib-4.2.5
FTBUtilities-4.2.4
gendustry-1.6.5.8-mc1.12.2
generators-0.9.20.12-mc1.12.2
healthhungertweaks-1.12-2.1.1
ImmersiveEngineering-0.12-76-core
ImmersiveEngineering-0.12-76
immersivepetroleum-1.12.2-1.1.7
ironchest-1.12.2-7.0.34.820
IvToolkit-1.3.3-1.12
jei_1.12.2-4.8.5.151
journeymap-1.12.2-5.5.2
Level Up! 2-1.1.15-1.12
LootBags-1.12.2-2.5.4b
Mantle-1.12-1.3.1.21
MCA-1.12.x-5.3.1-universal
mcjtylib-1.12-2.6.4
natura-1.12.2-4.3.2.42
NaturesCompass-1.12.2-1.5.1
Neat 1.4-15
NotEnoughIDs-1.5.4.2
NuclearCraft-2.9d--1.12.2
OreExcavation-1.4.113 (1)
p455w0rdslib-1.12-2.0.28
Pam's+HarvestCraft+1.12.2p
Placebo-1.12.2-1.2.0
Plants-1.12.2-2.5.2
plustic-6.3.6.2
Psi-r1.1-59
Quark-r1.4-122
RadixCore-1.12.x-2.2.1-universal
RebornCore-1.12.2-3.6.7.210-universal
RecurrentComplex-1.4.7
RedstoneFlux-1.12-2.0.1.2-universal
Reliquary-1.12.2-1.3.4.742
ResourceLoader-MC1.12.1-1.5.3
rftools-1.12-7.29
SilentLib-1.12-2.2.16-97
TConstruct-1.12.2-2.9.1.65
tinker_io-1.12.2-release 2.6.0a
TinkerToolLeveling-1.12-1.0.3
valkyrielib-1.12.2-2.0.7a
zerocore-1.12-0.1.1.0

commented

Alright, I can work with this. Thank you for your time and I hope to get back to you soon.

commented

It turns out that 80 isn't complete, I missed optifine and possible others. I'll get you an updated list in a bit.

commented

Ok, looks like optifine was the only one I'd missed. Final list is 84, but I can't get minecraft to open with this modset.

ActuallyAdditions-1.12.2-r130
angelRingToBauble-1.12-0.3.1.50+d4e654e
AppleCore-mc1.12.2-3.1.1
AutoRegLib-1.3-15
base-1.12.2-3.6.1
Baubles-1.12-1.5.2
bdlib-1.14.3.12-mc1.12.2
BetterBuildersWands-1.12-0.11.1.245+69d0d70
Bookshelf-1.12.2-2.3.523
Botania r1.10-353
BrandonsCore-1.12-2.4.0.152-universal
Ceramics-1.12-1.3.3b
ChanceCubes-1.12.2-3.1.0.217
Chisel-MC1.12-0.1.1.27
Clumps-3.0.0
CodeChickenLib-1.12.2-3.1.5.331-universal
CoFHCore-1.12.2-4.3.10.5-universal
CommonCapabilities-1.12-1.4.0
CookingForBlockheads_1.12.1-6.3.17
CraftTweaker2-1.12-4.1.3
CustomMainMenu-MC1.12.2-2.0.8
CyclopsCore-1.12.2-0.11.4
DarkUtils-1.12.2-1.8.192
Decocraft-2.5.4_1.12.2
Draconic-Evolution-1.12-2.3.9.283-universal
EnderZoo-1.12.1-1.4.0.49
environmentaltech-1.12.2-2.0.7b
etlunar-1.12.2-2.0.7a
EvilCraft-1.12.2-0.10.47
extrautils2-1.12-1.7.4
ExtremeReactors-1.12.2-0.4.5.46
FastLeafDecay-v14
foamfix-0.9.2-1.12.2-anarchy
forestry_1.12.2-5.8.0.246
FTBLib-4.2.5
FTBUtilities-4.2.4
gendustry-1.6.5.8-mc1.12.2
generators-0.9.20.12-mc1.12.2
healthhungertweaks-1.12-2.1.1
ImmersiveEngineering-0.12-76
immersivepetroleum-1.12.2-1.1.7
ironchest-1.12.2-7.0.34.820
IvToolkit-1.3.3-1.12
jei_1.12.2-4.8.5.151
journeymap-1.12.2-5.5.2
Level Up! 2-1.1.15-1.12
LootBags-1.12.2-2.5.4b
Mantle-1.12-1.3.1.21
MCA-1.12.x-5.3.1-universal
mcjtylib-1.12-2.6.4
natura-1.12.2-4.3.2.42
NaturesCompass-1.12.2-1.5.1
Neat 1.4-15
NotEnoughIDs-1.5.4.2
NuclearCraft-2.9d--1.12.2
OptiFine_1.12.2_HD_U_C8
OreExcavation-1.4.113 (1)
p455w0rdslib-1.12-2.0.28
Pam's+HarvestCraft+1.12.2p
Placebo-1.12.2-1.2.0
Plants-1.12.2-2.5.2
plustic-6.3.6.2
Psi-r1.1-59
Quark-r1.4-122
RadixCore-1.12.x-2.2.1-universal
RebornCore-1.12.2-3.6.7.210-universal
RecurrentComplex-1.4.7
RedstoneFlux-1.12-2.0.1.2-universal
Reliquary-1.12.2-1.3.4.742
ResourceLoader-MC1.12.1-1.5.3
rftools-1.12-7.29
SilentLib-1.12-2.2.16-97
TConstruct-1.12.2-2.9.1.65
tinker_io-1.12.2-release 2.6.0a
TinkerToolLeveling-1.12-1.0.3
valkyrielib-1.12.2-2.0.7a
zerocore-1.12-0.1.1.0

commented

Thanks for the report. This, like #8, seems to be a mod conflict issue that I cannot reproduce with just HHT and AppleCore installed, but as it is recurring I'll leave this issue open. This seems to be a problem wherein upon my mod receiving the FoodEaten event, the FoodEvent.FoodEaten.foodValues field already seems to be null. This should only occur naturally if the item being consumed was not a food. Otherwise, it could occur if an event listener to the FoodEaten event or possibly a different event that allows for changing of food values sets the values to null.

Before I implement a fix, however, I'd like to know the cause of this conflict. Can you reproduce the issue with a small subset of mods (Preferably <50)? I recommend halving the mod list and trying again, repeating if there is still an issue. When you get down to a small list, send it to me and I'll take a look.

The reason I don't want to implement a hotfix right away is that it would not address the root cause of the issue, as the issue does not seem to be in my code. The hotfix would be a simple null check on this line: https://github.com/CerulanLumina/HealthHungerTweaks/blob/72209b1ca427884774fa6e65ddbdced8a3efb98c/src/main/java/net/cerulan/healthhungertweaks/handler/HealthHungerHandler.java#L67 However, if the crash is truly with every food, this would only serve to disable the satiated effect as every food's food values would be null, preventing me from calculating the appropriate duration of satiated.

Again, thank you for the report and I will be looking into this issue more closely.

commented

I've published 2.1.2 which should fix the crashing, but it will not fix the issue (I cannot calculate satiated duration if the food is null). Please double check if the issue is still present and send me a .zip of the modpack if it does.

commented

Unfortunately I don't have that world or modpack anymore, sorry.

commented

Okay that's fine, thanks for your time and sorry it took so long. I'll continue tracking this issue with Openeye and close this for now.

commented

Hey, no apology needed! Thanks for working on it, and thanks for an awesome mod!