From a809e71d5852c8b7ec39b75e0fbc1551b69b7ed8 Mon Sep 17 00:00:00 2001 From: ACL Date: Sat, 8 Aug 2026 16:56:00 +0100 Subject: [PATCH] fix: Thrown eggs use snowball particles when hitting a block (#167) Thrown eggs used snowball particles when hitting a block, there wasn't any code for the correct particles either. I added the new egg particles and assigned them to the thrown egg entity. Before: ![2026-08-07_20.09.22.png](/attachments/2d55ef32-3750-4825-b884-9a39a50e9bd8) Now: ![2026-08-07_20.18.59.png](/attachments/d2b5571e-c121-44e2-a412-12d2a460f8d7) Reviewed-on: https://git.neolegacy.dev/neoStudiosLCE/neoLegacy/pulls/167 Co-authored-by: ACL Co-committed-by: ACL --- Minecraft.Client/LevelRenderer.cpp | 3 +++ Minecraft.World/ParticleTypes.h | 1 + Minecraft.World/ThrownEgg.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp index a7578092..953f6d77 100644 --- a/Minecraft.Client/LevelRenderer.cpp +++ b/Minecraft.Client/LevelRenderer.cpp @@ -3178,6 +3178,9 @@ shared_ptr LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle case eParticleType_mobAppearance: particle = std::make_shared(lev, x, y, z); break; + case eParticleType_thrownegg: + particle = std::make_shared(lev, x, y, z, Item::egg, textures); + break; default: if( ( eParticleType >= eParticleType_iconcrack_base ) && ( eParticleType <= eParticleType_iconcrack_last ) ) diff --git a/Minecraft.World/ParticleTypes.h b/Minecraft.World/ParticleTypes.h index 4d3e939f..3b3697e2 100644 --- a/Minecraft.World/ParticleTypes.h +++ b/Minecraft.World/ParticleTypes.h @@ -42,6 +42,7 @@ enum ePARTICLE_TYPE eParticleType_happyVillager, eParticleType_fireworksspark, eParticleType_mobAppearance, + eParticleType_thrownegg, // 4J-JEV: In the java, the particle name was used to sneak parameters in for the Terrain and IconCrack particle constructors. diff --git a/Minecraft.World/ThrownEgg.cpp b/Minecraft.World/ThrownEgg.cpp index 9bdfae10..ad719eae 100644 --- a/Minecraft.World/ThrownEgg.cpp +++ b/Minecraft.World/ThrownEgg.cpp @@ -58,7 +58,7 @@ void ThrownEgg::onHit(HitResult *res) } for (int i = 0; i < 8; i++) - level->addParticle(eParticleType_snowballpoof, x, y, z, 0, 0, 0); + level->addParticle(eParticleType_thrownegg, x, y, z, 0, 0, 0); if (!level->isClientSide) {