Only one of the values here needs to be greater than 0

This commit is contained in:
RednedEpic 2020-08-17 20:46:03 -05:00
parent 44f521ed04
commit 80a36344eb

View file

@ -66,7 +66,7 @@ public class JavaExplosionTranslator extends PacketTranslator<ServerExplosionPac
levelSoundEventPacket.setPosition(Vector3f.from(packet.getX(), packet.getY(), packet.getZ()));
session.sendUpstreamPacket(levelSoundEventPacket);
if (packet.getPushX() > 0f && packet.getPushY() > 0f && packet.getPushZ() > 0f) {
if (packet.getPushX() > 0f || packet.getPushY() > 0f || packet.getPushZ() > 0f) {
SetEntityMotionPacket motionPacket = new SetEntityMotionPacket();
motionPacket.setRuntimeEntityId(session.getPlayerEntity().getGeyserId());
motionPacket.setMotion(Vector3f.from(packet.getPushX(), packet.getPushY(), packet.getPushZ()));