Enginecrafter77 / SurvivalInc

A Minecraft mod that aims to make your minecraft life a little bit more annoying
https://www.curseforge.com/minecraft/mc-mods/survival-inc
MIT License
9 stars 6 forks source link

[inter-mod Issue] Crash with ValkyrienSkies on server side when you drink water #34

Closed gatoborrachon closed 3 years ago

gatoborrachon commented 3 years ago

Short Description I made a new world loaded some chunks (/forge gen ~ ~ ~ 1000) and then drinked some water, but after drinking water i got disconnected from the server without crash report (i'm playing singleplayer), i looked at Latest.log and found this: https://pastebin.com/aWXtWm9f

To Reproduce Steps to reproduce the behavior:

  1. Add ValkyrienSkies and Survival Inc.
  2. gen some chunks with /forge gen ~ ~ ~ 1000
  3. Drink water from any water body
  4. See error

Crash Report Well, since it doesn't gens a crash report, here is my Latest.log, look at the bottom, also it is different from the log i uploaded above: latest.log

Additional Notes 1.- its completly new, i have no idea why it never happened before, nor why it happens now, but at least i can confirm that it is easy to reproduce (after loading some chunks) and it will always happen again once you repeat it (in the same world)

2.- also, sadly ValkyrienSkies for 1.12, in words of its author, will not receive another update because the author (Triode) broke his Dev Environment, i have not tried to load that repo, but if this issue is completly from their side, just tell me what i need to change and fix it inside a personal modified jar

Enginecrafter77 commented 3 years ago

Okay so I looked a bit into it and it seems that ValkyrienSkies is placing strong policy on when the raytracing function may be called. It throws an exception every time it's called on anything but the client side, and thus it crashes server side since Survival Inc uses raytracing to verify if the client didn't send a forged request. I added a config option to disable the server raytracing, but it will leave the server unprotected against hacked clients sending forged requests (which basically allows anyone to replenish their hydration indefinitely). Unfortunately, there is no other way around this, so I think the compromise is a necessary evil. (I will commit the changes soon).

gatoborrachon commented 3 years ago

well, its a shame that ValkyrienSkies does that, but i think that the probabilities of that someone design a hacked client just for this is pretty small, thanks again.

gatoborrachon commented 3 years ago

mmm, well, i would like to add that i can't build the Dev Environment, i get an issue related to the Line 17 inside build.gradle (the plugin palantir) https://github.com/Enginecrafter77/SurvivalInc/blob/68eb52913234db0d630b1446b936e55e51cbf61d/build.gradle#L17

Enginecrafter77 commented 3 years ago

Hmm that's weird I use that plugin in almost all of my projects. Can you maybe post the gradle log? (The output of gradlew)? Anyways I will try to make a separate environment from scratch to see if I can reproduce the issue. And just as a side note, maybe it would be good if you opened a separate issue about this.

gatoborrachon commented 3 years ago

ok, i made it