Merge branch 'master' into 1.8-Protocol
This commit is contained in:
commit
bee615b75b
1
.gitignore
vendored
1
.gitignore
vendored
@ -56,6 +56,7 @@ Makefile
|
||||
*.a
|
||||
*.d
|
||||
*.so
|
||||
BuildInfo.h
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
Makefile
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
export MCSERVER_BUILD_SERIES_NAME="Travis $CC $TRAVIS_MCSERVER_BUILD_TYPE"
|
||||
export MCSERVER_BUILD_ID=$TRAVIS_JOB_NUMBER
|
||||
export MCSERVER_BUILD_DATETIME=`date`
|
||||
|
||||
cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1;
|
||||
make -j 2;
|
||||
make -j 2 test;
|
||||
|
@ -18,6 +18,25 @@ if(DEFINED ENV{TRAVIS_BUILD_WITH_COVERAGE})
|
||||
set(BUILD_WITH_COVERAGE $ENV{TRAVIS_BUILD_WITH_COVERAGE})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{MCSERVER_BUILD_ID})
|
||||
set(BUILD_ID $ENV{MCSERVER_BUILD_ID})
|
||||
set(BUILD_SERIES_NAME $ENV{MCSERVER_BUILD_SERIES_NAME})
|
||||
set(BUILD_DATETIME $ENV{MCSERVER_BUILD_DATETIME})
|
||||
if(DEFINED ENV{MCSERVER_BUILD_COMMIT_ID})
|
||||
set(BUILD_COMMIT_ID $ENV{MCSERVER_BUILD_COMMIT_ID})
|
||||
else()
|
||||
message("Commit id not set, attempting to determine id from git")
|
||||
execute_process(
|
||||
COMMAND git rev-parse HEAD
|
||||
RESULT_VARIABLE GIT_EXECUTED
|
||||
OUTPUT_VARIABLE BUILD_COMMIT_ID)
|
||||
string(STRIP ${BUILD_COMMIT_ID} BUILD_COMMIT_ID)
|
||||
if (NOT (GIT_EXECUTED EQUAL 0))
|
||||
message(FATAL_ERROR "Could not identifiy git commit id")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# This has to be done before any flags have been set up.
|
||||
if(${BUILD_TOOLS})
|
||||
add_subdirectory(Tools/MCADefrag/)
|
||||
|
@ -6,6 +6,7 @@
|
||||
..\MCServer\furnace.txt
|
||||
..\MCServer\items.ini
|
||||
..\MCServer\monsters.ini
|
||||
..\MCServer\buildinfo.txt
|
||||
MCServer*debug.cmd
|
||||
*.example.ini
|
||||
ThirdPartyLicenses
|
||||
|
@ -1,2 +1,3 @@
|
||||
MCServer\*.pdb
|
||||
src\Bindings\Bindings.*
|
||||
MCServer\buildinfo.txt
|
||||
src\Bindings\Bindings.*
|
||||
|
@ -351,7 +351,7 @@ Clay, 4 = ClayBlock, *
|
||||
|
||||
Painting = Stick, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Wool, 2:2
|
||||
ItemFrame = Stick, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Leather, 2:2
|
||||
Sign = Planks, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2 | Stick, 2:3
|
||||
Sign, 3 = Planks, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2 | Stick, 2:3
|
||||
Ladder, 3 = Stick, 1:1, 3:1, 1:2, 2:2, 3:2, 1:3, 3:3
|
||||
GlassPane, 16 = Glass, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
|
||||
IronBars, 16 = IronIngot, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
|
||||
|
@ -239,12 +239,11 @@ macro(set_exe_flags)
|
||||
# clang does not provide the __extern_always_inline macro and a part of libm depends on this when using fast-math
|
||||
add_flags_cxx("-D__extern_always_inline=inline")
|
||||
add_flags_cxx("-Werror -Weverything -Wno-c++98-compat-pedantic -Wno-string-conversion")
|
||||
add_flags_cxx("-Wno-error=switch-enum -Wno-exit-time-destructors")
|
||||
add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-padded")
|
||||
add_flags_cxx("-Wno-error=deprecated -Wno-error=weak-vtables -Wno-error=float-equal")
|
||||
add_flags_cxx("-Wno-error=missing-prototypes -Wno-error=non-virtual-dtor")
|
||||
add_flags_cxx("-Wno-exit-time-destructors -Wno-padded")
|
||||
add_flags_cxx("-Wno-error=sign-conversion -Wno-error=conversion -Wno-error=deprecated")
|
||||
add_flags_cxx("-Wno-error=missing-prototypes")
|
||||
add_flags_cxx("-Wno-error=shadow -Wno-error=old-style-cast -Wno-error=global-constructors")
|
||||
add_flags_cxx("-Wno-error=exit-time-destructors")
|
||||
add_flags_cxx("-Wno-error=float-equal")
|
||||
add_flags_cxx("-Wno-weak-vtables -Wno-switch-enum")
|
||||
if ("${CLANG_VERSION}" VERSION_GREATER 3.0)
|
||||
# flags that are not present in 3.0
|
||||
|
@ -18,6 +18,7 @@ cBlockInfo::cBlockInfo()
|
||||
, m_IsSolid(true)
|
||||
, m_FullyOccupiesVoxel(false)
|
||||
, m_CanBeTerraformed(false)
|
||||
, m_PlaceSound("")
|
||||
, m_Handler(NULL)
|
||||
{}
|
||||
|
||||
@ -571,6 +572,172 @@ void cBlockInfo::Initialize(cBlockInfoArray & a_Info)
|
||||
a_Info[E_BLOCK_SOULSAND ].m_CanBeTerraformed = true;
|
||||
a_Info[E_BLOCK_STAINED_CLAY ].m_CanBeTerraformed = true;
|
||||
a_Info[E_BLOCK_STONE ].m_CanBeTerraformed = true;
|
||||
|
||||
|
||||
// Block place sounds:
|
||||
a_Info[E_BLOCK_STONE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_GRASS ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_DIRT ].m_PlaceSound = "dig.gravel";
|
||||
a_Info[E_BLOCK_COBBLESTONE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_PLANKS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_SAPLING ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_BEDROCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_SAND ].m_PlaceSound = "dig.sand";
|
||||
a_Info[E_BLOCK_GRAVEL ].m_PlaceSound = "dig.gravel";
|
||||
a_Info[E_BLOCK_GOLD_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_IRON_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_COAL_ORE ].m_PlaceSound = "dig.stone";
|
||||
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_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";
|
||||
a_Info[E_BLOCK_SANDSTONE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_NOTE_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_POWERED_RAIL ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_DETECTOR_RAIL ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_STICKY_PISTON ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_COBWEB ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_TALL_GRASS ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_DEAD_BUSH ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_PISTON ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_PISTON_EXTENSION ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_WOOL ].m_PlaceSound = "dig.cloth";
|
||||
a_Info[E_BLOCK_PISTON_MOVED_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_DANDELION ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_FLOWER ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_BROWN_MUSHROOM ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_RED_MUSHROOM ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_GOLD_BLOCK ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_IRON_BLOCK ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_DOUBLE_STONE_SLAB ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_STONE_SLAB ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_BRICK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_TNT ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_BOOKCASE ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_MOSSY_COBBLESTONE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_OBSIDIAN ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_TORCH ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_FIRE ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_MOB_SPAWNER ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_WOODEN_STAIRS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_CHEST ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_REDSTONE_WIRE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_DIAMOND_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_DIAMOND_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_CRAFTING_TABLE ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_FARMLAND ].m_PlaceSound = "dig.gravel";
|
||||
a_Info[E_BLOCK_FURNACE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_LIT_FURNACE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_SIGN_POST ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_WOODEN_DOOR ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_LADDER ].m_PlaceSound = "dig.ladder";
|
||||
a_Info[E_BLOCK_RAIL ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_COBBLESTONE_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_WALLSIGN ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_LEVER ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_STONE_PRESSURE_PLATE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_IRON_DOOR ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_WOODEN_PRESSURE_PLATE ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_REDSTONE_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_REDSTONE_ORE_GLOWING ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_REDSTONE_TORCH_OFF ].m_PlaceSound = "dig.wood";
|
||||
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_SNOW_BLOCK ].m_PlaceSound = "dig.snow";
|
||||
a_Info[E_BLOCK_CACTUS ].m_PlaceSound = "dig.cloth";
|
||||
a_Info[E_BLOCK_CLAY ].m_PlaceSound = "dig.gravel";
|
||||
a_Info[E_BLOCK_SUGARCANE ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_JUKEBOX ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_FENCE ].m_PlaceSound = "dig.wood";
|
||||
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_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_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_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";
|
||||
a_Info[E_BLOCK_VINES ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_FENCE_GATE ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_STONE_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_MYCELIUM ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_LILY_PAD ].m_PlaceSound = "dig.grass";
|
||||
a_Info[E_BLOCK_NETHER_BRICK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_NETHER_BRICK_FENCE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_NETHER_BRICK_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_NETHER_WART ].m_PlaceSound = "dig.stone";
|
||||
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_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_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";
|
||||
a_Info[E_BLOCK_SANDSTONE_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_EMERALD_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_ENDER_CHEST ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_TRIPWIRE_HOOK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_TRIPWIRE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_EMERALD_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_SPRUCE_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_BIRCH_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_JUNGLE_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_COMMAND_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_BEACON ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_COBBLESTONE_WALL ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_FLOWER_POT ].m_PlaceSound = "dig.stone";
|
||||
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_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";
|
||||
a_Info[E_BLOCK_INACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_ACTIVE_COMPARATOR ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_DAYLIGHT_SENSOR ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_BLOCK_OF_REDSTONE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_NETHER_QUARTZ_ORE ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_HOPPER ].m_PlaceSound = "dig.metal";
|
||||
a_Info[E_BLOCK_QUARTZ_BLOCK ].m_PlaceSound = "dig.stone";
|
||||
a_Info[E_BLOCK_QUARTZ_STAIRS ].m_PlaceSound = "dig.stone";
|
||||
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_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";
|
||||
a_Info[E_BLOCK_DARK_OAK_WOOD_STAIRS ].m_PlaceSound = "dig.wood";
|
||||
a_Info[E_BLOCK_HAY_BALE ].m_PlaceSound = "dig.grass";
|
||||
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_BIG_FLOWER ].m_PlaceSound = "dig.grass";
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,6 +48,9 @@ public:
|
||||
/** Can a finisher change it? */
|
||||
bool m_CanBeTerraformed;
|
||||
|
||||
/** Sound when placing this block */
|
||||
AString m_PlaceSound;
|
||||
|
||||
// tolua_end
|
||||
|
||||
/** Associated block handler. */
|
||||
@ -64,6 +67,7 @@ public:
|
||||
inline static bool IsSolid (BLOCKTYPE a_Type) { return Get(a_Type).m_IsSolid; }
|
||||
inline static bool FullyOccupiesVoxel (BLOCKTYPE a_Type) { return Get(a_Type).m_FullyOccupiesVoxel; }
|
||||
inline static bool CanBeTerraformed (BLOCKTYPE a_Type) { return Get(a_Type).m_CanBeTerraformed; }
|
||||
inline static AString GetPlaceSound (BLOCKTYPE a_Type) { return Get(a_Type).m_PlaceSound; }
|
||||
|
||||
// tolua_end
|
||||
|
||||
|
@ -118,12 +118,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -57,12 +57,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return m_BlockType == E_BLOCK_WOODEN_BUTTON ? "step.wood" : "step.stone";
|
||||
}
|
||||
|
||||
|
||||
inline static NIBBLETYPE BlockFaceToMetaData(eBlockFace a_BlockFace)
|
||||
{
|
||||
switch (a_BlockFace)
|
||||
|
@ -69,12 +69,6 @@ public:
|
||||
{
|
||||
a_Chunk.GetWorld()->GrowCactus(a_RelX + a_Chunk.GetPosX() * cChunkDef::Width, a_RelY, a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width, 1);
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.cloth";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -43,11 +43,6 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.cloth";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -22,12 +22,6 @@ public:
|
||||
cBlockHandler(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.cloth";
|
||||
}
|
||||
|
||||
|
||||
virtual bool GetPlacementBlockTypeMeta(
|
||||
|
@ -106,12 +106,6 @@ public:
|
||||
// Single chest, no further processing needed
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||
{
|
||||
int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width;
|
||||
|
@ -15,11 +15,6 @@ public:
|
||||
: cBlockHandler(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.cloth";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -20,11 +20,6 @@ public:
|
||||
{
|
||||
a_Pickups.push_back(cItem(E_BLOCK_AIR, 8, 0));
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.stone";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -64,12 +64,6 @@ public:
|
||||
a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetYaw());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -100,12 +100,6 @@ public:
|
||||
{
|
||||
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) == E_BLOCK_FARMLAND));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -88,12 +88,6 @@ public:
|
||||
}
|
||||
} // for i - repeat twice
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.gravel";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -109,15 +109,6 @@ void cBlockDoorHandler::OnPlacedByPlayer(
|
||||
|
||||
|
||||
|
||||
const char * cBlockDoorHandler::GetStepSound(void)
|
||||
{
|
||||
return (m_BlockType == E_BLOCK_WOODEN_DOOR) ? "step.wood" : "step.stone";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NIBBLETYPE cBlockDoorHandler::MetaRotateCCW(NIBBLETYPE a_Meta)
|
||||
{
|
||||
if (a_Meta & 0x08)
|
||||
|
@ -19,7 +19,6 @@ public:
|
||||
virtual void OnDestroyed(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, int a_BlockX, int a_BlockY, int a_BlockZ) override;
|
||||
virtual void OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ) override;
|
||||
virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override;
|
||||
virtual const char * GetStepSound(void) override;
|
||||
|
||||
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) override;
|
||||
virtual NIBBLETYPE MetaRotateCW(NIBBLETYPE a_Meta) override;
|
||||
|
@ -33,11 +33,6 @@ public:
|
||||
a_BlockMeta = RotationToMetaData(a_Player->GetYaw());
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.stone";
|
||||
}
|
||||
|
||||
static NIBBLETYPE RotationToMetaData(double a_Rotation)
|
||||
{
|
||||
|
@ -50,11 +50,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
/** Traces along YP until it finds an obsidian block, returns Y difference or 0 if no portal, and -1 for border
|
||||
Takes the X, Y, and Z of the base block; with an optional MaxY for portal border finding */
|
||||
int FindObsidianCeiling(int X, int Y, int Z, cChunkInterface & a_ChunkInterface, int MaxY = 0)
|
||||
|
@ -28,12 +28,6 @@ public:
|
||||
{
|
||||
return (a_RelY > 0) && IsBlockTypeOfDirt(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -15,11 +15,6 @@ public:
|
||||
: cBlockHandler(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.gravel";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -495,15 +495,6 @@ void cBlockHandler::DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterfac
|
||||
|
||||
|
||||
|
||||
const char * cBlockHandler::GetStepSound()
|
||||
{
|
||||
return "step.stone";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool cBlockHandler::CanBeAt(cChunkInterface & a_ChunkInterface, int a_BlockX, int a_BlockY, int a_BlockZ, const cChunk & a_Chunk)
|
||||
{
|
||||
return true;
|
||||
|
@ -84,9 +84,6 @@ public:
|
||||
*/
|
||||
virtual void DropBlock(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, bool a_CanDrop = true, bool a_DropVerbatim = false);
|
||||
|
||||
/// Returns step sound name of block
|
||||
virtual const char * GetStepSound(void);
|
||||
|
||||
/// Checks if the block can stay at the specified relative coords in the chunk
|
||||
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk);
|
||||
|
||||
|
@ -15,12 +15,6 @@ public:
|
||||
: cBlockSidewaysHandler(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -111,12 +111,6 @@ public:
|
||||
int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width;
|
||||
return LadderCanBePlacedAt(a_ChunkInterface, BlockX, a_RelY, BlockZ, BlockFace);
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -112,12 +112,6 @@ public:
|
||||
DropBlock(a_ChunkInterface, a_WorldInterface, a_PluginInterface, NULL, BlockX, a_RelY, BlockZ);
|
||||
a_ChunkInterface.DigBlock(a_WorldInterface, BlockX, a_RelY, BlockZ);
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -70,12 +70,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
|
||||
inline static eBlockFace BlockMetaDataToBlockFace(NIBBLETYPE a_Meta)
|
||||
{
|
||||
switch (a_Meta & 0x7)
|
||||
|
@ -22,12 +22,6 @@ public:
|
||||
cFastRandom Random;
|
||||
a_Pickups.push_back(cItem(E_ITEM_MELON_SLICE, (char)(3 + Random.NextInt(5)), 0));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -50,12 +50,6 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -22,11 +22,6 @@ public:
|
||||
{
|
||||
a_Pickups.push_back(cItem(E_BLOCK_DIRT, 1, 0));
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.gravel";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -27,12 +27,6 @@ public:
|
||||
a_BlockMeta = (NIBBLETYPE)(a_Player->GetEquippedItem().m_ItemDamage);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -63,12 +63,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
|
||||
inline static NIBBLETYPE RepeaterRotationToMetaData(double a_Rotation)
|
||||
{
|
||||
a_Rotation += 90 + 45; // So its not aligned with axis
|
||||
|
@ -23,12 +23,6 @@ public:
|
||||
// Always drop the ON torch, meta 0
|
||||
a_Pickups.push_back(cItem(E_BLOCK_REDSTONE_TORCH_ON, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -15,12 +15,6 @@ public:
|
||||
: cBlockHandler(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.sand";
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -46,12 +46,6 @@ public:
|
||||
a_Chunk.SetMeta(a_RelX, a_RelY, a_RelZ, Meta | 0x08);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -65,12 +65,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -27,12 +27,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
|
||||
virtual bool CanBeAt(cChunkInterface & a_ChunkInterface, int a_RelX, int a_RelY, int a_RelZ, const cChunk & a_Chunk) override
|
||||
{
|
||||
if (a_RelY <= 0)
|
||||
|
@ -85,18 +85,6 @@ public:
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
switch (m_BlockType)
|
||||
{
|
||||
case E_BLOCK_WOODEN_SLAB: return "step.wood";
|
||||
case E_BLOCK_STONE_SLAB: return "step.stone";
|
||||
}
|
||||
ASSERT(!"Unhandled slab type!");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta) override
|
||||
@ -174,17 +162,6 @@ public:
|
||||
ASSERT(!"Unhandled double slab type!");
|
||||
return a_BlockType;
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
switch (m_BlockType)
|
||||
{
|
||||
case E_BLOCK_DOUBLE_STONE_SLAB: return "step.stone";
|
||||
case E_BLOCK_DOUBLE_WOODEN_SLAB: return "step.wood";
|
||||
}
|
||||
ASSERT(!"Unhandled double slab type!");
|
||||
return "";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -87,12 +87,6 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.cloth";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -55,24 +55,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
if (
|
||||
(m_BlockType == E_BLOCK_WOODEN_STAIRS) ||
|
||||
(m_BlockType == E_BLOCK_SPRUCE_WOOD_STAIRS) ||
|
||||
(m_BlockType == E_BLOCK_JUNGLE_WOOD_STAIRS) ||
|
||||
(m_BlockType == E_BLOCK_ACACIA_WOOD_STAIRS) ||
|
||||
(m_BlockType == E_BLOCK_BIRCH_WOOD_STAIRS) ||
|
||||
(m_BlockType == E_BLOCK_DARK_OAK_WOOD_STAIRS)
|
||||
)
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
return "step.stone";
|
||||
}
|
||||
|
||||
|
||||
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
|
||||
{
|
||||
// Reset meta to zero
|
||||
|
@ -47,12 +47,6 @@ public:
|
||||
{
|
||||
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) == E_BLOCK_FARMLAND));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -78,12 +78,6 @@ public:
|
||||
{
|
||||
a_Chunk.GetWorld()->GrowSugarcane(a_RelX + a_Chunk.GetPosX() * cChunkDef::Width, a_RelY, a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width, 1);
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -16,11 +16,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
|
||||
virtual void OnCancelRightClick(cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
|
||||
{
|
||||
a_WorldInterface.SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, a_Player);
|
||||
|
@ -53,12 +53,6 @@ public:
|
||||
{
|
||||
return ((a_RelY > 0) && (a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ) != E_BLOCK_AIR));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -184,12 +184,6 @@ public:
|
||||
// Always drop meta = 0
|
||||
a_Pickups.push_back(cItem(m_BlockType, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -16,11 +16,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
|
||||
{
|
||||
// Reset meta to zero
|
||||
|
@ -20,11 +20,6 @@ public:
|
||||
{
|
||||
a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0));
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -70,11 +70,6 @@ public:
|
||||
|
||||
return ((a_RelY > 0) && cBlockInfo::FullyOccupiesVoxel(BlockIsOn));
|
||||
}
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -159,12 +159,6 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.grass";
|
||||
}
|
||||
|
||||
|
||||
virtual bool DoesDropOnUnsuitable(void) override
|
||||
|
@ -27,12 +27,6 @@ public:
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
|
||||
|
||||
virtual void OnPlacedByPlayer(
|
||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
|
@ -30,12 +30,6 @@ public:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
virtual const char * GetStepSound(void) override
|
||||
{
|
||||
return "step.wood";
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ class cWorldInterface
|
||||
public:
|
||||
virtual ~cWorldInterface() {}
|
||||
|
||||
virtual Int64 GetTimeOfDay(void) const = 0;
|
||||
virtual int GetTimeOfDay(void) const = 0;
|
||||
virtual Int64 GetWorldAge(void) const = 0;
|
||||
|
||||
virtual eDimension GetDimension(void) const = 0;
|
||||
@ -44,7 +44,7 @@ public:
|
||||
/** Calls the callback for each player in the list; returns true if all players processed, false if the callback aborted by returning true */
|
||||
virtual bool ForEachPlayer(cItemCallback<cPlayer> & a_Callback) = 0;
|
||||
|
||||
virtual void SetTimeOfDay(Int64 a_TimeOfDay) = 0;
|
||||
virtual void SetTimeOfDay(int a_TimeOfDay) = 0;
|
||||
|
||||
/** Returns true if it is raining, stormy or snowing at the specified location. This takes into account biomes. */
|
||||
virtual bool IsWeatherWetAt(int a_BlockX, int a_BlockZ) = 0;
|
||||
|
15
src/BuildInfo.h.cmake
Normal file
15
src/BuildInfo.h.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#cmakedefine BUILD_ID
|
||||
|
||||
#ifdef BUILD_ID
|
||||
|
||||
#undef BUILD_ID
|
||||
|
||||
#define BUILD_SERIES_NAME "@BUILD_SERIES_NAME@"
|
||||
#define BUILD_ID "@BUILD_ID@"
|
||||
#define BUILD_COMMIT_ID "@BUILD_COMMIT_ID@"
|
||||
#define BUILD_DATETIME "@BUILD_DATETIME@"
|
||||
#endif
|
||||
|
@ -75,6 +75,7 @@ SET (HDRS
|
||||
BlockInfo.h
|
||||
BlockTracer.h
|
||||
BoundingBox.h
|
||||
BuildInfo.h.cmake
|
||||
ByteBuffer.h
|
||||
ChatColor.h
|
||||
Chunk.h
|
||||
@ -140,6 +141,8 @@ include_directories(".")
|
||||
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/sqlite")
|
||||
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}/../lib/SQLiteCpp/include")
|
||||
|
||||
configure_file("BuildInfo.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/BuildInfo.h")
|
||||
|
||||
if (NOT MSVC)
|
||||
# Bindings need to reference other folders, so they are done here instead
|
||||
# lib dependencies are not included
|
||||
|
@ -2215,7 +2215,7 @@ bool cChunk::DoWithRedstonePoweredEntityAt(int a_BlockX, int a_BlockY, int a_Blo
|
||||
}
|
||||
}
|
||||
|
||||
if (a_Callback.Item((cRedstonePoweredEntity *)*itr))
|
||||
if (a_Callback.Item(dynamic_cast<cRedstonePoweredEntity *>(*itr))) // Needs dynamic_cast due to multiple inheritance
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1467,7 +1467,7 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, e
|
||||
NewBlock->OnPlacedByPlayer(ChunkInterface, *World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
|
||||
|
||||
// Step sound with 0.8f pitch is used as block placement sound
|
||||
World->BroadcastSoundEffect(NewBlock->GetStepSound(), (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0f, 0.8f);
|
||||
World->BroadcastSoundEffect(cBlockInfo::GetPlaceSound(BlockType), (double)a_BlockX, (double)a_BlockY, (double)a_BlockZ, 1.0f, 0.8f);
|
||||
cRoot::Get()->GetPluginManager()->CallHookPlayerPlacedBlock(*m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta);
|
||||
}
|
||||
|
||||
|
@ -170,8 +170,8 @@ bool cHTTPServer::Initialize(const AString & a_PortsIPv4, const AString & a_Port
|
||||
// Notify the admin about the HTTPS / HTTP status
|
||||
if (m_Cert.get() == NULL)
|
||||
{
|
||||
LOGWARNING("WebServer: The server is running in unsecure HTTP mode.");
|
||||
LOGINFO("Put a valid HTTPS certificate to file 'webadmin/httpscert.crt' and its corresponding private key to 'httpskey.pem' (without any password) to enable HTTPS support");
|
||||
LOGWARNING("WebServer: The server is running in unsecured HTTP mode.");
|
||||
LOGINFO("Put a valid HTTPS certificate in file 'webadmin/httpscert.crt' and its corresponding private key to 'webadmin/httpskey.pem' (without any password) to enable HTTPS support");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "DeadlockDetect.h"
|
||||
#include "OSSupport/Timer.h"
|
||||
#include "LoggerListeners.h"
|
||||
#include "BuildInfo.h"
|
||||
|
||||
#include "inifile/iniFile.h"
|
||||
|
||||
@ -111,6 +112,11 @@ void cRoot::Start(void)
|
||||
|
||||
LOG("--- Started Log ---\n");
|
||||
|
||||
#ifdef BUILD_ID
|
||||
LOG("MCServer " BUILD_SERIES_NAME " build id: " BUILD_ID );
|
||||
LOG("from commit id: " BUILD_COMMIT_ID " built at: " BUILD_DATETIME );
|
||||
#endif
|
||||
|
||||
cDeadlockDetect dd;
|
||||
|
||||
m_bStop = false;
|
||||
|
@ -757,6 +757,11 @@ void cWorld::InitialiseGeneratorDefaults(cIniFile & a_IniFile)
|
||||
a_IniFile.GetValueSet("Generator", "BottomLavaHeight", "30");
|
||||
break;
|
||||
}
|
||||
case dimNotSet:
|
||||
{
|
||||
ASSERT(!"Dimension not set");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -772,6 +777,7 @@ void cWorld::InitialiseAndLoadMobSpawningValues(cIniFile & a_IniFile)
|
||||
case dimOverworld: DefaultMonsters = "bat, cavespider, chicken, cow, creeper, enderman, horse, mooshroom, ocelot, pig, sheep, silverfish, skeleton, slime, spider, squid, wolf, zombie"; break;
|
||||
case dimNether: DefaultMonsters = "blaze, ghast, magmacube, skeleton, zombie, zombiepigman"; break;
|
||||
case dimEnd: DefaultMonsters = "enderman"; break;
|
||||
case dimNotSet: ASSERT(!"Dimension not set"); break;
|
||||
}
|
||||
|
||||
m_bAnimals = a_IniFile.GetValueSetB("Monsters", "AnimalsOn", true);
|
||||
@ -876,7 +882,7 @@ void cWorld::Tick(float a_Dt, int a_LastTickDurationMSec)
|
||||
m_TimeOfDaySecs -= 1200.0;
|
||||
}
|
||||
|
||||
m_TimeOfDay = (Int64)(m_TimeOfDaySecs * 20.0);
|
||||
m_TimeOfDay = static_cast<int>(m_TimeOfDaySecs * 20.0);
|
||||
|
||||
// Updates the sky darkness based on current time of day
|
||||
UpdateSkyDarkness();
|
||||
@ -1130,7 +1136,7 @@ void cWorld::UpdateSkyDarkness(void)
|
||||
}
|
||||
else if (TempTime <= TIME_NIGHT_START)
|
||||
{
|
||||
m_SkyDarkness = (TIME_NIGHT_START - TempTime) / TIME_SPAWN_DIVISOR;
|
||||
m_SkyDarkness = static_cast<NIBBLETYPE>((TIME_NIGHT_START - TempTime) / TIME_SPAWN_DIVISOR);
|
||||
}
|
||||
else if (TempTime <= TIME_NIGHT_END)
|
||||
{
|
||||
@ -1138,7 +1144,7 @@ void cWorld::UpdateSkyDarkness(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_SkyDarkness = (TIME_SUNRISE - TempTime) / TIME_SPAWN_DIVISOR;
|
||||
m_SkyDarkness = static_cast<NIBBLETYPE>((TIME_SUNRISE - TempTime) / TIME_SPAWN_DIVISOR);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1592,9 +1598,9 @@ bool cWorld::GrowRipePlant(int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsBy
|
||||
MTRand r1;
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
int OfsX = (r1.randInt(3) + r1.randInt(3) + r1.randInt(3) + r1.randInt(3)) / 2 - 3;
|
||||
int OfsY = r1.randInt(3) + r1.randInt(3) - 3;
|
||||
int OfsZ = (r1.randInt(3) + r1.randInt(3) + r1.randInt(3) + r1.randInt(3)) / 2 - 3;
|
||||
int OfsX = static_cast<int>(r1.randInt(3) + r1.randInt(3) + r1.randInt(3) + r1.randInt(3)) / 2 - 3;
|
||||
int OfsY = static_cast<int>(r1.randInt(3) + r1.randInt(3)) - 3;
|
||||
int OfsZ = static_cast<int>(r1.randInt(3) + r1.randInt(3) + r1.randInt(3) + r1.randInt(3)) / 2 - 3;
|
||||
BLOCKTYPE Ground = GetBlock(a_BlockX + OfsX, a_BlockY + OfsY, a_BlockZ + OfsZ);
|
||||
if (Ground != E_BLOCK_GRASS)
|
||||
{
|
||||
@ -2844,7 +2850,7 @@ bool cWorld::SetCommandBlockCommand(int a_BlockX, int a_BlockY, int a_BlockZ, co
|
||||
{
|
||||
AString m_Command;
|
||||
public:
|
||||
cUpdateCommandBlock(const AString & a_Command) : m_Command(a_Command) {}
|
||||
cUpdateCommandBlock(const AString & a_CallbackCommand) : m_Command(a_CallbackCommand) {}
|
||||
|
||||
virtual bool Item(cCommandBlockEntity * a_CommandBlock) override
|
||||
{
|
||||
@ -3319,20 +3325,26 @@ cFluidSimulator * cWorld::InitializeFluidSimulator(cIniFile & a_IniFile, const c
|
||||
int Falloff = a_IniFile.GetValueSetI(SimulatorSectionName, "Falloff", IsWater ? 1 : 2);
|
||||
int TickDelay = a_IniFile.GetValueSetI(SimulatorSectionName, "TickDelay", IsWater ? 5 : 30);
|
||||
int NumNeighborsForSource = a_IniFile.GetValueSetI(SimulatorSectionName, "NumNeighborsForSource", IsWater ? 2 : -1);
|
||||
|
||||
if ((Falloff > 15) || (Falloff < 0))
|
||||
{
|
||||
LOGWARNING("Falloff for %s simulator is out of range, assuming default of %d", a_FluidName, IsWater ? 1 : 2);
|
||||
Falloff = IsWater ? 1 : 2;
|
||||
}
|
||||
|
||||
if (NoCaseCompare(SimulatorName, "floody") == 0)
|
||||
{
|
||||
res = new cFloodyFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, Falloff, TickDelay, NumNeighborsForSource);
|
||||
res = new cFloodyFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, static_cast<NIBBLETYPE>(Falloff), TickDelay, NumNeighborsForSource);
|
||||
}
|
||||
else if (NoCaseCompare(SimulatorName, "vanilla") == 0)
|
||||
{
|
||||
res = new cVanillaFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, Falloff, TickDelay, NumNeighborsForSource);
|
||||
res = new cVanillaFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, static_cast<NIBBLETYPE>(Falloff), TickDelay, NumNeighborsForSource);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The simulator name doesn't match anything we have, issue a warning:
|
||||
LOGWARNING("%s [Physics]:%s specifies an unknown simulator, using the default \"Vanilla\".", GetIniFileName().c_str(), SimulatorNameKey.c_str());
|
||||
res = new cVanillaFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, Falloff, TickDelay, NumNeighborsForSource);
|
||||
res = new cVanillaFluidSimulator(*this, a_SimulateBlock, a_StationaryBlock, static_cast<NIBBLETYPE>(Falloff), TickDelay, NumNeighborsForSource);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3442,9 +3454,9 @@ void cWorld::cTaskSendBlockToAllPlayers::Run(cWorld & a_World)
|
||||
public cPlayerListCallback
|
||||
{
|
||||
public:
|
||||
cPlayerCallback(std::vector<Vector3i> & a_SendQueue, cWorld & a_World) :
|
||||
cPlayerCallback(std::vector<Vector3i> & a_SendQueue, cWorld & a_CallbackWorld) :
|
||||
m_SendQueue(a_SendQueue),
|
||||
m_World(a_World)
|
||||
m_World(a_CallbackWorld)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -157,14 +157,14 @@ public:
|
||||
}
|
||||
|
||||
virtual Int64 GetWorldAge (void) const override { return m_WorldAge; }
|
||||
virtual Int64 GetTimeOfDay(void) const override { return m_TimeOfDay; }
|
||||
virtual int GetTimeOfDay(void) const override { return m_TimeOfDay; }
|
||||
|
||||
void SetTicksUntilWeatherChange(int a_WeatherInterval)
|
||||
{
|
||||
m_WeatherInterval = a_WeatherInterval;
|
||||
}
|
||||
|
||||
virtual void SetTimeOfDay(Int64 a_TimeOfDay) override
|
||||
virtual void SetTimeOfDay(int a_TimeOfDay) override
|
||||
{
|
||||
m_TimeOfDay = a_TimeOfDay;
|
||||
m_TimeOfDaySecs = (double)a_TimeOfDay / 20.0;
|
||||
@ -888,7 +888,7 @@ private:
|
||||
double m_WorldAgeSecs; // World age, in seconds. Is only incremented, cannot be set by plugins.
|
||||
double m_TimeOfDaySecs; // Time of day in seconds. Can be adjusted. Is wrapped to zero each day.
|
||||
Int64 m_WorldAge; // World age in ticks, calculated off of m_WorldAgeSecs
|
||||
Int64 m_TimeOfDay; // Time in ticks, calculated off of m_TimeOfDaySecs
|
||||
int m_TimeOfDay; // Time in ticks, calculated off of m_TimeOfDaySecs
|
||||
Int64 m_LastTimeUpdate; // The tick in which the last time update has been sent.
|
||||
Int64 m_LastUnload; // The last WorldAge (in ticks) in which unloading was triggerred
|
||||
Int64 m_LastSave; // The last WorldAge (in ticks) in which save-all was triggerred
|
||||
|
Loading…
x
Reference in New Issue
Block a user