Merge remote-tracking branch 'origin/master' into saplingsandleaves
Conflicts: src/Defines.h
This commit is contained in:
@@ -27,8 +27,8 @@ void cBlockBedHandler::OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInt
|
||||
{
|
||||
NIBBLETYPE OldMeta = a_ChunkInterface.GetBlockMeta(a_BlockX, a_BlockY, a_BlockZ);
|
||||
|
||||
Vector3i ThisPos( a_BlockX, a_BlockY, a_BlockZ );
|
||||
Vector3i Direction = MetaDataToDirection( OldMeta & 0x7 );
|
||||
Vector3i ThisPos( a_BlockX, a_BlockY, a_BlockZ);
|
||||
Vector3i Direction = MetaDataToDirection( OldMeta & 0x7);
|
||||
if (OldMeta & 0x8)
|
||||
{
|
||||
// Was pillow
|
||||
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
|
||||
{
|
||||
switch(a_BlockType)
|
||||
switch (a_BlockType)
|
||||
{
|
||||
// Block handlers, alphabetically sorted:
|
||||
case E_BLOCK_ACACIA_WOOD_STAIRS: return new cBlockStairsHandler (a_BlockType);
|
||||
@@ -254,7 +254,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
|
||||
case E_BLOCK_NEW_LOG: return new cBlockSidewaysHandler (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 ( );
|
||||
case E_BLOCK_PISTON_EXTENSION: return new cBlockPistonHeadHandler;
|
||||
case E_BLOCK_PLANKS: return new cBlockPlanksHandler (a_BlockType);
|
||||
case E_BLOCK_POTATOES: return new cBlockCropsHandler (a_BlockType);
|
||||
case E_BLOCK_POWERED_RAIL: return new cBlockRailHandler (a_BlockType);
|
||||
|
||||
@@ -99,7 +99,7 @@ public:
|
||||
|
||||
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, eBlockFace a_BlockFace)
|
||||
{
|
||||
if ( !cBlockInfo::FullyOccupiesVoxel(a_BlockType) )
|
||||
if (!cBlockInfo::FullyOccupiesVoxel(a_BlockType))
|
||||
{
|
||||
return (a_BlockFace == BLOCK_FACE_TOP); // Allow placement only when torch upright (for glass, etc.); exceptions won't even be sent by client, no need to handle
|
||||
}
|
||||
@@ -119,7 +119,8 @@ public:
|
||||
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, Face, true);
|
||||
BLOCKTYPE BlockInQuestion = a_ChunkInterface.GetBlock(a_BlockX, a_BlockY, a_BlockZ);
|
||||
|
||||
if ( // If on a block that can only hold a torch if torch is standing on it, return that face
|
||||
// If on a block that can only hold a torch if torch is standing on it, return that face
|
||||
if (
|
||||
((BlockInQuestion == E_BLOCK_GLASS) ||
|
||||
(BlockInQuestion == E_BLOCK_FENCE) ||
|
||||
(BlockInQuestion == E_BLOCK_NETHER_BRICK_FENCE) ||
|
||||
@@ -167,7 +168,7 @@ public:
|
||||
// No need to check for upright orientation, it was done when the torch was placed
|
||||
return true;
|
||||
}
|
||||
else if ( !cBlockInfo::FullyOccupiesVoxel(BlockInQuestion) )
|
||||
else if (!cBlockInfo::FullyOccupiesVoxel(BlockInQuestion))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
static char MetaDataToDirection(NIBBLETYPE a_MetaData)
|
||||
{
|
||||
switch(a_MetaData)
|
||||
switch (a_MetaData)
|
||||
{
|
||||
case 0x1: return BLOCK_FACE_NORTH;
|
||||
case 0x4: return BLOCK_FACE_SOUTH;
|
||||
|
||||
@@ -6,7 +6,7 @@ class cBroadcastInterface
|
||||
public:
|
||||
virtual ~cBroadcastInterface() {}
|
||||
|
||||
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ ) = 0;
|
||||
virtual void BroadcastUseBed (const cEntity & a_Entity, int a_BlockX, int a_BlockY, int a_BlockZ) = 0;
|
||||
virtual void BroadcastSoundEffect(const AString & a_SoundName, double a_X, double a_Y, double a_Z, float a_Volume, float a_Pitch, const cClientHandle * a_Exclude = NULL) = 0;
|
||||
virtual void BroadcastEntityAnimation(const cEntity & a_Entity, char a_Animation, const cClientHandle * a_Exclude = NULL) = 0;
|
||||
};
|
||||
|
||||
@@ -61,9 +61,9 @@ public:
|
||||
m_ChunkMap->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
|
||||
}
|
||||
|
||||
void FastSetBlock(const Vector3i & a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta )
|
||||
void FastSetBlock(const Vector3i & a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
|
||||
{
|
||||
FastSetBlock( a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta );
|
||||
FastSetBlock( a_Pos.x, a_Pos.y, a_Pos.z, a_BlockType, a_BlockMeta);
|
||||
}
|
||||
|
||||
void UseBlockEntity(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ)
|
||||
|
||||
Reference in New Issue
Block a user