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 <puffymono@gmail.com>
Co-committed-by: ACL <puffymono@gmail.com>
This commit is contained in:
ACL
2026-08-08 16:56:00 +01:00
committed by Fireblade
parent 6d226273b5
commit a809e71d58
3 changed files with 5 additions and 1 deletions
+3
View File
@@ -3178,6 +3178,9 @@ shared_ptr<Particle> LevelRenderer::addParticleInternal(ePARTICLE_TYPE eParticle
case eParticleType_mobAppearance:
particle = std::make_shared<MobAppearanceParticle>(lev, x, y, z);
break;
case eParticleType_thrownegg:
particle = std::make_shared<BreakingItemParticle>(lev, x, y, z, Item::egg, textures);
break;
default:
if( ( eParticleType >= eParticleType_iconcrack_base ) && ( eParticleType <= eParticleType_iconcrack_last ) )
+1
View File
@@ -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.
+1 -1
View File
@@ -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)
{