Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,15 @@ private void sendDelayedPotionSpawn(final EntityDataHandlerEvent event, final En
addEntity.write(Types.SHORT, spawn.velocityY());
addEntity.write(Types.SHORT, spawn.velocityZ());
addEntity.send(Protocol1_9To1_8.class); // Before the entity data is sent

// 1.8 clients never apply a potion spawn's velocity - vanilla servers send it in a separate
// velocity packet after the spawn, so do the same
final PacketWrapper setEntityMotion = PacketWrapper.create(ClientboundPackets1_8.SET_ENTITY_MOTION, event.user());
setEntityMotion.write(Types.VAR_INT, event.entityId());
setEntityMotion.write(Types.SHORT, spawn.velocityX());
setEntityMotion.write(Types.SHORT, spawn.velocityY());
setEntityMotion.write(Types.SHORT, spawn.velocityZ());
setEntityMotion.send(Protocol1_9To1_8.class);
}

private void handleEntityData(EntityDataHandlerEvent event, EntityData entityData) {
Expand Down