Removed g_BlockXXX arrays
This commit is contained in:
parent
68b75f7b7a
commit
cff4ee11f1
@ -418,6 +418,8 @@ static int tolua_set_AllToLua_g_BlockFullyOccupiesVoxel(lua_State* tolua_S)
|
||||
|
||||
void DeprecatedBindings::Bind(lua_State * tolua_S)
|
||||
{
|
||||
tolua_beginmodule(tolua_S, NULL);
|
||||
|
||||
tolua_array(tolua_S, "g_BlockLightValue", tolua_get_AllToLua_g_BlockLightValue, tolua_set_AllToLua_g_BlockLightValue);
|
||||
tolua_array(tolua_S, "g_BlockSpreadLightFalloff", tolua_get_AllToLua_g_BlockSpreadLightFalloff, tolua_set_AllToLua_g_BlockSpreadLightFalloff);
|
||||
tolua_array(tolua_S, "g_BlockTransparent", tolua_get_AllToLua_g_BlockTransparent, tolua_set_AllToLua_g_BlockTransparent);
|
||||
@ -427,6 +429,8 @@ void DeprecatedBindings::Bind(lua_State * tolua_S)
|
||||
tolua_array(tolua_S, "g_BlockRequiresSpecialTool", tolua_get_AllToLua_g_BlockRequiresSpecialTool, tolua_set_AllToLua_g_BlockRequiresSpecialTool);
|
||||
tolua_array(tolua_S, "g_BlockIsSolid", tolua_get_AllToLua_g_BlockIsSolid, tolua_set_AllToLua_g_BlockIsSolid);
|
||||
tolua_array(tolua_S, "g_BlockFullyOccupiesVoxel", tolua_get_AllToLua_g_BlockFullyOccupiesVoxel, tolua_set_AllToLua_g_BlockFullyOccupiesVoxel);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
}
|
||||
|
||||
|
||||
|
399
src/BlockID.cpp
399
src/BlockID.cpp
@ -12,20 +12,6 @@
|
||||
|
||||
|
||||
|
||||
NIBBLETYPE g_BlockLightValue[256];
|
||||
NIBBLETYPE g_BlockSpreadLightFalloff[256];
|
||||
bool g_BlockTransparent[256];
|
||||
bool g_BlockOneHitDig[256];
|
||||
bool g_BlockPistonBreakable[256];
|
||||
bool g_BlockIsSnowable[256];
|
||||
bool g_BlockRequiresSpecialTool[256];
|
||||
bool g_BlockIsSolid[256];
|
||||
bool g_BlockFullyOccupiesVoxel[256];
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cBlockIDMap
|
||||
{
|
||||
// Making the map case-insensitive:
|
||||
@ -481,389 +467,4 @@ cItem GetIniItemSet(cIniFile & a_IniFile, const char * a_Section, const char * a
|
||||
|
||||
|
||||
|
||||
// This is actually just some code that needs to run at program startup, so it is wrapped into a global var's constructor:
|
||||
class cBlockPropertiesInitializer
|
||||
{
|
||||
public:
|
||||
cBlockPropertiesInitializer(void)
|
||||
{
|
||||
memset(g_BlockLightValue, 0x00, sizeof(g_BlockLightValue));
|
||||
memset(g_BlockSpreadLightFalloff, 0x0f, sizeof(g_BlockSpreadLightFalloff)); // 0x0f means total falloff
|
||||
memset(g_BlockTransparent, 0x00, sizeof(g_BlockTransparent));
|
||||
memset(g_BlockOneHitDig, 0x00, sizeof(g_BlockOneHitDig));
|
||||
memset(g_BlockPistonBreakable, 0x00, sizeof(g_BlockPistonBreakable));
|
||||
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++)
|
||||
{
|
||||
g_BlockIsSnowable[i] = true;
|
||||
}
|
||||
memset(g_BlockRequiresSpecialTool, 0x00, sizeof(g_BlockRequiresSpecialTool)); // Set all blocks to false
|
||||
|
||||
// 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_BlockIsSolid); i++)
|
||||
{
|
||||
g_BlockIsSolid[i] = true;
|
||||
}
|
||||
|
||||
// Emissive blocks
|
||||
g_BlockLightValue[E_BLOCK_FIRE] = 15;
|
||||
g_BlockLightValue[E_BLOCK_GLOWSTONE] = 15;
|
||||
g_BlockLightValue[E_BLOCK_JACK_O_LANTERN] = 15;
|
||||
g_BlockLightValue[E_BLOCK_LAVA] = 15;
|
||||
g_BlockLightValue[E_BLOCK_STATIONARY_LAVA] = 15;
|
||||
g_BlockLightValue[E_BLOCK_END_PORTAL] = 15;
|
||||
g_BlockLightValue[E_BLOCK_REDSTONE_LAMP_ON] = 15;
|
||||
g_BlockLightValue[E_BLOCK_TORCH] = 14;
|
||||
g_BlockLightValue[E_BLOCK_BURNING_FURNACE] = 13;
|
||||
g_BlockLightValue[E_BLOCK_NETHER_PORTAL] = 11;
|
||||
g_BlockLightValue[E_BLOCK_REDSTONE_ORE_GLOWING] = 9;
|
||||
g_BlockLightValue[E_BLOCK_REDSTONE_REPEATER_ON] = 9;
|
||||
g_BlockLightValue[E_BLOCK_REDSTONE_TORCH_ON] = 7;
|
||||
g_BlockLightValue[E_BLOCK_BREWING_STAND] = 1;
|
||||
g_BlockLightValue[E_BLOCK_BROWN_MUSHROOM] = 1;
|
||||
g_BlockLightValue[E_BLOCK_DRAGON_EGG] = 1;
|
||||
|
||||
// Spread blocks
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_AIR] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_CAKE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_CHEST] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_COBWEB] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_CROPS] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_FENCE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_FENCE_GATE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_FIRE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_GLASS] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_GLASS_PANE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_GLOWSTONE] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_IRON_BARS] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_IRON_DOOR] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_LEAVES] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_SIGN_POST] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_TORCH] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_VINES] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_WALLSIGN] = 1;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_WOODEN_DOOR] = 1;
|
||||
|
||||
// Light in water and lava dissapears faster:
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_LAVA] = 3;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_LAVA] = 3;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_STATIONARY_WATER] = 3;
|
||||
g_BlockSpreadLightFalloff[E_BLOCK_WATER] = 3;
|
||||
|
||||
// Transparent blocks
|
||||
g_BlockTransparent[E_BLOCK_ACTIVATOR_RAIL] = true;
|
||||
g_BlockTransparent[E_BLOCK_AIR] = true;
|
||||
g_BlockTransparent[E_BLOCK_BIG_FLOWER] = true;
|
||||
g_BlockTransparent[E_BLOCK_BROWN_MUSHROOM] = true;
|
||||
g_BlockTransparent[E_BLOCK_CARROTS] = true;
|
||||
g_BlockTransparent[E_BLOCK_CHEST] = true;
|
||||
g_BlockTransparent[E_BLOCK_COBWEB] = true;
|
||||
g_BlockTransparent[E_BLOCK_CROPS] = true;
|
||||
g_BlockTransparent[E_BLOCK_DANDELION] = true;
|
||||
g_BlockTransparent[E_BLOCK_DETECTOR_RAIL] = true;
|
||||
g_BlockTransparent[E_BLOCK_ENDER_CHEST] = true;
|
||||
g_BlockTransparent[E_BLOCK_FENCE] = true;
|
||||
g_BlockTransparent[E_BLOCK_FENCE_GATE] = true;
|
||||
g_BlockTransparent[E_BLOCK_FIRE] = true;
|
||||
g_BlockTransparent[E_BLOCK_FLOWER] = true;
|
||||
g_BlockTransparent[E_BLOCK_FLOWER_POT] = true;
|
||||
g_BlockTransparent[E_BLOCK_GLASS] = true;
|
||||
g_BlockTransparent[E_BLOCK_GLASS_PANE] = true;
|
||||
g_BlockTransparent[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockTransparent[E_BLOCK_ICE] = true;
|
||||
g_BlockTransparent[E_BLOCK_IRON_DOOR] = true;
|
||||
g_BlockTransparent[E_BLOCK_LAVA] = true;
|
||||
g_BlockTransparent[E_BLOCK_LEAVES] = true;
|
||||
g_BlockTransparent[E_BLOCK_LEVER] = true;
|
||||
g_BlockTransparent[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockTransparent[E_BLOCK_MELON_STEM] = true;
|
||||
g_BlockTransparent[E_BLOCK_NETHER_BRICK_FENCE] = true;
|
||||
g_BlockTransparent[E_BLOCK_NEW_LEAVES] = true;
|
||||
g_BlockTransparent[E_BLOCK_POTATOES] = true;
|
||||
g_BlockTransparent[E_BLOCK_POWERED_RAIL] = true;
|
||||
g_BlockTransparent[E_BLOCK_PISTON_EXTENSION] = true;
|
||||
g_BlockTransparent[E_BLOCK_PUMPKIN_STEM] = true;
|
||||
g_BlockTransparent[E_BLOCK_RAIL] = true;
|
||||
g_BlockTransparent[E_BLOCK_RED_MUSHROOM] = true;
|
||||
g_BlockTransparent[E_BLOCK_SIGN_POST] = true;
|
||||
g_BlockTransparent[E_BLOCK_SNOW] = true;
|
||||
g_BlockTransparent[E_BLOCK_STAINED_GLASS] = true;
|
||||
g_BlockTransparent[E_BLOCK_STAINED_GLASS_PANE] = true;
|
||||
g_BlockTransparent[E_BLOCK_STATIONARY_LAVA] = true;
|
||||
g_BlockTransparent[E_BLOCK_STATIONARY_WATER] = true;
|
||||
g_BlockTransparent[E_BLOCK_STONE_BUTTON] = true;
|
||||
g_BlockTransparent[E_BLOCK_STONE_PRESSURE_PLATE] = true;
|
||||
g_BlockTransparent[E_BLOCK_TALL_GRASS] = true;
|
||||
g_BlockTransparent[E_BLOCK_TORCH] = true;
|
||||
g_BlockTransparent[E_BLOCK_VINES] = true;
|
||||
g_BlockTransparent[E_BLOCK_WALLSIGN] = true;
|
||||
g_BlockTransparent[E_BLOCK_WATER] = true;
|
||||
g_BlockTransparent[E_BLOCK_WOODEN_BUTTON] = true;
|
||||
g_BlockTransparent[E_BLOCK_WOODEN_DOOR] = true;
|
||||
g_BlockTransparent[E_BLOCK_WOODEN_PRESSURE_PLATE] = true;
|
||||
|
||||
// TODO: Any other transparent blocks?
|
||||
|
||||
// One hit break blocks:
|
||||
g_BlockOneHitDig[E_BLOCK_ACTIVE_COMPARATOR] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_BIG_FLOWER] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_BROWN_MUSHROOM] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_CARROTS] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_CROPS] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_DANDELION] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_FIRE] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_FLOWER] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_FLOWER_POT] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_INACTIVE_COMPARATOR] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_MELON_STEM] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_POTATOES] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_PUMPKIN_STEM] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_OFF] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REDSTONE_REPEATER_ON] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REDSTONE_TORCH_OFF] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REDSTONE_TORCH_ON] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_RED_MUSHROOM] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_REEDS] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_SAPLING] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_TNT] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_TALL_GRASS] = true;
|
||||
g_BlockOneHitDig[E_BLOCK_TORCH] = true;
|
||||
|
||||
// Blocks that break when pushed by piston:
|
||||
g_BlockPistonBreakable[E_BLOCK_ACTIVE_COMPARATOR] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_AIR] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_BED] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_BIG_FLOWER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_BROWN_MUSHROOM] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_COBWEB] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_CROPS] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_DANDELION] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_DEAD_BUSH] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_FIRE] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_FLOWER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_INACTIVE_COMPARATOR] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_IRON_DOOR] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_JACK_O_LANTERN] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_LADDER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_LAVA] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_LEVER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_MELON] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_MELON_STEM] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_PUMPKIN] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_PUMPKIN_STEM] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REDSTONE_REPEATER_OFF] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REDSTONE_REPEATER_ON] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_OFF] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REDSTONE_TORCH_ON] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REDSTONE_WIRE] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_RED_MUSHROOM] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_REEDS] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_SNOW] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_STATIONARY_LAVA] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_STATIONARY_WATER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_STONE_BUTTON] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_STONE_PRESSURE_PLATE] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_TALL_GRASS] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_TORCH] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_VINES] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_WATER] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_WOODEN_BUTTON] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_WOODEN_DOOR] = true;
|
||||
g_BlockPistonBreakable[E_BLOCK_WOODEN_PRESSURE_PLATE] = true;
|
||||
|
||||
|
||||
// Blocks that cannot be snowed over:
|
||||
g_BlockIsSnowable[E_BLOCK_ACTIVE_COMPARATOR] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_AIR] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_BIG_FLOWER] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_BROWN_MUSHROOM] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_CACTUS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_CHEST] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_CROPS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_DANDELION] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_FIRE] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_FLOWER] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_GLASS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_ICE] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_INACTIVE_COMPARATOR] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_LAVA] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_LILY_PAD] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_OFF] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REDSTONE_REPEATER_ON] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REDSTONE_TORCH_OFF] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REDSTONE_TORCH_ON] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REDSTONE_WIRE] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_RED_MUSHROOM] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_REEDS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_SAPLING] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_SIGN_POST] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_SNOW] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_STAINED_GLASS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_STAINED_GLASS_PANE] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_STATIONARY_LAVA] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_STATIONARY_WATER] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_TALL_GRASS] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_TNT] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_TORCH] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_VINES] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_WALLSIGN] = false;
|
||||
g_BlockIsSnowable[E_BLOCK_WATER] = false;
|
||||
|
||||
|
||||
// Blocks that don't drop without a special tool:
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_BRICK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_CAULDRON] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_COAL_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_COBBLESTONE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_COBBLESTONE_STAIRS] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_COBWEB] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_DIAMOND_BLOCK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_DIAMOND_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_DOUBLE_STONE_SLAB] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_EMERALD_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_END_STONE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_GOLD_BLOCK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_GOLD_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_IRON_BLOCK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_IRON_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_LAPIS_BLOCK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_LAPIS_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_MOSSY_COBBLESTONE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_NETHERRACK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_NETHER_BRICK] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_NETHER_BRICK_STAIRS] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_OBSIDIAN] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_REDSTONE_ORE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_REDSTONE_ORE_GLOWING] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_SANDSTONE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_SANDSTONE_STAIRS] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_SNOW] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_STONE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_STONE_BRICKS] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_STONE_BRICK_STAIRS] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_STONE_PRESSURE_PLATE] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_STONE_SLAB] = true;
|
||||
g_BlockRequiresSpecialTool[E_BLOCK_VINES] = true;
|
||||
|
||||
// Nonsolid blocks:
|
||||
g_BlockIsSolid[E_BLOCK_ACTIVATOR_RAIL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_AIR] = false;
|
||||
g_BlockIsSolid[E_BLOCK_BIG_FLOWER] = false;
|
||||
g_BlockIsSolid[E_BLOCK_BROWN_MUSHROOM] = false;
|
||||
g_BlockIsSolid[E_BLOCK_CARROTS] = false;
|
||||
g_BlockIsSolid[E_BLOCK_COBWEB] = false;
|
||||
g_BlockIsSolid[E_BLOCK_CROPS] = false;
|
||||
g_BlockIsSolid[E_BLOCK_DANDELION] = false;
|
||||
g_BlockIsSolid[E_BLOCK_DETECTOR_RAIL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_END_PORTAL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_FIRE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_FLOWER] = false;
|
||||
g_BlockIsSolid[E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_LAVA] = false;
|
||||
g_BlockIsSolid[E_BLOCK_LEVER] = false;
|
||||
g_BlockIsSolid[E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_MELON_STEM] = false;
|
||||
g_BlockIsSolid[E_BLOCK_NETHER_PORTAL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_PISTON_EXTENSION] = false;
|
||||
g_BlockIsSolid[E_BLOCK_POTATOES] = false;
|
||||
g_BlockIsSolid[E_BLOCK_POWERED_RAIL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_RAIL] = false;
|
||||
g_BlockIsSolid[E_BLOCK_REDSTONE_TORCH_OFF] = false;
|
||||
g_BlockIsSolid[E_BLOCK_REDSTONE_TORCH_ON] = false;
|
||||
g_BlockIsSolid[E_BLOCK_REDSTONE_WIRE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_RED_MUSHROOM] = false;
|
||||
g_BlockIsSolid[E_BLOCK_REEDS] = false;
|
||||
g_BlockIsSolid[E_BLOCK_SAPLING] = false;
|
||||
g_BlockIsSolid[E_BLOCK_SIGN_POST] = false;
|
||||
g_BlockIsSolid[E_BLOCK_SNOW] = false;
|
||||
g_BlockIsSolid[E_BLOCK_STATIONARY_LAVA] = false;
|
||||
g_BlockIsSolid[E_BLOCK_STATIONARY_WATER] = false;
|
||||
g_BlockIsSolid[E_BLOCK_STONE_BUTTON] = false;
|
||||
g_BlockIsSolid[E_BLOCK_STONE_PRESSURE_PLATE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_TALL_GRASS] = false;
|
||||
g_BlockIsSolid[E_BLOCK_TORCH] = false;
|
||||
g_BlockIsSolid[E_BLOCK_TRIPWIRE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_VINES] = false;
|
||||
g_BlockIsSolid[E_BLOCK_WALLSIGN] = false;
|
||||
g_BlockIsSolid[E_BLOCK_WATER] = false;
|
||||
g_BlockIsSolid[E_BLOCK_WOODEN_BUTTON] = false;
|
||||
g_BlockIsSolid[E_BLOCK_WOODEN_PRESSURE_PLATE] = false;
|
||||
g_BlockIsSolid[E_BLOCK_WOODEN_SLAB] = false;
|
||||
|
||||
// Torch placeable blocks:
|
||||
g_BlockFullyOccupiesVoxel[E_BLOCK_NEW_LOG] = 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;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -909,17 +909,3 @@ extern cItem GetIniItemSet(cIniFile & a_IniFile, const char * a_Section, const c
|
||||
|
||||
|
||||
|
||||
// Block properties:
|
||||
extern NIBBLETYPE g_BlockLightValue[256];
|
||||
extern NIBBLETYPE g_BlockSpreadLightFalloff[256];
|
||||
extern bool g_BlockTransparent[256];
|
||||
extern bool g_BlockOneHitDig[256];
|
||||
extern bool g_BlockPistonBreakable[256];
|
||||
extern bool g_BlockIsSnowable[256];
|
||||
extern bool g_BlockRequiresSpecialTool[256];
|
||||
extern bool g_BlockIsSolid[256];
|
||||
extern bool g_BlockFullyOccupiesVoxel[256];
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -17,33 +17,6 @@ typedef std::vector<int> cSlotNums;
|
||||
|
||||
// tolua_begin
|
||||
|
||||
/// How much light do the blocks emit on their own?
|
||||
extern unsigned char g_BlockLightValue[];
|
||||
|
||||
/// How much light do the block consume?
|
||||
extern unsigned char g_BlockSpreadLightFalloff[];
|
||||
|
||||
/// Is a block completely transparent? (light doesn't get decreased(?))
|
||||
extern bool g_BlockTransparent[];
|
||||
|
||||
/// Is a block destroyed after a single hit?
|
||||
extern bool g_BlockOneHitDig[];
|
||||
|
||||
/// Can a piston break this block?
|
||||
extern bool g_BlockPistonBreakable[256];
|
||||
|
||||
/// Can this block hold snow atop?
|
||||
extern bool g_BlockIsSnowable[256];
|
||||
|
||||
/// Does this block require a tool to drop?
|
||||
extern bool g_BlockRequiresSpecialTool[256];
|
||||
|
||||
/// Is this block solid (player cannot walk through)?
|
||||
extern bool g_BlockIsSolid[256];
|
||||
|
||||
/// Does this block fully occupy it's voxel - is it a 'full' block?
|
||||
extern bool g_BlockFullyOccupiesVoxel[256];
|
||||
|
||||
/// Experience Orb setup
|
||||
enum
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user