Merge branch 'pieeebot:main' into main
This commit is contained in:
@@ -4015,6 +4015,12 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
|
||||
else if (a == -2) {
|
||||
done = true;
|
||||
}
|
||||
else if (a == -4) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
minecraft->localplayers[m_userIndex]->enchantmentEntries[i].id = -3;
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
else {
|
||||
if (firstInGroup) {
|
||||
temp.id = a;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -275,10 +275,13 @@ void IUIScene_AbstractContainerMenu::handleEnchantButton(int slot, int iPad) {
|
||||
EnchantmentMenu* menu = new EnchantmentMenu(Minecraft::GetInstance()->player->inventory, dynamic_cast<Level*>(Minecraft::GetInstance()->level), 0, 0, 0);
|
||||
if (0 == 0) { //uhh don't worry that is temporary
|
||||
int lapisCost = slot + 1; // slot 0 = 1 lapis, slot 1 = 2, slot 2 = 3
|
||||
|
||||
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
auto player = pMinecraft->player;
|
||||
if (player->enchantmentEntries[slot].id == -3) return;
|
||||
|
||||
EnchantmentMenu* menu = dynamic_cast<EnchantmentMenu*>(player->containerMenu);
|
||||
|
||||
HtmlString title = HtmlString(
|
||||
wstring(app.GetString(Enchantment::enchantments[player->enchantmentEntries[slot].id]->getDescriptionId())) +
|
||||
L" " +
|
||||
|
||||
@@ -216,6 +216,8 @@ bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
|
||||
#endif
|
||||
// 4J Added - Give every player a map the first time they join a server
|
||||
player->inventory->setItem( 9, std::make_shared<ItemInstance>(Item::emptyMap_Id, 1, level->getAuxValueForMap(player->getXuid(), 0, centreXC, centreZC, mapScale)));
|
||||
Random* r = new Random();
|
||||
player->enchantmentSeed = r->nextInt(1000000); //Randomise enchantment seed upon joining server
|
||||
if(app.getGameRuleDefinitions() != nullptr)
|
||||
{
|
||||
app.getGameRuleDefinitions()->postProcessPlayer(player);
|
||||
|
||||
Reference in New Issue
Block a user