summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockID.cpp126
-rw-r--r--src/BlockID.h2
-rw-r--r--src/Blocks/BlockRedstone.h2
-rw-r--r--src/Blocks/BlockTorch.h6
-rw-r--r--src/Defines.h4
-rw-r--r--src/Items/ItemRedstoneDust.h2
6 files changed, 71 insertions, 71 deletions
diff --git a/src/BlockID.cpp b/src/BlockID.cpp
index 05d4c6595..db7551a9a 100644
--- a/src/BlockID.cpp
+++ b/src/BlockID.cpp
@@ -20,7 +20,7 @@ bool g_BlockPistonBreakable[256];
bool g_BlockIsSnowable[256];
bool g_BlockRequiresSpecialTool[256];
bool g_BlockIsSolid[256];
-bool g_BlockIsTorchPlaceable[256];
+bool g_BlockFullyOccupiesVoxel[256];
@@ -591,7 +591,7 @@ public:
memset(g_BlockTransparent, 0x00, sizeof(g_BlockTransparent));
memset(g_BlockOneHitDig, 0x00, sizeof(g_BlockOneHitDig));
memset(g_BlockPistonBreakable, 0x00, sizeof(g_BlockPistonBreakable));
- memset(g_BlockIsTorchPlaceable, 0x00, sizeof(g_BlockIsTorchPlaceable));
+ memset(g_BlockFullyOccupiesVoxel, 0x00, sizeof(g_BlockFullyOccupiesVoxel));
// Setting bools to true must be done manually, see http://forum.mc-server.org/showthread.php?tid=629&pid=5415#pid5415
for (size_t i = 0; i < ARRAYCOUNT(g_BlockIsSnowable); i++)
@@ -891,67 +891,67 @@ public:
g_BlockIsSolid[E_BLOCK_WOODEN_SLAB] = false;
// Torch placeable blocks:
- g_BlockIsTorchPlaceable[E_BLOCK_BEDROCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_BLOCK_OF_COAL] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_BLOCK_OF_REDSTONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_BOOKCASE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_BRICK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_CLAY] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_COAL_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_COBBLESTONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_COMMAND_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_CRAFTING_TABLE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DIAMOND_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DIAMOND_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DIRT] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DISPENSER] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DOUBLE_STONE_SLAB] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DOUBLE_WOODEN_SLAB] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_DROPPER] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_EMERALD_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_EMERALD_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_END_STONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_FURNACE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_GLOWSTONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_GOLD_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_GOLD_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_GRASS] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_GRAVEL] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_HARDENED_CLAY] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_HAY_BALE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_HUGE_BROWN_MUSHROOM] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_HUGE_RED_MUSHROOM] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_IRON_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_IRON_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_JACK_O_LANTERN] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_JUKEBOX] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_LAPIS_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_LAPIS_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_LOG] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_MELON] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_MOSSY_COBBLESTONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_MYCELIUM] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_NETHERRACK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_NETHER_BRICK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_NETHER_QUARTZ_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_NOTE_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_OBSIDIAN] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_PACKED_ICE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_PLANKS] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_PUMPKIN] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_QUARTZ_BLOCK] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_REDSTONE_LAMP_OFF] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_REDSTONE_LAMP_ON] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_REDSTONE_ORE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_REDSTONE_ORE_GLOWING] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_SANDSTONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_SAND] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_SILVERFISH_EGG] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_SPONGE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_STAINED_CLAY] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_WOOL] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_STONE] = true;
- g_BlockIsTorchPlaceable[E_BLOCK_STONE_BRICKS] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_BEDROCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_BLOCK_OF_COAL] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_BLOCK_OF_REDSTONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_BOOKCASE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_BRICK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_CLAY] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_COAL_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_COBBLESTONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_COMMAND_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_CRAFTING_TABLE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DIAMOND_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DIAMOND_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DIRT] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DISPENSER] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DOUBLE_STONE_SLAB] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DOUBLE_WOODEN_SLAB] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_DROPPER] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_EMERALD_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_EMERALD_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_END_STONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_FURNACE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_GLOWSTONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_GOLD_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_GOLD_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_GRASS] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_GRAVEL] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_HARDENED_CLAY] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_HAY_BALE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_HUGE_BROWN_MUSHROOM] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_HUGE_RED_MUSHROOM] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_IRON_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_IRON_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_JACK_O_LANTERN] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_JUKEBOX] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_LAPIS_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_LAPIS_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_LOG] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_MELON] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_MOSSY_COBBLESTONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_MYCELIUM] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_NETHERRACK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_NETHER_BRICK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_NETHER_QUARTZ_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_NOTE_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_OBSIDIAN] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_PACKED_ICE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_PLANKS] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_PUMPKIN] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_QUARTZ_BLOCK] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_REDSTONE_LAMP_OFF] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_REDSTONE_LAMP_ON] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_REDSTONE_ORE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_REDSTONE_ORE_GLOWING] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_SANDSTONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_SAND] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_SILVERFISH_EGG] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_SPONGE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_STAINED_CLAY] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_WOOL] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_STONE] = true;
+ g_BlockFullyOccupiesVoxel[E_BLOCK_STONE_BRICKS] = true;
}
} BlockPropertiesInitializer;
diff --git a/src/BlockID.h b/src/BlockID.h
index 288719ccf..a6f0e2675 100644
--- a/src/BlockID.h
+++ b/src/BlockID.h
@@ -909,7 +909,7 @@ extern bool g_BlockPistonBreakable[256];
extern bool g_BlockIsSnowable[256];
extern bool g_BlockRequiresSpecialTool[256];
extern bool g_BlockIsSolid[256];
-extern bool g_BlockIsTorchPlaceable[256];
+extern bool g_BlockFullyOccupiesVoxel[256];
diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h
index 1bd9995f2..5ffb77fb6 100644
--- a/src/Blocks/BlockRedstone.h
+++ b/src/Blocks/BlockRedstone.h
@@ -20,7 +20,7 @@ public:
virtual bool CanBeAt(int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
{
- return ((a_RelY > 0) && g_BlockIsTorchPlaceable[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)]);
+ return ((a_RelY > 0) && g_BlockFullyOccupiesVoxel[a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)]);
}
diff --git a/src/Blocks/BlockTorch.h b/src/Blocks/BlockTorch.h
index 9e543dfd7..faba9c4f5 100644
--- a/src/Blocks/BlockTorch.h
+++ b/src/Blocks/BlockTorch.h
@@ -98,7 +98,7 @@ public:
static bool CanBePlacedOn(BLOCKTYPE a_BlockType, char a_BlockFace)
{
- if ( !g_BlockIsTorchPlaceable[a_BlockType] )
+ if ( !g_BlockFullyOccupiesVoxel[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
}
@@ -127,7 +127,7 @@ public:
{
return i;
}
- else if ((g_BlockIsTorchPlaceable[BlockInQuestion]) && (i != BLOCK_FACE_BOTTOM))
+ else if ((g_BlockFullyOccupiesVoxel[BlockInQuestion]) && (i != BLOCK_FACE_BOTTOM))
{
// Otherwise, if block in that direction is torch placeable and we haven't gotten to it via the bottom face, return that face
return i;
@@ -161,7 +161,7 @@ public:
// No need to check for upright orientation, it was done when the torch was placed
return true;
}
- else if ( !g_BlockIsTorchPlaceable[BlockInQuestion] )
+ else if ( !g_BlockFullyOccupiesVoxel[BlockInQuestion] )
{
return false;
}
diff --git a/src/Defines.h b/src/Defines.h
index 534802d55..9bbe1055d 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -41,8 +41,8 @@ extern bool g_BlockRequiresSpecialTool[256];
/// Is this block solid (player cannot walk through)?
extern bool g_BlockIsSolid[256];
-/// Can torches be placed on this block?
-extern bool g_BlockIsTorchPlaceable[256];
+/// Does this block fully occupy it's voxel - is it a 'full' block?
+extern bool g_BlockFullyOccupiesVoxel[256];
/// Experience Orb setup
enum
diff --git a/src/Items/ItemRedstoneDust.h b/src/Items/ItemRedstoneDust.h
index 38bf00ba6..de90c8075 100644
--- a/src/Items/ItemRedstoneDust.h
+++ b/src/Items/ItemRedstoneDust.h
@@ -27,7 +27,7 @@ public:
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
) 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
+ if (!g_BlockFullyOccupiesVoxel[a_World->GetBlock(a_BlockX, a_BlockY - 1, a_BlockZ)]) // Some solid blocks, such as cocoa beans, are not suitable for dust
{
return false;
}