feat: TU19 (Dec 2014) Features & Content (#155)

* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
daoge
2026-03-03 03:04:10 +08:00
committed by GitHub
parent 84c31a2331
commit b3feddfef3
2069 changed files with 264842 additions and 139522 deletions

View File

@@ -5,7 +5,7 @@
#include "net.minecraft.world.entity.player.h"
#include "RepairResultSlot.h"
RepairResultSlot::RepairResultSlot(RepairMenu *menu, int xt, int yt, int zt, shared_ptr<Container> container, int slot, int x, int y) : Slot(container, slot, x, y)
RepairResultSlot::RepairResultSlot(AnvilMenu *menu, int xt, int yt, int zt, shared_ptr<Container> container, int slot, int x, int y) : Slot(container, slot, x, y)
{
m_menu = menu;
this->xt = xt;
@@ -25,24 +25,24 @@ bool RepairResultSlot::mayPickup(shared_ptr<Player> player)
void RepairResultSlot::onTake(shared_ptr<Player> player, shared_ptr<ItemInstance> carried)
{
if (!player->abilities.instabuild) player->withdrawExperienceLevels(m_menu->cost);
m_menu->repairSlots->setItem(RepairMenu::INPUT_SLOT, nullptr);
if (!player->abilities.instabuild) player->giveExperienceLevels(-m_menu->cost);
m_menu->repairSlots->setItem(AnvilMenu::INPUT_SLOT, nullptr);
if (m_menu->repairItemCountCost > 0)
{
shared_ptr<ItemInstance> addition = m_menu->repairSlots->getItem(RepairMenu::ADDITIONAL_SLOT);
shared_ptr<ItemInstance> addition = m_menu->repairSlots->getItem(AnvilMenu::ADDITIONAL_SLOT);
if (addition != NULL && addition->count > m_menu->repairItemCountCost)
{
addition->count -= m_menu->repairItemCountCost;
m_menu->repairSlots->setItem(RepairMenu::ADDITIONAL_SLOT, addition);
m_menu->repairSlots->setItem(AnvilMenu::ADDITIONAL_SLOT, addition);
}
else
{
m_menu->repairSlots->setItem(RepairMenu::ADDITIONAL_SLOT, nullptr);
m_menu->repairSlots->setItem(AnvilMenu::ADDITIONAL_SLOT, nullptr);
}
}
else
{
m_menu->repairSlots->setItem(RepairMenu::ADDITIONAL_SLOT, nullptr);
m_menu->repairSlots->setItem(AnvilMenu::ADDITIONAL_SLOT, nullptr);
}
m_menu->cost = 0;
@@ -54,12 +54,12 @@ void RepairResultSlot::onTake(shared_ptr<Player> player, shared_ptr<ItemInstance
if (++dmg > 2)
{
m_menu->level->setTile(xt, yt, zt, 0);
m_menu->level->removeTile(xt, yt, zt);
m_menu->level->levelEvent(LevelEvent::SOUND_ANVIL_BROKEN, xt, yt, zt, 0);
}
else
{
m_menu->level->setData(xt, yt, zt, dir | (dmg << 2));
m_menu->level->setData(xt, yt, zt, dir | (dmg << 2), Tile::UPDATE_CLIENTS);
m_menu->level->levelEvent(LevelEvent::SOUND_ANVIL_USED, xt, yt, zt, 0);
}
}