summaryrefslogtreecommitdiffstats
path: root/src/BlockInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/BlockInfo.cpp')
-rw-r--r--src/BlockInfo.cpp68
1 files changed, 13 insertions, 55 deletions
diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp
index 839f1e9f6..fb9b746b3 100644
--- a/src/BlockInfo.cpp
+++ b/src/BlockInfo.cpp
@@ -6,26 +6,6 @@
-
-
-cBlockInfo::cBlockInfo()
- : m_LightValue(0x00)
- , m_SpreadLightFalloff(0x0f)
- , m_Transparent(false)
- , m_OneHitDig(false)
- , m_PistonBreakable(false)
- , m_IsSnowable(false)
- , m_IsSolid(true)
- , m_FullyOccupiesVoxel(false)
- , m_CanBeTerraformed(false)
- , m_PlaceSound("")
- , m_Handler(NULL)
-{}
-
-
-
-
-
cBlockInfo::~cBlockInfo()
{
delete m_Handler;
@@ -33,28 +13,6 @@ cBlockInfo::~cBlockInfo()
}
-
-
-
-/** This accessor makes sure that the cBlockInfo structures are properly initialized exactly once.
-It does so by using the C++ singleton approximation - storing the actual singleton as the function's static variable.
-It works only if it is called for the first time before the app spawns other threads. */
-cBlockInfo & cBlockInfo::Get(BLOCKTYPE a_Type)
-{
- static cBlockInfo ms_Info[256];
- static bool IsBlockInfoInitialized = false;
- if (!IsBlockInfoInitialized)
- {
- cBlockInfo::Initialize(ms_Info);
- IsBlockInfoInitialized = true;
- }
- return ms_Info[a_Type];
-}
-
-
-
-
-
void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
{
for (unsigned int i = 0; i < 256; ++i)
@@ -634,7 +592,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_LOG ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LEAVES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_SPONGE ].m_PlaceSound = "dig.grass";
- a_Info[E_BLOCK_GLASS ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_GLASS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_LAPIS_ORE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_LAPIS_BLOCK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DISPENSER ].m_PlaceSound = "dig.stone";
@@ -691,7 +649,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_REDSTONE_TORCH_ON ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_STONE_BUTTON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SNOW ].m_PlaceSound = "dig.snow";
- a_Info[E_BLOCK_ICE ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_ICE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SNOW_BLOCK ].m_PlaceSound = "dig.snow";
a_Info[E_BLOCK_CACTUS ].m_PlaceSound = "dig.cloth";
a_Info[E_BLOCK_CLAY ].m_PlaceSound = "dig.gravel";
@@ -701,20 +659,20 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_PUMPKIN ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_NETHERRACK ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_SOULSAND ].m_PlaceSound = "dig.sand";
- a_Info[E_BLOCK_GLOWSTONE ].m_PlaceSound = "dig.glass";
- a_Info[E_BLOCK_NETHER_PORTAL ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_GLOWSTONE ].m_PlaceSound = "dig.stone";
+ a_Info[E_BLOCK_NETHER_PORTAL ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_JACK_O_LANTERN ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_CAKE ].m_PlaceSound = "dig.snow";
a_Info[E_BLOCK_REDSTONE_REPEATER_OFF ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_REDSTONE_REPEATER_ON ].m_PlaceSound = "dig.wood";
- a_Info[E_BLOCK_STAINED_GLASS ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_STAINED_GLASS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_TRAPDOOR ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_SILVERFISH_EGG ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STONE_BRICKS ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_HUGE_BROWN_MUSHROOM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_HUGE_RED_MUSHROOM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_IRON_BARS ].m_PlaceSound = "dig.metal";
- a_Info[E_BLOCK_GLASS_PANE ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_GLASS_PANE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_MELON ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_PUMPKIN_STEM ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_MELON_STEM ].m_PlaceSound = "dig.wood";
@@ -731,12 +689,12 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_ENCHANTMENT_TABLE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BREWING_STAND ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_CAULDRON ].m_PlaceSound = "dig.stone";
- a_Info[E_BLOCK_END_PORTAL ].m_PlaceSound = "dig.glass";
- a_Info[E_BLOCK_END_PORTAL_FRAME ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_END_PORTAL ].m_PlaceSound = "dig.stone";
+ a_Info[E_BLOCK_END_PORTAL_FRAME ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_END_STONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DRAGON_EGG ].m_PlaceSound = "dig.stone";
- a_Info[E_BLOCK_REDSTONE_LAMP_OFF ].m_PlaceSound = "dig.glass";
- a_Info[E_BLOCK_REDSTONE_LAMP_ON ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_REDSTONE_LAMP_OFF ].m_PlaceSound = "dig.stone";
+ a_Info[E_BLOCK_REDSTONE_LAMP_ON ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_DOUBLE_WOODEN_SLAB ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_WOODEN_SLAB ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_COCOA_POD ].m_PlaceSound = "dig.wood";
@@ -756,7 +714,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_CARROTS ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_POTATOES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_HEAD ].m_PlaceSound = "dig.stone";
- a_Info[E_BLOCK_ANVIL ].m_PlaceSound = "dig.anvil";
+ a_Info[E_BLOCK_ANVIL ].m_PlaceSound = "random.anvil_land";
a_Info[E_BLOCK_TRAPPED_CHEST ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
@@ -771,7 +729,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_ACTIVATOR_RAIL ].m_PlaceSound = "dig.metal";
a_Info[E_BLOCK_DROPPER ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_STAINED_CLAY ].m_PlaceSound = "dig.stone";
- a_Info[E_BLOCK_STAINED_GLASS_PANE ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_STAINED_GLASS_PANE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_NEW_LEAVES ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_NEW_LOG ].m_PlaceSound = "dig.wood";
a_Info[E_BLOCK_ACACIA_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
@@ -785,7 +743,7 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
a_Info[E_BLOCK_CARPET ].m_PlaceSound = "dig.cloth";
a_Info[E_BLOCK_HARDENED_CLAY ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BLOCK_OF_COAL ].m_PlaceSound = "dig.stone";
- a_Info[E_BLOCK_PACKED_ICE ].m_PlaceSound = "dig.glass";
+ a_Info[E_BLOCK_PACKED_ICE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_BIG_FLOWER ].m_PlaceSound = "dig.grass";
a_Info[E_BLOCK_RED_SANDSTONE ].m_PlaceSound = "dig.stone";
a_Info[E_BLOCK_RED_SANDSTONE_STAIRS ].m_PlaceSound = "dig.stone";