Description
Currently, when a wind charge explodes and affects a contraption, every single block in that contraption is checked if is in the blast radius, and if so, gets affected by an impulse force. It's all correct so far, but the value of this impulse force is essentially hardcoded to 5.0, regardless of the distance between blast origin and this block.
|
final Vec3 pos = blockpos.getCenter(); |
|
final Vec3 force = pos.subtract(localExplosionPosition).normalize().scale(5.0); |
|
handle.applyImpulseAtPoint(pos, force); |
This creates some irrational movement behavior. For example, consider a contraption like this:
The dispenser is filled with wind charges. When it got powered, a wind charge gets shot into the left face of the glass block and creates a wind blast. Since the blast is nearer to the glass block than to the dispenser, one would assume the contraption will move to the right, or barely moves at all, but in reality it moves to the left instead due to more block receiving the blast being on the left side of the blast. This behavior is, IMO, weird.
I'm not entirely sure if this is intentional, or if it should be kept as a "feature" like the many redstone quirks present in vanilla Minecraft. I'm good with both.
Game Log
N/A
Description
Currently, when a wind charge explodes and affects a contraption, every single block in that contraption is checked if is in the blast radius, and if so, gets affected by an impulse force. It's all correct so far, but the value of this impulse force is essentially hardcoded to
5.0, regardless of the distance between blast origin and this block.sable/common/src/main/java/dev/ryanhcode/sable/mixin/explosion/ExplosionMixin.java
Lines 146 to 148 in 985b804
This creates some irrational movement behavior. For example, consider a contraption like this:
The dispenser is filled with wind charges. When it got powered, a wind charge gets shot into the left face of the glass block and creates a wind blast. Since the blast is nearer to the glass block than to the dispenser, one would assume the contraption will move to the right, or barely moves at all, but in reality it moves to the left instead due to more block receiving the blast being on the left side of the blast. This behavior is, IMO, weird.
I'm not entirely sure if this is intentional, or if it should be kept as a "feature" like the many redstone quirks present in vanilla Minecraft. I'm good with both.
Game Log
N/A