fix: clients crashing on enchantment attempt, disabled quick equip until further notice, updated enchantingmenu swfs because lapis slot was missing?

This commit is contained in:
SevenToaster509
2026-04-16 20:47:14 +01:00
parent 5dd8d982bb
commit add784b259
12 changed files with 137 additions and 64 deletions

View File

@@ -3997,6 +3997,36 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
trader->overrideOffers(recipeList);
}
}
else if (CustomPayloadPacket::ENCHANTMENT_LIST_PACKET.compare(customPayloadPacket->identifier) == 0) {
ByteArrayInputStream bais(customPayloadPacket->data);
DataInputStream input(&bais);
bool done = false;
int l = 0;
bool firstInGroup = true;
EnchantmentEntry temp;
//int firstAmount = input.readInt();
while (!done) {
int a = input.readInt();
if (a == -1) {
minecraft->localplayers[m_userIndex]->enchantmentEntries[l] = temp;
l++;
firstInGroup = true;
}
else if (a == -2) {
done = true;
}
else {
if (firstInGroup) {
temp.id = a;
temp.level = input.readInt();
firstInGroup = false;
}
else {
input.readInt();
}
}
}
}
}
Connection *ClientConnection::getConnection()