mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-12-02 22:18:09 +01:00
linux (compat): Add linux to most Win64 guards
This commit is contained in:
1 parent
8cf5675892
commit
9626065598
180 files changed
+941
-935
No files matched your search
@@ -4,7 +4,7 @@
|
||||
#include "net.minecraft.world.level.redstone.h"
|
||||
#include "Slot.h"
|
||||
#include "AbstractContainerMenu.h"
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "Mth.h"
|
||||
#include "../Minecraft.Server/FourKitBridge.h"
|
||||
#endif
|
||||
@@ -252,7 +252,7 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
||||
{
|
||||
if (buttonNum == 0)
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
{
|
||||
auto carried = inventory->getCarried();
|
||||
bool dropAllowed = true;
|
||||
@@ -278,14 +278,14 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
||||
#endif
|
||||
player->drop(inventory->getCarried());
|
||||
inventory->setCarried(nullptr);
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (buttonNum == 1)
|
||||
{
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
{
|
||||
auto carried = inventory->getCarried();
|
||||
bool dropAllowed = true;
|
||||
@@ -312,7 +312,7 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
||||
#endif
|
||||
player->drop(inventory->getCarried()->remove(1));
|
||||
if (inventory->getCarried()->count == 0) inventory->setCarried(nullptr);
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -538,7 +538,7 @@ shared_ptr<ItemInstance> AbstractContainerMenu::clicked(int slotIndex, int butto
|
||||
if (slot != nullptr && slot->hasItem() && slot->mayPickup(player))
|
||||
{
|
||||
int dropCount = buttonNum == 0 ? 1 : slot->getItem()->count;
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#if (defined(_WINDOWS64) || defined(__linux__)) && defined(MINECRAFT_SERVER_BUILD)
|
||||
// fix for issue reported by aiden
|
||||
{
|
||||
auto slotItem = slot->getItem();
|
||||
|
||||
Reference in new issue
Block a user