thecodewarrior / Hooked

Adds terraria style hooks to minecraft
BSD 2-Clause "Simplified" License
12 stars 12 forks source link

Taking High damage when using Hooks #9

Closed NewtonAppolonius closed 5 years ago

NewtonAppolonius commented 6 years ago

Can I ask how the damage system works with respect to Hooked? For example I hook to a ledge, hook is 2 blocks higher than the ledge. I jump to release and take a heart of damage Occasionally I fall 4 blocks and take 4 hearts of damage. Jumping off a 4 high block of dirt on to grass gives me a half heart of damage. Very occasionally I start taking constant damage when I hook to a block. It looks like I am banging up against the hook itself.

Added: I'll try and get you some Use Cases where it goes a bit wobbly. Thank you.

NewtonAppolonius commented 6 years ago

Okay I think this maybe user error :-) I just spent 30 minutes in Creative/Survival test world. I think I just wasn't using the Hooks right. I was taking far to many shots that made me hit an intermediate block and that hurts. Another thing I was doing is leaving to many blocks hooked. In Survival, once I had a better handle on how the mod works, everything is fine. Well except now I have to go look for Diamonds. I want the Diamond Hook. :-)

Sorry to have bothered you.

NewtonAppolonius commented 6 years ago

Hello again. Sorry but I have just came across a case where I took a lot of damage in one hit. Scenario: Moving a 'Simple Storage Network' of 10 chests to a new location

I still don't think I am doing it properly though, I'm thinking I need to anchor myself between two hooks.

NewtonAppolonius commented 6 years ago

Just done a run through the Nether. Was going really well then a few of the 'bashing against a single hook deals damage' took place and I died quite a few times. When I hear the damage noise now I launch another hook anywhere to get out of the damage loop.

I've had a couple of deaths as well due to the game thinking I am dropping a great height when I have been no more than 3 blocks off the ground.

Thinking it might be related to some charms I have in my inventory, one of which gives Slow Fall when it detects you are falling, I removed them all from my inventory but the above problems continued.

I'm going to launch a vanilla instance in Creative and see what happens when play with Hooks.

As no one else seems to be seeing this I can only assume some other mode is interfering.

NewtonAppolonius commented 6 years ago

Okay, loaded up a fresh 1.12.2 instance and just loaded the Hooked mod plus the required mods listed.

Not good news I am afraid. Went down to the Nether and started hooking around. Note I was using a Diamond Hook

Test 1 was standard 2 hook setup with me hovering in the mid point. This worked but a couple of times but I also took damage when I released (SHIFT-C) the second hook.

Test 2 was multiple hooks with me at Hooks intersection point. 5 Hooks - died within 10 seconds.

Test 3 was a simple hook from about 15 blocks high on to Netherack. Nothing in the way, clear ground. When I landed at the target block I took 9 Hearts of damage in about 5 seconds.

Only other thing I had active was Night Vision via a potion.

Have a good weekend

wjrogers commented 6 years ago

I noticed I started taking a bunch of damage while using hooks after updating my instance to Forge 2739. I also see messages like this in the log every time I use a hook:

[00:42:19] [Server thread/WARN] [Hooked]: Player <name> spawned a hook too far from their body! Expected point within 10 blocks of player. Got a point 259.3606872558594 blocks away.
thecodewarrior commented 6 years ago

Okay, so given those examples and that log it looks like a sync issue.

I just looked really quick and I think I know part of the problem. I don't send an update packet when an invalid hook is fired, which means the client goes on its merry way, unaware that the server disagrees with it. Should be simple enough to send a sync packet when an invalid hook is fired.

thecodewarrior commented 6 years ago

Can you tell me your modpack/modlist and configs, as well as a procedure to reproduce the issue. Details like if you’re on a server, if there’s tick lag, and if you’ve got client lag (especially < 20fps) would help as well.

thecodewarrior commented 5 years ago

I can't seem to reproduce this issue. I tried on a server with 1000ms latency and like 2tps and it worked fine (as fine as anything could run under those conditions.) If it isn't latency or lag causing it I have no idea what it is.

wjrogers commented 5 years ago

Did you try latest build of forge? I'm 95% sure that's what triggered the problem for me. Sorry I haven't posted a full log, can try to do that today.

On Sat, Aug 4, 2018, 3:50 AM thecodewarrior notifications@github.com wrote:

I can't seem to reproduce this issue. I tried on a server with 1000ms latency and like 2tps and it worked fine (as fine as anything could run under those conditions.) If it isn't latency or lag causing it I have no idea what it is.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thecodewarrior/Hooked/issues/9#issuecomment-410431751, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD0beuxjJZv-eXDPtDkZTTI-32tTqWmks5uNVIzgaJpZM4VhbRS .

thecodewarrior commented 5 years ago

I still can't reproduce it reliably. I've taken damage a couple times in at least an hour of testing, but nothing reliable and nothing in a dev environment.

wjrogers commented 5 years ago

Steps to reproduce:

  1. Create a new custom profile, Minecraft 1.12.2, Forge 14.23.4.2739
  2. Install Hooked
  3. Single Player > Create World > Play
  4. Cheat in an Ender Hook
  5. Find a high place, shoot hook at ground, observe the player takes damage and the log contains the message I reported earlier:
[15:06:30] [Server thread/WARN] [Hooked]: Player Goncyn spawned a hook too far from their body! Expected point within 10 blocks of player. Got a point 320.0935363769531 blocks away.

Log: latest.log

thecodewarrior commented 5 years ago

That worked! Now to figure out why it worked. :P

thecodewarrior commented 5 years ago

So the culprit here is LibLib. Something changed from 4.9 to 4.11 that is breaking the fall damage nullification.

wjrogers commented 5 years ago

Thanks, downgrading LibrarianLib to 4.9 is an effective workaround.

wjrogers commented 5 years ago

Spoke a little too soon. FYI for others in the same boat:

Downgrading LibrarianLib with my existing world caused a deserialization error when a player with the hooked capability stored in the player NBT data tried to log in. I was able to fix it by using NBT Explorer to delete the key playerdata/<guid>/ForgeCaps/hooked:playerhookwielder, where <guid> is the globally-unique ID of the player.

thecodewarrior commented 5 years ago

This was a bug in LibrarianLib which will be resolved once 4.12 is released. Until then I'll keep this open so people in the same boat will be able to find it.

esotericist commented 5 years ago

@thecodewarrior LibrarianLib 4.12 doesn't appear to correct the problem; I can still trivially get falling damage with either the ender hook scenario above, or using a red hook and raising/lowering myself repeatedly.

Edit: In case it's helpful, still getting this with every hook: [22:05:02] [Server thread/WARN] [Hooked]: Player esotericist spawned a hook too far from their body! Expected point within 10 blocks of player. Got a point 122.77186584472656 blocks away.

terrapin47 commented 5 years ago

Can confirm I'm also still having this issue after updating LLib to 4.12 ( Just using the iron hook works as well )

spawned a hook too far from their body! Expected point within 10 blocks of player. Got a point 572.7847290039062 blocks away.

thecodewarrior commented 5 years ago

@esotericist can you reproduce it within 10 blocks of 0, 0, 0?

Serialization errors seem to cause the spawn position to be 0, 0, 0, so if that's the case it won't happen within 10 blocks of that point, or at the very least won't leave those logs

terrapin47 commented 5 years ago

This is correct, as when slightly far enough out from 0, 0, 0 I get spawned a hook too far from their body! Expected point within 10 blocks of player. Got a point 10.490606307983398 blocks away. and otherwise see nothing.

It does also appear to be fixing the issue of taking fall damage, although doing an extensive test within tight bounds is a bit difficult.

thecodewarrior commented 5 years ago

I was able to reproduce this as well, and I'm not sure how but 1.0.1 (which just got approved) fixes it. It's confusing, because I didn't make any changes directly related to this. I'd like you to confirm whether it is fixed for you before I close however.

esotericist commented 5 years ago

Sadly, when I load 1.0.1 in an existing world, this happens.

I already had latest (4.12) librarianlib in the previous load of the world.

thecodewarrior commented 5 years ago

Just cleaning out the issues, is this still an issue with 1.0.3? If not I'll close this.

terrapin47 commented 5 years ago

Seems to be working okay for me.