OreCruncher / DynamicSurroundings

Dynamic Surroundings mod for Minecraft 1.10.x+
MIT License
120 stars 35 forks source link

Item swing plays unexpectedly #258

Open vico93 opened 6 years ago

vico93 commented 6 years ago

Mod Version:

Forge Version:

Description:

OreCruncher commented 6 years ago

I can't figure a solution for this one. May be a bit. And to point out this isn't related to Malisis doors - it happens with regular vanilla doors as well without the Malisis mod installed.

The upshot is that when opening doors or breaking blocks if the ray trace passes through that block and there isn't a block within the players swing distance behind the item use sound will play. For example, opening a door could cause the raytrace to pass thru to the other side and not hit any blocks.

vico93 commented 6 years ago

So this is more related to door animation (regardless of Vanilla or Malisis)?

OreCruncher commented 6 years ago

Not the animation itself, but the hitbox of the door when it is open/closed. If you stand in front of a closed door your look vector (your line of sight) intersects with the door hit box. When you open the door, the hit box changes so all that is facing you is the door edge. That edge is now the hitbox. Your line of sight now pass through that block because it doesn't "hit" that box.

Note that this applies to any block. You can get the same effect breaking a log with an axe. If there is nothing behind the log when it breaks you get the axe swing sound.

darthvader45 commented 6 years ago

Yeah, sometimes get that when mining. Hopefully there's a way to fix this, preferably without being TOO hacky.