mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Separate out the item class headers from the main Item header.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "Item.hpp"
|
||||
#include "CameraItem.hpp"
|
||||
#include "world/level/Level.hpp"
|
||||
#include "world/entity/TripodCamera.hpp"
|
||||
#include "world/entity/Player.hpp"
|
||||
|
||||
18
source/world/item/CameraItem.hpp
Normal file
18
source/world/item/CameraItem.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "Item.hpp"
|
||||
|
||||
class CameraItem : public Item
|
||||
{
|
||||
public:
|
||||
CameraItem(int id);
|
||||
|
||||
ItemInstance* use(ItemInstance* inst, Level* level, Player* player) override;
|
||||
};
|
||||
@@ -6,7 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "Item.hpp"
|
||||
#include "DoorItem.hpp"
|
||||
#include "world/level/Level.hpp"
|
||||
#include "world/entity/Player.hpp"
|
||||
#include "world/tile/Tile.hpp"
|
||||
|
||||
21
source/world/item/DoorItem.hpp
Normal file
21
source/world/item/DoorItem.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "Item.hpp"
|
||||
|
||||
class DoorItem : public Item
|
||||
{
|
||||
public:
|
||||
DoorItem(int id, Material* pMtl);
|
||||
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
Material* m_pMaterial;
|
||||
};
|
||||
@@ -8,6 +8,11 @@
|
||||
|
||||
#include "Item.hpp"
|
||||
|
||||
#include "CameraItem.hpp"
|
||||
#include "DoorItem.hpp"
|
||||
#include "TileItem.hpp"
|
||||
#include "TilePlanterItem.hpp"
|
||||
|
||||
#define ITEM(x) ((x) - 256)
|
||||
|
||||
#define NEW_ITEM(id) (new Item(ITEM(id)))
|
||||
|
||||
@@ -200,46 +200,3 @@ public: // Static declarations
|
||||
*record_02,
|
||||
*camera;
|
||||
};
|
||||
|
||||
class TileItem : public Item
|
||||
{
|
||||
public:
|
||||
TileItem(int id);
|
||||
|
||||
virtual std::string getDescriptionId();
|
||||
virtual std::string getDescriptionId(ItemInstance*);
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
int m_tile;
|
||||
};
|
||||
|
||||
class TilePlanterItem : public Item
|
||||
{
|
||||
public:
|
||||
TilePlanterItem(int id, int place);
|
||||
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
int m_tile;
|
||||
};
|
||||
|
||||
class DoorItem : public Item
|
||||
{
|
||||
public:
|
||||
DoorItem(int id, Material *pMtl);
|
||||
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
Material* m_pMaterial;
|
||||
};
|
||||
|
||||
class CameraItem : public Item
|
||||
{
|
||||
public:
|
||||
CameraItem(int id);
|
||||
|
||||
ItemInstance* use(ItemInstance* inst, Level* level, Player* player) override;
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "Item.hpp"
|
||||
#include "TileItem.hpp"
|
||||
#include "world/level/Level.hpp"
|
||||
#include "world/tile/Tile.hpp"
|
||||
|
||||
|
||||
23
source/world/item/TileItem.hpp
Normal file
23
source/world/item/TileItem.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "Item.hpp"
|
||||
|
||||
class TileItem : public Item
|
||||
{
|
||||
public:
|
||||
TileItem(int id);
|
||||
|
||||
virtual std::string getDescriptionId();
|
||||
virtual std::string getDescriptionId(ItemInstance*);
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
int m_tile;
|
||||
};
|
||||
@@ -6,7 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "Item.hpp"
|
||||
#include "TilePlanterItem.hpp"
|
||||
#include "world/level/Level.hpp"
|
||||
#include "world/tile/Tile.hpp"
|
||||
|
||||
|
||||
21
source/world/item/TilePlanterItem.hpp
Normal file
21
source/world/item/TilePlanterItem.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "Item.hpp"
|
||||
|
||||
class TilePlanterItem : public Item
|
||||
{
|
||||
public:
|
||||
TilePlanterItem(int id, int place);
|
||||
|
||||
virtual bool useOn(ItemInstance*, Player*, Level*, int, int, int, int);
|
||||
|
||||
public:
|
||||
int m_tile;
|
||||
};
|
||||
@@ -7,7 +7,7 @@
|
||||
********************************************************************/
|
||||
|
||||
#include "world/level/Level.hpp"
|
||||
#include "world/item/Item.hpp"
|
||||
#include "world/item/TileItem.hpp"
|
||||
#include "world/entity/ItemEntity.hpp"
|
||||
|
||||
// Include tile definitions here
|
||||
|
||||
@@ -139,9 +139,13 @@
|
||||
<ClInclude Include="..\source\world\gamemode\CreativeMode.hpp" />
|
||||
<ClInclude Include="..\source\world\gamemode\GameMode.hpp" />
|
||||
<ClInclude Include="..\source\world\gamemode\SurvivalMode.hpp" />
|
||||
<ClInclude Include="..\source\world\item\CameraItem.hpp" />
|
||||
<ClInclude Include="..\source\world\item\DoorItem.hpp" />
|
||||
<ClInclude Include="..\source\world\item\Inventory.hpp" />
|
||||
<ClInclude Include="..\source\world\item\Item.hpp" />
|
||||
<ClInclude Include="..\source\world\item\ItemInstance.hpp" />
|
||||
<ClInclude Include="..\source\world\item\TileItem.hpp" />
|
||||
<ClInclude Include="..\source\world\item\TilePlanterItem.hpp" />
|
||||
<ClInclude Include="..\source\world\level\Dimension.hpp" />
|
||||
<ClInclude Include="..\source\world\level\Explosion.hpp" />
|
||||
<ClInclude Include="..\source\world\level\Level.hpp" />
|
||||
|
||||
@@ -1146,6 +1146,18 @@
|
||||
<ClInclude Include="..\thirdparty\zlib\gzguts.h">
|
||||
<Filter>thirdparty\zlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\source\world\item\CameraItem.hpp">
|
||||
<Filter>source\world\item</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\source\world\item\DoorItem.hpp">
|
||||
<Filter>source\world\item</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\source\world\item\TileItem.hpp">
|
||||
<Filter>source\world\item</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\source\world\item\TilePlanterItem.hpp">
|
||||
<Filter>source\world\item</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\thirdparty\raknet\TwoWayAuthentication.cpp">
|
||||
|
||||
Reference in New Issue
Block a user