From 6ff375273bf757da7c464f6b6a2b0d475a76f370 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 12 Jan 2014 14:33:32 +0100 Subject: Added cWorld::SpawnMinecart. --- src/World.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index b61708d03..89a236b62 100644 --- a/src/World.h +++ b/src/World.h @@ -363,6 +363,9 @@ public: /// Spawns an falling block entity at the given position. It returns the UniqueID of the spawned falling block. int SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta); + /// Spawns an minecart at the given coordinates. + int SpawnMinecart(double a_X, double a_Y, double a_Z, int a_MinecartType); + /// Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb. int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward); -- cgit v1.2.3 From c5603ce064d7e4e897aa92d6f43d407802ae3687 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 12 Jan 2014 15:27:50 +0100 Subject: EmptyMinecarts should be able to get a block inside of them. --- src/World.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 89a236b62..23b125e67 100644 --- a/src/World.h +++ b/src/World.h @@ -364,7 +364,7 @@ public: int SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta); /// Spawns an minecart at the given coordinates. - int SpawnMinecart(double a_X, double a_Y, double a_Z, int a_MinecartType); + int SpawnMinecart(double a_X, double a_Y, double a_Z, int a_MinecartType, cItem a_Content = cItem(), int a_BlockHeight = 1); /// Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb. int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward); -- cgit v1.2.3 From f11427e8cd5506204958eec68a8ac2a9152df108 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 12 Jan 2014 18:04:41 +0100 Subject: Renamed cEmptyMinecart to cRideableMinecart --- src/World.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 23b125e67..5457bd799 100644 --- a/src/World.h +++ b/src/World.h @@ -364,7 +364,7 @@ public: int SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta); /// Spawns an minecart at the given coordinates. - int SpawnMinecart(double a_X, double a_Y, double a_Z, int a_MinecartType, cItem a_Content = cItem(), int a_BlockHeight = 1); + int SpawnMinecart(double a_X, double a_Y, double a_Z, int a_MinecartType, const cItem & a_Content = cItem(), int a_BlockHeight = 1); /// Spawns an experience orb at the given location with the given reward. It returns the UniqueID of the spawned experience orb. int SpawnExperienceOrb(double a_X, double a_Y, double a_Z, int a_Reward); -- cgit v1.2.3 From a54cbba0fdf697999e8ac4aff2f5ea436c98edc3 Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 17 Jan 2014 11:01:14 -0800 Subject: Added user setting compression factor --- src/World.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index 1ecf41507..ef74a65c7 100644 --- a/src/World.h +++ b/src/World.h @@ -681,6 +681,8 @@ private: /// Name of the storage schema used to load and save chunks AString m_StorageSchema; + int m_StorageCompressionFactor; + /// The dimension of the world, used by the client to provide correct lighting scheme eDimension m_Dimension; -- cgit v1.2.3 From 9a9b51a5134d8afd8f089d247c59668bd7da695d Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 18 Jan 2014 15:16:47 +0200 Subject: Basic command block implementation --- src/World.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index ef74a65c7..c410e658e 100644 --- a/src/World.h +++ b/src/World.h @@ -46,12 +46,13 @@ class cMobCensus; typedef std::list< cPlayer * > cPlayerList; -typedef cItemCallback cPlayerListCallback; -typedef cItemCallback cEntityCallback; -typedef cItemCallback cChestCallback; -typedef cItemCallback cDispenserCallback; -typedef cItemCallback cFurnaceCallback; -typedef cItemCallback cNoteBlockCallback; +typedef cItemCallback cPlayerListCallback; +typedef cItemCallback cEntityCallback; +typedef cItemCallback cChestCallback; +typedef cItemCallback cDispenserCallback; +typedef cItemCallback cFurnaceCallback; +typedef cItemCallback cNoteBlockCallback; +typedef cItemCallback cCommandBlockCallback; @@ -466,6 +467,9 @@ public: /// Calls the callback for the noteblock at the specified coords; returns false if there's no noteblock at those coords or callback returns true, returns true if found bool DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBlockCallback & a_Callback); // Exported in ManualBindings.cpp + + /// Calls the callback for the command block at the specified coords; returns false if there's no command block at those coords or callback returns true, returns true if found + bool DoWithCommandBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cCommandBlockCallback & a_Callback); // TODO: Export /// Retrieves the test on the sign at the specified coords; returns false if there's no sign at those coords, true if found bool GetSignLines (int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4); // Exported in ManualBindings.cpp -- cgit v1.2.3 From 1ad6469a180dfe6932c756fe3c99bcada3ee0b7e Mon Sep 17 00:00:00 2001 From: andrew Date: Sat, 18 Jan 2014 16:59:33 +0200 Subject: Command blocks: Execute() --- src/World.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/World.h') diff --git a/src/World.h b/src/World.h index c410e658e..1a7ad0cb1 100644 --- a/src/World.h +++ b/src/World.h @@ -469,7 +469,7 @@ public: bool DoWithNoteBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cNoteBlockCallback & a_Callback); // Exported in ManualBindings.cpp /// Calls the callback for the command block at the specified coords; returns false if there's no command block at those coords or callback returns true, returns true if found - bool DoWithCommandBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cCommandBlockCallback & a_Callback); // TODO: Export + bool DoWithCommandBlockAt(int a_BlockX, int a_BlockY, int a_BlockZ, cCommandBlockCallback & a_Callback); // Exported in ManualBindings.cpp /// Retrieves the test on the sign at the specified coords; returns false if there's no sign at those coords, true if found bool GetSignLines (int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4); // Exported in ManualBindings.cpp -- cgit v1.2.3