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:  Now:  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:
@@ -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 ) )
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user