#I want to avoid velocity clamping

1 messages · Page 1 of 1 (latest)

neat drift
#

I've created a high velocity projectile, but the velocity clamp is preventing it from drawing correctly.
I have already found the class where the clamping is taking place.
Would it be possible to solve this problem by simply rewriting this class entirely with mixin and deleting the clamping part?

When I heard about a similar issue before, I was told that it could be solved by sending the velocity as a float or double in a custom packet, but in this case, do I still need to mix it in where I'm sending the EntityVelocityUpdateS2CPacket?

tribal bronze
#

no

#

make a custom payload

neat drift
# tribal bronze no

I'm still not very familiar with packets, so I apologize if I'm saying something off-topic, but what you're saying is that by payload, you mean a custom packet with the clamping part of EntityVelocityUpdateS2CPacket removed, and that I should send that in the appropriate place?

tribal bronze
#

yeah

neat drift
#

In the end, a Mixin is necessary, and in this case you just rewrite the part where EntityVelocityUpdateS2CPacket is normally called so that it sends the... payload?

This seems the same as changing EntityVelocityUpdateS2CPacket directly, but what's the difference?

tribal bronze
#

what

#

no, don't mixin into vanilla packets, thats probably just gonna mess things up

#

instead of setting velocityModified to true on the entity send your custom payload

neat drift
#

Ah, I thought I had to change the vanilla code where EntityVelocityUpdateS2CPacket was called. Thanks. I'll try that.

bronze viper
#

Somebody said you could send an explosion packet instead to avoid the clamping