feat: remove experience

This commit is contained in:
str1k3r committed 2026-09-26 17:17:51 -04:00
1 parent bdfe5350cd
commit 41d166afed
83 files changed
+47 -1501

No files matched your search

+1 -33
View File
@@ -499,10 +499,6 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet)
e = shared_ptr<Entity>( new ThrownPotion(level, x, y, z, packet->data) );
packet->data = 0;
break;
case AddEntityPacket::THROWN_EXPBOTTLE:
e = shared_ptr<Entity>( new ThrownExpBottle(level, x, y, z) );
packet->data = 0;
break;
case AddEntityPacket::BOAT:
e = shared_ptr<Entity>( new Boat(level, x, y, z) );
break;
@@ -665,18 +661,6 @@ void ClientConnection::handleAddEntity(shared_ptr<AddEntityPacket> packet)
}
void ClientConnection::handleAddExperienceOrb(shared_ptr<AddExperienceOrbPacket> packet)
{
shared_ptr<Entity> e = shared_ptr<ExperienceOrb>( new ExperienceOrb(level, packet->x / 32.0, packet->y / 32.0, packet->z / 32.0, packet->value) );
e->xp = packet->x;
e->yp = packet->y;
e->zp = packet->z;
e->yRot = 0;
e->xRot = 0;
e->entityId = packet->id;
level->putEntity(packet->id, e);
}
void ClientConnection::handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> packet)
{
double x = packet->x / 32.0;
@@ -1234,18 +1218,7 @@ void ClientConnection::handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> pac
if( minecraft->localgameModes[playerPad] != NULL )
{
// 4J-PB - add in the XP orb sound
if(from->GetType() == eTYPE_EXPERIENCEORB)
{
float fPitch=((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f;
app.DebugPrintf("XP Orb with pitch %f\n",fPitch);
level->playSound(from, eSoundType_RANDOM_ORB, 0.2f, fPitch);
}
else
{
level->playSound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f);
}
level->playSound(from, eSoundType_RANDOM_POP, 0.2f, ((random->nextFloat() - random->nextFloat()) * 0.7f + 1.0f) * 2.0f);
minecraft->particleEngine->add( shared_ptr<TakeAnimationParticle>( new TakeAnimationParticle(minecraft->level, from, to, -0.5f) ) );
level->removeEntity(packet->itemId);
}
@@ -2212,11 +2185,6 @@ void ClientConnection::handleSetHealth(shared_ptr<SetHealthPacket> packet)
}
}
void ClientConnection::handleSetExperience(shared_ptr<SetExperiencePacket> packet)
{
minecraft->localplayers[m_userIndex]->setExperienceValues(packet->experienceProgress, packet->totalExperience, packet->experienceLevel);
}
void ClientConnection::handleTexture(shared_ptr<TexturePacket> packet)
{
// Both PlayerConnection and ClientConnection should handle this mostly the same way