From cf3b4ec226034b006fd646b395f4e8a609f6f378 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 1 Feb 2014 06:01:13 -0800 Subject: Changed Signiture of OnDestroyedByPlayer --- src/Blocks/BlockHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 374c64fd8..d5ca9dcc1 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -5,6 +5,7 @@ #include "../World.h" #include "../Root.h" #include "../Bindings/PluginManager.h" +#include "../Chunk.h" #include "BlockBed.h" #include "BlockBrewingStand.h" #include "BlockButton.h" @@ -276,7 +277,7 @@ void cBlockHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWorldI -void cBlockHandler::OnDestroyedByPlayer(cWorld *a_World, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) +void cBlockHandler::OnDestroyedByPlayer(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) { } -- cgit v1.2.3 From 6e39ed3868fa8feba676b0cda28194c249e549ce Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 1 Feb 2014 08:35:48 -0800 Subject: Changed Signiture of OnDigging --- src/Blocks/BlockHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index d5ca9dcc1..8ce8ec1f7 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -335,7 +335,7 @@ void cBlockHandler::OnNeighborChanged(cChunkInterface & a_ChunkInterface, int a_ -void cBlockHandler::OnDigging(cWorld *a_World, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) +void cBlockHandler::OnDigging(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer *a_Player, int a_BlockX, int a_BlockY, int a_BlockZ) { } -- cgit v1.2.3 From b82fc394dd2a40e12e3c13709fea26c2435792c9 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sun, 2 Feb 2014 06:49:37 -0800 Subject: Changed Signiture of OnUpdate --- src/Blocks/BlockHandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 8ce8ec1f7..3f69ba1c1 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -261,7 +261,7 @@ bool cBlockHandler::GetPlacementBlockTypeMeta( -void cBlockHandler::OnUpdate(cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ) +void cBlockHandler::OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_PluginInterface, cChunk & a_Chunk, int a_BlockX, int a_BlockY, int a_BlockZ) { } @@ -361,14 +361,14 @@ void cBlockHandler::ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) -void cBlockHandler::DropBlock(cWorld * a_World, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ) +void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ) { cItems Pickups; - NIBBLETYPE Meta = a_World->GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); + NIBBLETYPE Meta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ); ConvertToPickups(Pickups, Meta); // Allow plugins to modify the pickups: - cRoot::Get()->GetPluginManager()->CallHookBlockToPickups(a_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, m_BlockType, Meta, Pickups); + a_BlockPluginInterface.CallHookBlockToPickups(a_Digger, a_BlockX, a_BlockY, a_BlockZ, m_BlockType, Meta, Pickups); if (!Pickups.empty()) { @@ -384,7 +384,7 @@ void cBlockHandler::DropBlock(cWorld * a_World, cEntity * a_Digger, int a_BlockX MicroX += r1.rand(1) - 0.5; MicroZ += r1.rand(1) - 0.5; - a_World->SpawnItemPickups(Pickups, MicroX, MicroY, MicroZ); + a_WorldInterface.SpawnItemPickups(Pickups, MicroX, MicroY, MicroZ); } } @@ -446,7 +446,7 @@ bool cBlockHandler::DoesDropOnUnsuitable(void) -void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) +void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk) { if (!CanBeAt(a_ChunkInterface, a_RelX, a_RelY, a_RelZ, a_Chunk)) { @@ -454,7 +454,7 @@ void cBlockHandler::Check(cChunkInterface & a_ChunkInterface, int a_RelX, int a_ { int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; - DropBlock(a_Chunk.GetWorld(), NULL, BlockX, a_RelY, BlockZ); + DropBlock(a_ChunkInterface, *a_Chunk.GetWorld(), a_PluginInterface, NULL, BlockX, a_RelY, BlockZ); } a_Chunk.SetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_AIR, 0); -- cgit v1.2.3 From c3d4cc4f4f0dab5886e5bf5e0d127f4933cd55cb Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 2 Feb 2014 17:52:05 +0100 Subject: Fixed dark oak and acacia placement. Fixes #621. --- src/Blocks/BlockHandler.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Blocks/BlockHandler.cpp') diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp index 3f69ba1c1..c16f255b8 100644 --- a/src/Blocks/BlockHandler.cpp +++ b/src/Blocks/BlockHandler.cpp @@ -165,6 +165,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType) case E_BLOCK_NETHER_BRICK_STAIRS: return new cBlockStairsHandler (a_BlockType); case E_BLOCK_NETHER_PORTAL: return new cBlockPortalHandler (a_BlockType); case E_BLOCK_NETHER_WART: return new cBlockNetherWartHandler (a_BlockType); + case E_BLOCK_NEW_LOG: return new cBlockWoodHandler (a_BlockType); case E_BLOCK_NOTE_BLOCK: return new cBlockNoteHandler (a_BlockType); case E_BLOCK_PISTON: return new cBlockPistonHandler (a_BlockType); case E_BLOCK_PISTON_EXTENSION: return new cBlockPistonHeadHandler ( ); -- cgit v1.2.3