This commit is contained in:
Mohamed Ashraf 2026-03-03 01:35:55 +04:00
parent 69dc7a2279
commit 36daeebed0
9 changed files with 23 additions and 14 deletions

View file

@ -1,6 +1,7 @@
#include "stdafx.h"
#include "net.minecraft.world.inventory.h"
#include "EnchantmentContainer.h"
#include "../Minecraft.Client/Windows64Media/strings.h"
EnchantmentContainer::EnchantmentContainer(EnchantmentMenu *menu) : SimpleContainer(IDS_ENCHANT, 1), m_menu( menu )
{
@ -15,4 +16,4 @@ void EnchantmentContainer::setChanged()
{
SimpleContainer::setChanged();
m_menu->slotsChanged(); // Remove this param as it's not needed
}
}

View file

@ -9,6 +9,7 @@
#include "Fireball.h"
#include "net.minecraft.world.level.dimension.h"
#include "SharedConstants.h"
#include "../Minecraft.Client/Windows64/Windows64_App.h"
// 4J - added common ctor code.
@ -412,4 +413,4 @@ int Fireball::getIcon()
ePARTICLE_TYPE Fireball::getTrailParticleType()
{
return eParticleType_smoke;
}
}

View file

@ -6,6 +6,7 @@
#include "net.minecraft.stats.h"
#include "Material.h"
#include "Inventory.h"
#include "../Minecraft.Client/Windows64Media/strings.h"
const int Inventory::POP_TIME_DURATION = 5;
const int Inventory::MAX_INVENTORY_STACK_SIZE = 64;

View file

@ -7,7 +7,7 @@
#include "net.minecraft.world.effect.h"
#include "net.minecraft.world.item.enchantment.h"
#include "Monster.h"
#include "../Minecraft.Client/Windows64/Windows64_App.h"
#include "../Minecraft.Client/Minecraft.h"
@ -156,4 +156,4 @@ bool Monster::canSpawn()
// 4J Stu
// Fix for #8265 - AI: Monsters will flash briefly on the screen around Monster Spawners when the game settings are set to Peaceful.
return isDarkEnoughToSpawn() && PathfinderMob::canSpawn() && level->difficulty > Difficulty::PEACEFUL;
}
}

View file

@ -32,9 +32,10 @@
#include "Inventory.h"
#include "Player.h"
#include "ParticleTypes.h"
#include <string>
#include <functional>
#include "../Minecraft.Client/Textures.h"
#include <limits.h>
#include "../Minecraft.Client/LocalPlayer.h"
#include "../Minecraft.Client/HumanoidModel.h"
#include "SoundTypes.h"
@ -2555,14 +2556,14 @@ int Player::getTexture()
}
}
int Player::hash_fnct(const shared_ptr<Player> k)
int Player::hash_fnct(const std::shared_ptr<Player> k)
{
// TODO 4J Stu - Should we just be using the pointers and hashing them?
// Hashing the player's name based on platform
#ifdef __PS3__
return (int)boost::hash_value( k->name ); // 4J Stu - Names are completely unique?
return (int)boost::hash_value(k->name);
#else
return (int)std::hash_value( k->name ); // 4J Stu - Names are completely unique?
#endif //__PS3__
return (int)std::hash<std::wstring>()(k->name);
#endif // __PS3__
}
bool Player::eq_test(const shared_ptr<Player> x, const shared_ptr<Player> y)

View file

@ -1,6 +1,7 @@
#include "stdafx.h"
#include "net.minecraft.world.level.tile.entity.h"
#include "PlayerEnderChestContainer.h"
#include "../Minecraft.Client/Windows64Media/strings.h"
PlayerEnderChestContainer::PlayerEnderChestContainer() : SimpleContainer(IDS_TILE_ENDERCHEST, 9 * 3)
{
@ -69,4 +70,4 @@ void PlayerEnderChestContainer::stopOpen()
}
SimpleContainer::stopOpen();
activeChest = nullptr;
}
}

View file

@ -5,6 +5,8 @@
#include "net.minecraft.world.item.h"
#include "net.minecraft.world.item.enchantment.h"
#include "RepairMenu.h"
#include "../Minecraft.Client/Windows64Media/strings.h"
#include "../Minecraft.Client/Windows64/Windows64_App.h"
RepairMenu::RepairMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt, shared_ptr<Player> player)
{
@ -400,4 +402,4 @@ void RepairMenu::setItemName(const wstring &name)
getSlot(RESULT_SLOT)->getItem()->setHoverName(itemName);
}
createResult();
}
}

View file

@ -7,6 +7,7 @@
#include "../Minecraft.Client/Textures.h"
#include "Silverfish.h"
#include "SoundTypes.h"
#include "../Minecraft.Client/Windows64/Windows64_App.h"
@ -208,4 +209,4 @@ bool Silverfish::canSpawn()
MobType Silverfish::getMobType()
{
return ARTHROPOD;
}
}

View file

@ -15,6 +15,7 @@
#include "net.minecraft.world.level.h"
#include "../Minecraft.Client/Textures.h"
#include "Villager.h"
#include "../Minecraft.Client/Windows64Media/strings.h"
unordered_map<int, pair<int,int> > Villager::MIN_MAX_VALUES;
unordered_map<int, pair<int,int> > Villager::MIN_MAX_PRICES;