summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/BlockEntity.h5
-rw-r--r--src/BlockEntities/BlockEntityWithItems.h1
-rw-r--r--src/BlockEntities/ChestEntity.cpp1
-rw-r--r--src/BlockEntities/ChestEntity.h2
-rw-r--r--src/BlockEntities/CommandBlockEntity.cpp6
-rw-r--r--src/BlockEntities/CommandBlockEntity.h7
-rw-r--r--src/BlockEntities/DispenserEntity.cpp5
-rw-r--r--src/BlockEntities/DropSpenserEntity.cpp1
-rw-r--r--src/BlockEntities/DropSpenserEntity.h1
-rw-r--r--src/BlockEntities/DropperEntity.cpp2
-rw-r--r--src/BlockEntities/EnderChestEntity.cpp1
-rw-r--r--src/BlockEntities/EnderChestEntity.h1
-rw-r--r--src/BlockEntities/FlowerPotEntity.cpp1
-rw-r--r--src/BlockEntities/FlowerPotEntity.h2
-rw-r--r--src/BlockEntities/FurnaceEntity.cpp2
-rw-r--r--src/BlockEntities/FurnaceEntity.h1
-rw-r--r--src/BlockEntities/HopperEntity.cpp3
-rw-r--r--src/BlockEntities/JukeboxEntity.cpp4
-rw-r--r--src/BlockEntities/JukeboxEntity.h1
-rw-r--r--src/BlockEntities/MobHeadEntity.cpp1
-rw-r--r--src/BlockEntities/MobHeadEntity.h2
-rw-r--r--src/BlockEntities/NoteEntity.cpp2
-rw-r--r--src/BlockEntities/SignEntity.cpp4
23 files changed, 17 insertions, 39 deletions
diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h
index 5710f8543..066bbc696 100644
--- a/src/BlockEntities/BlockEntity.h
+++ b/src/BlockEntities/BlockEntity.h
@@ -1,8 +1,6 @@
#pragma once
-#include "../ClientHandle.h"
-#include "../World.h"
@@ -13,8 +11,9 @@ namespace Json
class Value;
};
+class cChunk;
class cPlayer;
-class cPacket;
+class cWorld;
diff --git a/src/BlockEntities/BlockEntityWithItems.h b/src/BlockEntities/BlockEntityWithItems.h
index 5f1639d45..e511ee8cb 100644
--- a/src/BlockEntities/BlockEntityWithItems.h
+++ b/src/BlockEntities/BlockEntityWithItems.h
@@ -12,6 +12,7 @@
#include "BlockEntity.h"
#include "../ItemGrid.h"
#include "../UI/WindowOwner.h"
+#include "World.h"
diff --git a/src/BlockEntities/ChestEntity.cpp b/src/BlockEntities/ChestEntity.cpp
index 21e1f6ba2..5447c7c49 100644
--- a/src/BlockEntities/ChestEntity.cpp
+++ b/src/BlockEntities/ChestEntity.cpp
@@ -5,7 +5,6 @@
#include "../Item.h"
#include "../Entities/Player.h"
#include "../UI/Window.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/ChestEntity.h b/src/BlockEntities/ChestEntity.h
index cd06b3e2c..fa36e08be 100644
--- a/src/BlockEntities/ChestEntity.h
+++ b/src/BlockEntities/ChestEntity.h
@@ -13,8 +13,6 @@ namespace Json
};
class cClientHandle;
-class cServer;
-class cNBTData;
diff --git a/src/BlockEntities/CommandBlockEntity.cpp b/src/BlockEntities/CommandBlockEntity.cpp
index 20702a9ac..318874a9b 100644
--- a/src/BlockEntities/CommandBlockEntity.cpp
+++ b/src/BlockEntities/CommandBlockEntity.cpp
@@ -4,16 +4,14 @@
// Implements the cCommandBlockEntity class representing a single command block in the world
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-#include "json/json.h"
#include "CommandBlockEntity.h"
-#include "../Entities/Player.h"
-#include "../WorldStorage/FastNBT.h"
#include "../CommandOutput.h"
#include "../Root.h"
#include "../Server.h" // ExecuteConsoleCommand()
-#include "../Chunk.h"
#include "../ChatColor.h"
+#include "../World.h"
+#include "../ClientHandle.h"
diff --git a/src/BlockEntities/CommandBlockEntity.h b/src/BlockEntities/CommandBlockEntity.h
index d02bf7d7b..22cd44322 100644
--- a/src/BlockEntities/CommandBlockEntity.h
+++ b/src/BlockEntities/CommandBlockEntity.h
@@ -10,7 +10,7 @@
#pragma once
#include "BlockEntity.h"
-
+#include "RedstonePoweredEntity.h"
@@ -27,7 +27,8 @@ namespace Json
// tolua_begin
class cCommandBlockEntity :
- public cBlockEntity
+ public cBlockEntity,
+ public cRedstonePoweredEntity
{
typedef cBlockEntity super;
@@ -52,7 +53,7 @@ public:
// tolua_begin
/// Sets the internal redstone power flag to "on" or "off", depending on the parameter. Calls Activate() if appropriate
- void SetRedstonePower(bool a_IsPowered);
+ virtual void SetRedstonePower(bool a_IsPowered) override;
/// Sets the command block to execute a command in the next tick
void Activate(void);
diff --git a/src/BlockEntities/DispenserEntity.cpp b/src/BlockEntities/DispenserEntity.cpp
index f8830bf25..4794375cf 100644
--- a/src/BlockEntities/DispenserEntity.cpp
+++ b/src/BlockEntities/DispenserEntity.cpp
@@ -2,13 +2,10 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "DispenserEntity.h"
-#include "../Entities/Player.h"
#include "../Simulator/FluidSimulator.h"
#include "../Chunk.h"
#include "../World.h"
-#include "../Entities/ArrowEntity.h"
-#include "../Entities/FireChargeEntity.h"
#include "../Entities/ProjectileEntity.h"
@@ -109,7 +106,7 @@ void cDispenserEntity::DropSpenseFromSlot(cChunk & a_Chunk, int a_SlotNum)
{
double MobX = 0.5 + (DispX + DispChunk->GetPosX() * cChunkDef::Width);
double MobZ = 0.5 + (DispZ + DispChunk->GetPosZ() * cChunkDef::Width);
- if (m_World->SpawnMob(MobX, DispY, MobZ, (cMonster::eType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0)
+ if (m_World->SpawnMob(MobX, DispY, MobZ, (eMonsterType)m_Contents.GetSlot(a_SlotNum).m_ItemDamage) >= 0)
{
m_Contents.ChangeSlotCount(a_SlotNum, -1);
}
diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp
index dc38e3e9b..260c71641 100644
--- a/src/BlockEntities/DropSpenserEntity.cpp
+++ b/src/BlockEntities/DropSpenserEntity.cpp
@@ -8,7 +8,6 @@
#include "DropSpenserEntity.h"
#include "../Entities/Player.h"
#include "../Chunk.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/DropSpenserEntity.h b/src/BlockEntities/DropSpenserEntity.h
index be56447aa..c70cd0531 100644
--- a/src/BlockEntities/DropSpenserEntity.h
+++ b/src/BlockEntities/DropSpenserEntity.h
@@ -22,7 +22,6 @@ namespace Json
}
class cClientHandle;
-class cServer;
diff --git a/src/BlockEntities/DropperEntity.cpp b/src/BlockEntities/DropperEntity.cpp
index 5d4a8ad97..5cbf6d56e 100644
--- a/src/BlockEntities/DropperEntity.cpp
+++ b/src/BlockEntities/DropperEntity.cpp
@@ -5,8 +5,6 @@
#include "Globals.h"
#include "DropperEntity.h"
-#include "../Entities/Player.h"
-#include "../Simulator/FluidSimulator.h"
diff --git a/src/BlockEntities/EnderChestEntity.cpp b/src/BlockEntities/EnderChestEntity.cpp
index 17816d63e..b870f9e50 100644
--- a/src/BlockEntities/EnderChestEntity.cpp
+++ b/src/BlockEntities/EnderChestEntity.cpp
@@ -5,7 +5,6 @@
#include "../Item.h"
#include "../Entities/Player.h"
#include "../UI/Window.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/EnderChestEntity.h b/src/BlockEntities/EnderChestEntity.h
index ed178f6fc..311af8d76 100644
--- a/src/BlockEntities/EnderChestEntity.h
+++ b/src/BlockEntities/EnderChestEntity.h
@@ -3,7 +3,6 @@
#include "BlockEntity.h"
#include "UI/WindowOwner.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/FlowerPotEntity.cpp b/src/BlockEntities/FlowerPotEntity.cpp
index e001634b8..d2bc59d34 100644
--- a/src/BlockEntities/FlowerPotEntity.cpp
+++ b/src/BlockEntities/FlowerPotEntity.cpp
@@ -4,7 +4,6 @@
// Implements the cFlowerPotEntity class representing a single flower pot in the world
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-#include "json/json.h"
#include "FlowerPotEntity.h"
#include "../Entities/Player.h"
#include "../Item.h"
diff --git a/src/BlockEntities/FlowerPotEntity.h b/src/BlockEntities/FlowerPotEntity.h
index 89901cf2d..b86f9c840 100644
--- a/src/BlockEntities/FlowerPotEntity.h
+++ b/src/BlockEntities/FlowerPotEntity.h
@@ -9,8 +9,8 @@
#pragma once
#include "BlockEntity.h"
+#include "Item.h"
-class cItem;
diff --git a/src/BlockEntities/FurnaceEntity.cpp b/src/BlockEntities/FurnaceEntity.cpp
index 72fd7f2b3..d7b2fd910 100644
--- a/src/BlockEntities/FurnaceEntity.cpp
+++ b/src/BlockEntities/FurnaceEntity.cpp
@@ -5,8 +5,6 @@
#include "../UI/Window.h"
#include "../Entities/Player.h"
#include "../Root.h"
-#include "../Chunk.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/FurnaceEntity.h b/src/BlockEntities/FurnaceEntity.h
index cf1a755e0..7ac25cf52 100644
--- a/src/BlockEntities/FurnaceEntity.h
+++ b/src/BlockEntities/FurnaceEntity.h
@@ -14,7 +14,6 @@ namespace Json
}
class cClientHandle;
-class cServer;
diff --git a/src/BlockEntities/HopperEntity.cpp b/src/BlockEntities/HopperEntity.cpp
index 88e7b8e1b..444378c92 100644
--- a/src/BlockEntities/HopperEntity.cpp
+++ b/src/BlockEntities/HopperEntity.cpp
@@ -10,10 +10,7 @@
#include "../Entities/Pickup.h"
#include "../Bindings/PluginManager.h"
#include "ChestEntity.h"
-#include "DropSpenserEntity.h"
#include "FurnaceEntity.h"
-#include "../BoundingBox.h"
-#include "json/json.h"
diff --git a/src/BlockEntities/JukeboxEntity.cpp b/src/BlockEntities/JukeboxEntity.cpp
index c96253b11..1131b99b0 100644
--- a/src/BlockEntities/JukeboxEntity.cpp
+++ b/src/BlockEntities/JukeboxEntity.cpp
@@ -3,8 +3,8 @@
#include "JukeboxEntity.h"
#include "../World.h"
-#include "json/json.h"
-
+#include "json/value.h"
+#include "Entities/Player.h"
diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h
index d677d340f..a6fdf3c7e 100644
--- a/src/BlockEntities/JukeboxEntity.h
+++ b/src/BlockEntities/JukeboxEntity.h
@@ -2,7 +2,6 @@
#pragma once
#include "BlockEntity.h"
-#include "../Entities/Player.h"
diff --git a/src/BlockEntities/MobHeadEntity.cpp b/src/BlockEntities/MobHeadEntity.cpp
index ce895eb6f..9a1a40abe 100644
--- a/src/BlockEntities/MobHeadEntity.cpp
+++ b/src/BlockEntities/MobHeadEntity.cpp
@@ -4,7 +4,6 @@
// Implements the cMobHeadEntity class representing a single skull/head in the world
#include "Globals.h"
-#include "json/json.h"
#include "MobHeadEntity.h"
#include "../Entities/Player.h"
diff --git a/src/BlockEntities/MobHeadEntity.h b/src/BlockEntities/MobHeadEntity.h
index f91a3cc9e..45fa0d951 100644
--- a/src/BlockEntities/MobHeadEntity.h
+++ b/src/BlockEntities/MobHeadEntity.h
@@ -9,7 +9,7 @@
#pragma once
#include "BlockEntity.h"
-
+#include "Defines.h"
diff --git a/src/BlockEntities/NoteEntity.cpp b/src/BlockEntities/NoteEntity.cpp
index 95145c117..ecbedbcb1 100644
--- a/src/BlockEntities/NoteEntity.cpp
+++ b/src/BlockEntities/NoteEntity.cpp
@@ -3,7 +3,7 @@
#include "NoteEntity.h"
#include "../World.h"
-#include "json/json.h"
+#include "json/value.h"
diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp
index 23d9ef926..423d254d2 100644
--- a/src/BlockEntities/SignEntity.cpp
+++ b/src/BlockEntities/SignEntity.cpp
@@ -4,9 +4,9 @@
// Implements the cSignEntity class representing a single sign in the world
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-#include "json/json.h"
+#include "json/value.h"
#include "SignEntity.h"
-#include "../Entities/Player.h"
+#include "../ClientHandle.h"