aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvessa <225480449+sylvessa@users.noreply.github.com>2026-03-23 20:11:37 -0500
committerGitHub <noreply@github.com>2026-03-23 20:11:37 -0500
commitdaed75b8a18ebff56e89ca66c812f8db57f7635b (patch)
treeb1134e96000aa1560c1a41637b76f462586a0ce1
parent9e715cb3bc99802d0f7c5e8e73ad271754c89dc2 (diff)
make handleParticleEvent actually parse the particle type instead of hardcoding hearts (#1399)
-rw-r--r--Minecraft.Client/ClientConnection.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Minecraft.Client/ClientConnection.cpp b/Minecraft.Client/ClientConnection.cpp
index 325e949b..a80af5d2 100644
--- a/Minecraft.Client/ClientConnection.cpp
+++ b/Minecraft.Client/ClientConnection.cpp
@@ -4036,6 +4036,8 @@ void ClientConnection::handleSetPlayerTeamPacket(shared_ptr<SetPlayerTeamPacket>
void ClientConnection::handleParticleEvent(shared_ptr<LevelParticlesPacket> packet)
{
+ ePARTICLE_TYPE particleId = (ePARTICLE_TYPE)Integer::parseInt(packet->getName());
+
for (int i = 0; i < packet->getCount(); i++)
{
double xVarience = random->nextGaussian() * packet->getXDist();
@@ -4045,10 +4047,6 @@ void ClientConnection::handleParticleEvent(shared_ptr<LevelParticlesPacket> pack
double ya = random->nextGaussian() * packet->getMaxSpeed();
double za = random->nextGaussian() * packet->getMaxSpeed();
- // TODO: determine particle ID from name
- assert(0);
- ePARTICLE_TYPE particleId = eParticleType_heart;
-
level->addParticle(particleId, packet->getX() + xVarience, packet->getY() + yVarience, packet->getZ() + zVarience, xa, ya, za);
}
}