mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-25 17:14:33 +00:00
chore: format Minecraft.World
This commit is contained in:
@@ -2,63 +2,48 @@
|
||||
#include "../Headers/net.minecraft.world.entity.player.h"
|
||||
#include "ResultContainer.h"
|
||||
|
||||
ResultContainer::ResultContainer() : Container()
|
||||
{
|
||||
items = new ItemInstanceArray(1);
|
||||
ResultContainer::ResultContainer() : Container() {
|
||||
items = new ItemInstanceArray(1);
|
||||
}
|
||||
|
||||
unsigned int ResultContainer::getContainerSize()
|
||||
{
|
||||
return 1;
|
||||
unsigned int ResultContainer::getContainerSize() { return 1; }
|
||||
|
||||
std::shared_ptr<ItemInstance> ResultContainer::getItem(unsigned int slot) {
|
||||
return (*items)[0];
|
||||
}
|
||||
|
||||
std::shared_ptr<ItemInstance> ResultContainer::getItem(unsigned int slot)
|
||||
{
|
||||
return (*items)[0];
|
||||
int ResultContainer::getName() { return 0; }
|
||||
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItem(unsigned int slot,
|
||||
int count) {
|
||||
if ((*items)[0] != NULL) {
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int ResultContainer::getName()
|
||||
{
|
||||
return 0;
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItemNoUpdate(int slot) {
|
||||
if ((*items)[0] != NULL) {
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItem(unsigned int slot, int count)
|
||||
{
|
||||
if ((*items)[0] != NULL)
|
||||
{
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
void ResultContainer::setItem(unsigned int slot,
|
||||
std::shared_ptr<ItemInstance> item) {
|
||||
(*items)[0] = item;
|
||||
}
|
||||
|
||||
std::shared_ptr<ItemInstance> ResultContainer::removeItemNoUpdate(int slot)
|
||||
{
|
||||
if ((*items)[0] != NULL)
|
||||
{
|
||||
std::shared_ptr<ItemInstance> item = (*items)[0];
|
||||
(*items)[0] = nullptr;
|
||||
return item;
|
||||
}
|
||||
return nullptr;
|
||||
int ResultContainer::getMaxStackSize() {
|
||||
return Container::LARGE_MAX_STACK_SIZE;
|
||||
}
|
||||
|
||||
void ResultContainer::setItem(unsigned int slot, std::shared_ptr<ItemInstance> item)
|
||||
{
|
||||
(*items)[0] = item;
|
||||
}
|
||||
void ResultContainer::setChanged() {}
|
||||
|
||||
int ResultContainer::getMaxStackSize()
|
||||
{
|
||||
return Container::LARGE_MAX_STACK_SIZE;
|
||||
}
|
||||
|
||||
void ResultContainer::setChanged()
|
||||
{
|
||||
}
|
||||
|
||||
bool ResultContainer::stillValid(std::shared_ptr<Player> player)
|
||||
{
|
||||
return true;
|
||||
bool ResultContainer::stillValid(std::shared_ptr<Player> player) {
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user