Fixed dust from being placed on nonsolids
This commit is contained in:
parent
b083979cb2
commit
53ff372624
@ -20,7 +20,7 @@ public:
|
|||||||
|
|
||||||
virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||||
{
|
{
|
||||||
return ((a_RelY > 0) && g_BlockIsSolid[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)]);
|
return ((a_RelY > 0) && g_BlockIsTorchPlaceable[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,6 +27,11 @@ public:
|
|||||||
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
||||||
) override
|
) override
|
||||||
{
|
{
|
||||||
|
if (!g_BlockIsTorchPlaceable[a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ)]) // Some solid blocks, such as cocoa beans, are not suitable for dust
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
a_BlockType = E_BLOCK_REDSTONE_WIRE;
|
a_BlockType = E_BLOCK_REDSTONE_WIRE;
|
||||||
a_BlockMeta = 0;
|
a_BlockMeta = 0;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user