Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963)
* Fix cmake not adding Werror on clang, and _lots_ of warnings * WIP: Build fixes * Cannot make intermediate blockhandler instance * Tiger's changes * Fix BitIndex check * Handle invalid NextState values in cMultiVersionProtocol Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
This commit is contained in:
parent
23021dd828
commit
a9031b6bae
@ -111,6 +111,14 @@ function(set_global_flags)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
function (try_add_flag TARGET FLAG)
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
check_cxx_compiler_flag("${FLAG}" "HAS_FLAG_${FLAG}")
|
||||||
|
if ("${HAS_FLAG_${FLAG}}")
|
||||||
|
target_compile_options(${TARGET} PRIVATE "${FLAG}")
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
function(set_exe_flags TARGET)
|
function(set_exe_flags TARGET)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
# TODO: MSVC level 4, warnings as errors
|
# TODO: MSVC level 4, warnings as errors
|
||||||
@ -134,7 +142,7 @@ function(set_exe_flags TARGET)
|
|||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILE_ID STREQUAL "Clang")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
${TARGET} PRIVATE
|
${TARGET} PRIVATE
|
||||||
|
|
||||||
@ -155,5 +163,10 @@ function(set_exe_flags TARGET)
|
|||||||
-Wno-documentation -Wno-documentation-unknown-command -Wno-reserved-id-macro
|
-Wno-documentation -Wno-documentation-unknown-command -Wno-reserved-id-macro
|
||||||
-Wno-error=unused-command-line-argument
|
-Wno-error=unused-command-line-argument
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# We aren't using C++11
|
||||||
|
try_add_flag(${TARGET} -Wno-return-std-move-in-c++11)
|
||||||
|
# int to float conversions happen a lot, not worth fixing all warnings
|
||||||
|
try_add_flag(${TARGET} -Wno-implicit-int-float-conversion)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
22
src/Blocks/BlockAir.h
Normal file
22
src/Blocks/BlockAir.h
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockAirHandler final :
|
||||||
|
public cBlockHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using cBlockHandler::cBlockHandler;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
||||||
|
{
|
||||||
|
// Don't drop anything:
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
};
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockAnvilHandler:
|
class cBlockAnvilHandler final :
|
||||||
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
|
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
|
using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
|
||||||
|
@ -15,7 +15,7 @@ class cWorldInterface;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockBedHandler :
|
class cBlockBedHandler final :
|
||||||
public cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>
|
public cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>;
|
using Super = cYawRotator<cBlockEntityHandler, 0x03, 0x02, 0x03, 0x00, 0x01>;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockBigFlowerHandler:
|
class cBlockBigFlowerHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockBookShelfHandler :
|
class cBlockBookShelfHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockBrewingStandHandler :
|
class cBlockBrewingStandHandler final :
|
||||||
public cBlockEntityHandler
|
public cBlockEntityHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockEntityHandler;
|
using Super = cBlockEntityHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockButtonHandler :
|
class cBlockButtonHandler final :
|
||||||
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>
|
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>;
|
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, true>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCactusHandler :
|
class cBlockCactusHandler final :
|
||||||
public cClearMetaOnDrop<cBlockPlant<false>>
|
public cClearMetaOnDrop<cBlockPlant<false>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cBlockPlant<false>>;
|
using Super = cClearMetaOnDrop<cBlockPlant<false>>;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCakeHandler:
|
class cBlockCakeHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCarpetHandler:
|
class cBlockCarpetHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCauldronHandler :
|
class cBlockCauldronHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockChestHandler :
|
class cBlockChestHandler final :
|
||||||
public cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>
|
public cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
using Super = cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockClothHandler :
|
class cBlockClothHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCobWebHandler :
|
class cBlockCobWebHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCocoaPodHandler :
|
class cBlockCocoaPodHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockCommandBlockHandler :
|
class cBlockCommandBlockHandler final :
|
||||||
public cBlockEntityHandler
|
public cBlockEntityHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockEntityHandler;
|
using Super = cBlockEntityHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockComparatorHandler :
|
class cBlockComparatorHandler final :
|
||||||
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
|
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
|
using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockConcretePowderHandler :
|
class cBlockConcretePowderHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
/** Common class that takes care of beetroots, carrots, potatoes and wheat */
|
/** Common class that takes care of beetroots, carrots, potatoes and wheat */
|
||||||
template <NIBBLETYPE RipeMeta>
|
template <NIBBLETYPE RipeMeta>
|
||||||
class cBlockCropsHandler:
|
class cBlockCropsHandler final :
|
||||||
public cBlockPlant<true>
|
public cBlockPlant<true>
|
||||||
{
|
{
|
||||||
using Super = cBlockPlant<true>;
|
using Super = cBlockPlant<true>;
|
||||||
@ -22,10 +22,10 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
/** Calculate the number of seeds to drop when the crop is broken. */
|
/** Calculate the number of seeds to drop when the crop is broken. */
|
||||||
static char CalculateSeedCount(char a_Min, char a_BaseRolls, char a_FortuneLevel)
|
static char CalculateSeedCount(char a_Min, char a_BaseRolls, unsigned char a_FortuneLevel)
|
||||||
{
|
{
|
||||||
std::binomial_distribution Binomial(a_BaseRolls + a_FortuneLevel, 0.57);
|
std::binomial_distribution<> Binomial(a_BaseRolls + a_FortuneLevel, 0.57);
|
||||||
return a_Min + Binomial(GetRandomProvider().Engine());
|
return static_cast<char>(a_Min + Binomial(GetRandomProvider().Engine()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockDeadBushHandler:
|
class cBlockDeadBushHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
14
src/Blocks/BlockDefaultBlock.h
Normal file
14
src/Blocks/BlockDefaultBlock.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cDefaultBlockHandler final :
|
||||||
|
public cBlockHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using cBlockHandler::cBlockHandler;
|
||||||
|
};
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockDirtHandler :
|
class cBlockDirtHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockDoorHandler :
|
class cBlockDoorHandler final :
|
||||||
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
|
public cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
|
using Super = cYawRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x01, 0x02>;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockDropSpenserHandler :
|
class cBlockDropSpenserHandler final :
|
||||||
public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>
|
public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>
|
||||||
{
|
{
|
||||||
using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
|
using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockEnchantingTableHandler :
|
class cBlockEnchantingTableHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockEndPortalFrameHandler:
|
class cBlockEndPortalFrameHandler final :
|
||||||
public cMetaRotator<cBlockHandler, 0x03,
|
public cMetaRotator<cBlockHandler, 0x03,
|
||||||
E_META_END_PORTAL_FRAME_ZM,
|
E_META_END_PORTAL_FRAME_ZM,
|
||||||
E_META_END_PORTAL_FRAME_XP,
|
E_META_END_PORTAL_FRAME_XP,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockEnderchestHandler :
|
class cBlockEnderchestHandler final :
|
||||||
public cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>
|
public cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
using Super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
/** Wrapper for blocks that have a cBlockEntity descendant attached to them and can be "used" by the player.
|
/** Wrapper for blocks that have a cBlockEntity descendant attached to them and can be "used" by the player.
|
||||||
Forwards the "use" event to the block entity. */
|
Forwards the "use" event to the block entity. */
|
||||||
class cBlockEntityHandler:
|
class cBlockEntityHandler :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -20,6 +20,10 @@ public:
|
|||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cBlockEntityHandler() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
virtual bool OnUse(
|
virtual bool OnUse(
|
||||||
@ -34,12 +38,20 @@ private:
|
|||||||
return a_ChunkInterface.UseBlockEntity(&a_Player, a_BlockPos.x, a_BlockPos.y, a_BlockPos.z);
|
return a_ChunkInterface.UseBlockEntity(&a_Player, a_BlockPos.x, a_BlockPos.y, a_BlockPos.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool IsUseable() const override
|
virtual bool IsUseable() const override
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cDefaultBlockEntityHandler final :
|
||||||
|
public cBlockEntityHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using cBlockEntityHandler::cBlockEntityHandler;
|
||||||
|
};
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFarmlandHandler :
|
class cBlockFarmlandHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFenceHandler:
|
class cBlockFenceHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFenceGateHandler :
|
class cBlockFenceGateHandler final :
|
||||||
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>
|
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>;
|
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x02, 0x03, 0x00, 0x01>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFireHandler :
|
class cBlockFireHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFlowerHandler:
|
class cBlockFlowerHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFlowerPotHandler :
|
class cBlockFlowerPotHandler final :
|
||||||
public cBlockEntityHandler
|
public cBlockEntityHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockEntityHandler;
|
using Super = cBlockEntityHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFluidHandler:
|
class cBlockFluidHandler :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -16,6 +16,10 @@ public:
|
|||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cBlockFluidHandler() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
||||||
@ -32,44 +36,13 @@ private:
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
|
|
||||||
{
|
|
||||||
UNUSED(a_Meta);
|
|
||||||
if (IsBlockWater(m_BlockType))
|
|
||||||
{
|
|
||||||
return 12;
|
|
||||||
}
|
|
||||||
ASSERT(!"Unhandled blocktype in fluid/water handler!");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool CanSustainPlant(BLOCKTYPE a_Plant) const override
|
|
||||||
{
|
|
||||||
return (
|
|
||||||
(a_Plant == E_BLOCK_BEETROOTS) ||
|
|
||||||
(a_Plant == E_BLOCK_CROPS) ||
|
|
||||||
(a_Plant == E_BLOCK_CARROTS) ||
|
|
||||||
(a_Plant == E_BLOCK_POTATOES) ||
|
|
||||||
(a_Plant == E_BLOCK_MELON_STEM) ||
|
|
||||||
(a_Plant == E_BLOCK_PUMPKIN_STEM)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockLavaHandler:
|
class cBlockLavaHandler final :
|
||||||
public cBlockFluidHandler
|
public cBlockFluidHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockFluidHandler;
|
using Super = cBlockFluidHandler;
|
||||||
@ -173,3 +146,36 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockWaterHandler final :
|
||||||
|
public cBlockFluidHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using cBlockFluidHandler::cBlockFluidHandler;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
|
||||||
|
{
|
||||||
|
UNUSED(a_Meta);
|
||||||
|
if (IsBlockWater(m_BlockType))
|
||||||
|
{
|
||||||
|
return 12;
|
||||||
|
}
|
||||||
|
ASSERT(!"Unhandled blocktype in fluid/water handler!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual bool CanSustainPlant(BLOCKTYPE a_Plant) const override
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
(a_Plant == E_BLOCK_BEETROOTS) ||
|
||||||
|
(a_Plant == E_BLOCK_CROPS) ||
|
||||||
|
(a_Plant == E_BLOCK_CARROTS) ||
|
||||||
|
(a_Plant == E_BLOCK_POTATOES) ||
|
||||||
|
(a_Plant == E_BLOCK_MELON_STEM) ||
|
||||||
|
(a_Plant == E_BLOCK_PUMPKIN_STEM)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockFurnaceHandler :
|
class cBlockFurnaceHandler final :
|
||||||
public cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>
|
public cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
using Super = cYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockGlassHandler :
|
class cBlockGlassHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
18
src/Blocks/BlockGlazedTerracotta.h
Normal file
18
src/Blocks/BlockGlazedTerracotta.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Mixins.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockGlazedTerracottaHandler final :
|
||||||
|
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>
|
||||||
|
{
|
||||||
|
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
using Super::Super;
|
||||||
|
};
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockGlowstoneHandler :
|
class cBlockGlowstoneHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockGrassHandler :
|
class cBlockGrassHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockGravelHandler :
|
class cBlockGravelHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "../World.h"
|
#include "../World.h"
|
||||||
#include "../Chunk.h"
|
#include "../Chunk.h"
|
||||||
#include "BlockPluginInterface.h"
|
#include "BlockPluginInterface.h"
|
||||||
|
#include "BlockAir.h"
|
||||||
#include "BlockAnvil.h"
|
#include "BlockAnvil.h"
|
||||||
#include "BlockBed.h"
|
#include "BlockBed.h"
|
||||||
#include "BlockBigFlower.h"
|
#include "BlockBigFlower.h"
|
||||||
@ -24,12 +25,13 @@
|
|||||||
#include "BlockConcretePowder.h"
|
#include "BlockConcretePowder.h"
|
||||||
#include "BlockCrops.h"
|
#include "BlockCrops.h"
|
||||||
#include "BlockDeadBush.h"
|
#include "BlockDeadBush.h"
|
||||||
|
#include "BlockDefaultBlock.h"
|
||||||
#include "BlockDirt.h"
|
#include "BlockDirt.h"
|
||||||
#include "BlockDoor.h"
|
#include "BlockDoor.h"
|
||||||
#include "BlockDropSpenser.h"
|
#include "BlockDropSpenser.h"
|
||||||
#include "BlockEnchantingTable.h"
|
#include "BlockEnchantingTable.h"
|
||||||
#include "BlockEnderchest.h"
|
|
||||||
#include "BlockEndPortalFrame.h"
|
#include "BlockEndPortalFrame.h"
|
||||||
|
#include "BlockEnderchest.h"
|
||||||
#include "BlockEntity.h"
|
#include "BlockEntity.h"
|
||||||
#include "BlockFarmland.h"
|
#include "BlockFarmland.h"
|
||||||
#include "BlockFence.h"
|
#include "BlockFence.h"
|
||||||
@ -40,41 +42,38 @@
|
|||||||
#include "BlockFluid.h"
|
#include "BlockFluid.h"
|
||||||
#include "BlockFurnace.h"
|
#include "BlockFurnace.h"
|
||||||
#include "BlockGlass.h"
|
#include "BlockGlass.h"
|
||||||
|
#include "BlockGlazedTerracotta.h"
|
||||||
#include "BlockGlowstone.h"
|
#include "BlockGlowstone.h"
|
||||||
#include "BlockGrass.h"
|
#include "BlockGrass.h"
|
||||||
#include "BlockGravel.h"
|
#include "BlockGravel.h"
|
||||||
#include "BlockMobHead.h"
|
|
||||||
#include "BlockHopper.h"
|
#include "BlockHopper.h"
|
||||||
#include "BlockIce.h"
|
#include "BlockIce.h"
|
||||||
#include "BlockJukebox.h"
|
#include "BlockJukebox.h"
|
||||||
#include "BlockLadder.h"
|
#include "BlockLadder.h"
|
||||||
#include "BlockLeaves.h"
|
#include "BlockLeaves.h"
|
||||||
#include "BlockLilypad.h"
|
|
||||||
#include "BlockLever.h"
|
#include "BlockLever.h"
|
||||||
|
#include "BlockLilypad.h"
|
||||||
#include "BlockMelon.h"
|
#include "BlockMelon.h"
|
||||||
|
#include "BlockMobHead.h"
|
||||||
#include "BlockMobSpawner.h"
|
#include "BlockMobSpawner.h"
|
||||||
#include "BlockMushroom.h"
|
#include "BlockMushroom.h"
|
||||||
#include "BlockMycelium.h"
|
#include "BlockMycelium.h"
|
||||||
#include "BlockNetherrack.h"
|
|
||||||
#include "BlockNetherWart.h"
|
#include "BlockNetherWart.h"
|
||||||
|
#include "BlockNetherrack.h"
|
||||||
#include "BlockObserver.h"
|
#include "BlockObserver.h"
|
||||||
#include "BlockOre.h"
|
#include "BlockOre.h"
|
||||||
#include "BlockPackedIce.h"
|
#include "BlockPackedIce.h"
|
||||||
#include "BlockPiston.h"
|
#include "BlockPiston.h"
|
||||||
#include "BlockPlanks.h"
|
#include "BlockPlanks.h"
|
||||||
#include "BlockPortal.h"
|
#include "BlockPortal.h"
|
||||||
#include "BlockPumpkin.h"
|
|
||||||
#include "BlockPressurePlate.h"
|
#include "BlockPressurePlate.h"
|
||||||
|
#include "BlockPumpkin.h"
|
||||||
#include "BlockQuartz.h"
|
#include "BlockQuartz.h"
|
||||||
#include "BlockRail.h"
|
#include "BlockRail.h"
|
||||||
#include "BlockRedstone.h"
|
#include "BlockRedstone.h"
|
||||||
#include "BlockRedstoneLamp.h"
|
#include "BlockRedstoneLamp.h"
|
||||||
#include "BlockRedstoneOre.h"
|
#include "BlockRedstoneOre.h"
|
||||||
#include "BlockRedstoneRepeater.h"
|
#include "BlockRedstoneRepeater.h"
|
||||||
#include "BlockRedstoneTorch.h"
|
|
||||||
#include "BlockTNT.h"
|
|
||||||
#include "BlockTripwire.h"
|
|
||||||
#include "BlockTripwireHook.h"
|
|
||||||
#include "BlockSand.h"
|
#include "BlockSand.h"
|
||||||
#include "BlockSapling.h"
|
#include "BlockSapling.h"
|
||||||
#include "BlockSeaLantern.h"
|
#include "BlockSeaLantern.h"
|
||||||
@ -88,9 +87,12 @@
|
|||||||
#include "BlockStems.h"
|
#include "BlockStems.h"
|
||||||
#include "BlockStone.h"
|
#include "BlockStone.h"
|
||||||
#include "BlockSugarcane.h"
|
#include "BlockSugarcane.h"
|
||||||
|
#include "BlockTNT.h"
|
||||||
#include "BlockTallGrass.h"
|
#include "BlockTallGrass.h"
|
||||||
#include "BlockTorch.h"
|
#include "BlockTorch.h"
|
||||||
#include "BlockTrapdoor.h"
|
#include "BlockTrapdoor.h"
|
||||||
|
#include "BlockTripwire.h"
|
||||||
|
#include "BlockTripwireHook.h"
|
||||||
#include "BlockVine.h"
|
#include "BlockVine.h"
|
||||||
#include "BlockWallSign.h"
|
#include "BlockWallSign.h"
|
||||||
#include "BlockWorkbench.h"
|
#include "BlockWorkbench.h"
|
||||||
@ -99,12 +101,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
using cBlockGlazedTerracottaHandler = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// Tests the meta rotation and mirroring.
|
// Tests the meta rotation and mirroring.
|
||||||
// Note that the cMetaRotator needs to have its assert paths disabled for this test to work!
|
// Note that the cMetaRotator needs to have its assert paths disabled for this test to work!
|
||||||
@ -200,12 +196,12 @@ namespace
|
|||||||
constexpr cBlockStairsHandler BlockAcaciaWoodStairsHandler (E_BLOCK_ACACIA_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockAcaciaWoodStairsHandler (E_BLOCK_ACACIA_WOOD_STAIRS);
|
||||||
constexpr cBlockRailHandler BlockActivatorRailHandler (E_BLOCK_ACTIVATOR_RAIL);
|
constexpr cBlockRailHandler BlockActivatorRailHandler (E_BLOCK_ACTIVATOR_RAIL);
|
||||||
constexpr cBlockComparatorHandler BlockActiveComparatorHandler (E_BLOCK_ACTIVE_COMPARATOR);
|
constexpr cBlockComparatorHandler BlockActiveComparatorHandler (E_BLOCK_ACTIVE_COMPARATOR);
|
||||||
constexpr cBlockWithNoDrops<> BlockAirHandler (E_BLOCK_AIR);
|
constexpr cBlockAirHandler BlockAirHandler (E_BLOCK_AIR);
|
||||||
constexpr cBlockAnvilHandler BlockAnvilHandler (E_BLOCK_ANVIL);
|
constexpr cBlockAnvilHandler BlockAnvilHandler (E_BLOCK_ANVIL);
|
||||||
constexpr cBlockHandler BlockBarrierHandler (E_BLOCK_BARRIER);
|
constexpr cDefaultBlockHandler BlockBarrierHandler (E_BLOCK_BARRIER);
|
||||||
constexpr cBlockEntityHandler BlockBeaconHandler (E_BLOCK_BEACON);
|
constexpr cDefaultBlockEntityHandler BlockBeaconHandler (E_BLOCK_BEACON);
|
||||||
constexpr cBlockBedHandler BlockBedHandler (E_BLOCK_BED);
|
constexpr cBlockBedHandler BlockBedHandler (E_BLOCK_BED);
|
||||||
constexpr cBlockHandler BlockBedrockHandler (E_BLOCK_BEDROCK);
|
constexpr cDefaultBlockHandler BlockBedrockHandler (E_BLOCK_BEDROCK);
|
||||||
constexpr cBlockCropsHandler<3> BlockBeetrootsHandler (E_BLOCK_BEETROOTS); // 4 stages of growth
|
constexpr cBlockCropsHandler<3> BlockBeetrootsHandler (E_BLOCK_BEETROOTS); // 4 stages of growth
|
||||||
constexpr cBlockBigFlowerHandler BlockBigFlowerHandler (E_BLOCK_BIG_FLOWER);
|
constexpr cBlockBigFlowerHandler BlockBigFlowerHandler (E_BLOCK_BIG_FLOWER);
|
||||||
constexpr cBlockDoorHandler BlockBirchDoorHandler (E_BLOCK_BIRCH_DOOR);
|
constexpr cBlockDoorHandler BlockBirchDoorHandler (E_BLOCK_BIRCH_DOOR);
|
||||||
@ -213,19 +209,19 @@ namespace
|
|||||||
constexpr cBlockFenceHandler BlockBirchFenceHandler (E_BLOCK_BIRCH_FENCE);
|
constexpr cBlockFenceHandler BlockBirchFenceHandler (E_BLOCK_BIRCH_FENCE);
|
||||||
constexpr cBlockStairsHandler BlockBirchWoodStairsHandler (E_BLOCK_BIRCH_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockBirchWoodStairsHandler (E_BLOCK_BIRCH_WOOD_STAIRS);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockBlackGlazedTerracottaHandler (E_BLOCK_BLACK_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockBlackGlazedTerracottaHandler (E_BLOCK_BLACK_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockBlackShulkerBoxHandler (E_BLOCK_BLACK_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockBlackShulkerBoxHandler (E_BLOCK_BLACK_SHULKER_BOX);
|
||||||
constexpr cBlockHandler BlockBlockOfCoalHandler (E_BLOCK_BLOCK_OF_COAL);
|
constexpr cDefaultBlockHandler BlockBlockOfCoalHandler (E_BLOCK_BLOCK_OF_COAL);
|
||||||
constexpr cBlockHandler BlockBlockOfRedstoneHandler (E_BLOCK_BLOCK_OF_REDSTONE);
|
constexpr cDefaultBlockHandler BlockBlockOfRedstoneHandler (E_BLOCK_BLOCK_OF_REDSTONE);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockBlueGlazedTerracottaHandler (E_BLOCK_BLUE_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockBlueGlazedTerracottaHandler (E_BLOCK_BLUE_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockBlueShulkerBoxHandler (E_BLOCK_BLUE_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockBlueShulkerBoxHandler (E_BLOCK_BLUE_SHULKER_BOX);
|
||||||
constexpr cBlockHandler BlockBoneBlockHandler (E_BLOCK_BONE_BLOCK);
|
constexpr cDefaultBlockHandler BlockBoneBlockHandler (E_BLOCK_BONE_BLOCK);
|
||||||
constexpr cBlockBookShelfHandler BlockBookcaseHandler (E_BLOCK_BOOKCASE);
|
constexpr cBlockBookShelfHandler BlockBookcaseHandler (E_BLOCK_BOOKCASE);
|
||||||
constexpr cBlockBrewingStandHandler BlockBrewingStandHandler (E_BLOCK_BREWING_STAND);
|
constexpr cBlockBrewingStandHandler BlockBrewingStandHandler (E_BLOCK_BREWING_STAND);
|
||||||
constexpr cBlockHandler BlockBrickHandler (E_BLOCK_BRICK);
|
constexpr cDefaultBlockHandler BlockBrickHandler (E_BLOCK_BRICK);
|
||||||
constexpr cBlockStairsHandler BlockBrickStairsHandler (E_BLOCK_BRICK_STAIRS);
|
constexpr cBlockStairsHandler BlockBrickStairsHandler (E_BLOCK_BRICK_STAIRS);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockBrownGlazedTerracottaHandler (E_BLOCK_BROWN_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockBrownGlazedTerracottaHandler (E_BLOCK_BROWN_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockMushroomHandler BlockBrownMushroomHandler (E_BLOCK_BROWN_MUSHROOM);
|
constexpr cBlockMushroomHandler BlockBrownMushroomHandler (E_BLOCK_BROWN_MUSHROOM);
|
||||||
constexpr cBlockHandler BlockBrownShulkerBoxHandler (E_BLOCK_BROWN_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockBrownShulkerBoxHandler (E_BLOCK_BROWN_SHULKER_BOX);
|
||||||
constexpr cBlockCactusHandler BlockCactusHandler (E_BLOCK_CACTUS);
|
constexpr cBlockCactusHandler BlockCactusHandler (E_BLOCK_CACTUS);
|
||||||
constexpr cBlockCakeHandler BlockCakeHandler (E_BLOCK_CAKE);
|
constexpr cBlockCakeHandler BlockCakeHandler (E_BLOCK_CAKE);
|
||||||
constexpr cBlockCarpetHandler BlockCarpetHandler (E_BLOCK_CARPET);
|
constexpr cBlockCarpetHandler BlockCarpetHandler (E_BLOCK_CARPET);
|
||||||
@ -233,46 +229,46 @@ namespace
|
|||||||
constexpr cBlockCauldronHandler BlockCauldronHandler (E_BLOCK_CAULDRON);
|
constexpr cBlockCauldronHandler BlockCauldronHandler (E_BLOCK_CAULDRON);
|
||||||
constexpr cBlockCommandBlockHandler BlockChainCommandBlockHandler (E_BLOCK_CHAIN_COMMAND_BLOCK);
|
constexpr cBlockCommandBlockHandler BlockChainCommandBlockHandler (E_BLOCK_CHAIN_COMMAND_BLOCK);
|
||||||
constexpr cBlockChestHandler BlockChestHandler (E_BLOCK_CHEST);
|
constexpr cBlockChestHandler BlockChestHandler (E_BLOCK_CHEST);
|
||||||
constexpr cBlockHandler BlockChorusFlowerHandler (E_BLOCK_CHORUS_FLOWER);
|
constexpr cDefaultBlockHandler BlockChorusFlowerHandler (E_BLOCK_CHORUS_FLOWER);
|
||||||
constexpr cBlockHandler BlockChorusPlantHandler (E_BLOCK_CHORUS_PLANT);
|
constexpr cDefaultBlockHandler BlockChorusPlantHandler (E_BLOCK_CHORUS_PLANT);
|
||||||
constexpr cBlockOreHandler BlockClayHandler (E_BLOCK_CLAY);
|
constexpr cDefaultOreHandler BlockClayHandler (E_BLOCK_CLAY);
|
||||||
constexpr cBlockOreHandler BlockCoalOreHandler (E_BLOCK_COAL_ORE);
|
constexpr cDefaultOreHandler BlockCoalOreHandler (E_BLOCK_COAL_ORE);
|
||||||
constexpr cBlockStoneHandler BlockCobblestoneHandler (E_BLOCK_COBBLESTONE);
|
constexpr cBlockStoneHandler BlockCobblestoneHandler (E_BLOCK_COBBLESTONE);
|
||||||
constexpr cBlockStairsHandler BlockCobblestoneStairsHandler (E_BLOCK_COBBLESTONE_STAIRS);
|
constexpr cBlockStairsHandler BlockCobblestoneStairsHandler (E_BLOCK_COBBLESTONE_STAIRS);
|
||||||
constexpr cBlockHandler BlockCobblestoneWallHandler (E_BLOCK_COBBLESTONE_WALL);
|
constexpr cDefaultBlockHandler BlockCobblestoneWallHandler (E_BLOCK_COBBLESTONE_WALL);
|
||||||
constexpr cBlockCobWebHandler BlockCobwebHandler (E_BLOCK_COBWEB);
|
constexpr cBlockCobWebHandler BlockCobwebHandler (E_BLOCK_COBWEB);
|
||||||
constexpr cBlockCocoaPodHandler BlockCocoaPodHandler (E_BLOCK_COCOA_POD);
|
constexpr cBlockCocoaPodHandler BlockCocoaPodHandler (E_BLOCK_COCOA_POD);
|
||||||
constexpr cBlockCommandBlockHandler BlockCommandBlockHandler (E_BLOCK_COMMAND_BLOCK);
|
constexpr cBlockCommandBlockHandler BlockCommandBlockHandler (E_BLOCK_COMMAND_BLOCK);
|
||||||
constexpr cBlockHandler BlockConcreteHandler (E_BLOCK_CONCRETE);
|
constexpr cDefaultBlockHandler BlockConcreteHandler (E_BLOCK_CONCRETE);
|
||||||
constexpr cBlockConcretePowderHandler BlockConcretePowderHandler (E_BLOCK_CONCRETE_POWDER);
|
constexpr cBlockConcretePowderHandler BlockConcretePowderHandler (E_BLOCK_CONCRETE_POWDER);
|
||||||
constexpr cBlockCropsHandler<7> BlockCropsHandler (E_BLOCK_CROPS); // 8 stages of growth
|
constexpr cBlockCropsHandler<7> BlockCropsHandler (E_BLOCK_CROPS); // 8 stages of growth
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockCyanGlazedTerracottaHandler (E_BLOCK_CYAN_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockCyanGlazedTerracottaHandler (E_BLOCK_CYAN_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockCyanShulkerBoxHandler (E_BLOCK_CYAN_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockCyanShulkerBoxHandler (E_BLOCK_CYAN_SHULKER_BOX);
|
||||||
constexpr cBlockDoorHandler BlockDarkOakDoorHandler (E_BLOCK_DARK_OAK_DOOR);
|
constexpr cBlockDoorHandler BlockDarkOakDoorHandler (E_BLOCK_DARK_OAK_DOOR);
|
||||||
constexpr cBlockFenceGateHandler BlockDarkOakFenceGateHandler (E_BLOCK_DARK_OAK_FENCE_GATE);
|
constexpr cBlockFenceGateHandler BlockDarkOakFenceGateHandler (E_BLOCK_DARK_OAK_FENCE_GATE);
|
||||||
constexpr cBlockFenceHandler BlockDarkOakFenceHandler (E_BLOCK_DARK_OAK_FENCE);
|
constexpr cBlockFenceHandler BlockDarkOakFenceHandler (E_BLOCK_DARK_OAK_FENCE);
|
||||||
constexpr cBlockStairsHandler BlockDarkOakWoodStairsHandler (E_BLOCK_DARK_OAK_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockDarkOakWoodStairsHandler (E_BLOCK_DARK_OAK_WOOD_STAIRS);
|
||||||
constexpr cBlockHandler BlockDaylightSensorHandler (E_BLOCK_DAYLIGHT_SENSOR);
|
constexpr cDefaultBlockHandler BlockDaylightSensorHandler (E_BLOCK_DAYLIGHT_SENSOR);
|
||||||
constexpr cBlockDeadBushHandler BlockDeadBushHandler (E_BLOCK_DEAD_BUSH);
|
constexpr cBlockDeadBushHandler BlockDeadBushHandler (E_BLOCK_DEAD_BUSH);
|
||||||
constexpr cBlockRailHandler BlockDetectorRailHandler (E_BLOCK_DETECTOR_RAIL);
|
constexpr cBlockRailHandler BlockDetectorRailHandler (E_BLOCK_DETECTOR_RAIL);
|
||||||
constexpr cBlockHandler BlockDiamondBlockHandler (E_BLOCK_DIAMOND_BLOCK);
|
constexpr cDefaultBlockHandler BlockDiamondBlockHandler (E_BLOCK_DIAMOND_BLOCK);
|
||||||
constexpr cBlockOreHandler BlockDiamondOreHandler (E_BLOCK_DIAMOND_ORE);
|
constexpr cDefaultOreHandler BlockDiamondOreHandler (E_BLOCK_DIAMOND_ORE);
|
||||||
constexpr cBlockDirtHandler BlockDirtHandler (E_BLOCK_DIRT);
|
constexpr cBlockDirtHandler BlockDirtHandler (E_BLOCK_DIRT);
|
||||||
constexpr cBlockDropSpenserHandler BlockDispenserHandler (E_BLOCK_DISPENSER);
|
constexpr cBlockDropSpenserHandler BlockDispenserHandler (E_BLOCK_DISPENSER);
|
||||||
constexpr cBlockDoubleSlabHandler BlockDoubleRedSandstoneSlabHandler(E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB);
|
constexpr cBlockDoubleSlabHandler BlockDoubleRedSandstoneSlabHandler(E_BLOCK_DOUBLE_RED_SANDSTONE_SLAB);
|
||||||
constexpr cBlockDoubleSlabHandler BlockDoubleStoneSlabHandler (E_BLOCK_DOUBLE_STONE_SLAB);
|
constexpr cBlockDoubleSlabHandler BlockDoubleStoneSlabHandler (E_BLOCK_DOUBLE_STONE_SLAB);
|
||||||
constexpr cBlockDoubleSlabHandler BlockDoubleWoodenSlabHandler (E_BLOCK_DOUBLE_WOODEN_SLAB);
|
constexpr cBlockDoubleSlabHandler BlockDoubleWoodenSlabHandler (E_BLOCK_DOUBLE_WOODEN_SLAB);
|
||||||
constexpr cBlockHandler BlockDragonEggHandler (E_BLOCK_DRAGON_EGG);
|
constexpr cDefaultBlockHandler BlockDragonEggHandler (E_BLOCK_DRAGON_EGG);
|
||||||
constexpr cBlockDropSpenserHandler BlockDropperHandler (E_BLOCK_DROPPER);
|
constexpr cBlockDropSpenserHandler BlockDropperHandler (E_BLOCK_DROPPER);
|
||||||
constexpr cBlockHandler BlockEmeraldBlockHandler (E_BLOCK_EMERALD_BLOCK);
|
constexpr cDefaultBlockHandler BlockEmeraldBlockHandler (E_BLOCK_EMERALD_BLOCK);
|
||||||
constexpr cBlockOreHandler BlockEmeraldOreHandler (E_BLOCK_EMERALD_ORE);
|
constexpr cDefaultOreHandler BlockEmeraldOreHandler (E_BLOCK_EMERALD_ORE);
|
||||||
constexpr cBlockEnchantingTableHandler BlockEnchantingTableHandler (E_BLOCK_ENCHANTMENT_TABLE);
|
constexpr cBlockEnchantingTableHandler BlockEnchantingTableHandler (E_BLOCK_ENCHANTMENT_TABLE);
|
||||||
constexpr cBlockHandler BlockEndBricksHandler (E_BLOCK_END_BRICKS);
|
constexpr cDefaultBlockHandler BlockEndBricksHandler (E_BLOCK_END_BRICKS);
|
||||||
constexpr cBlockHandler BlockEndGatewayHandler (E_BLOCK_END_GATEWAY);
|
constexpr cDefaultBlockHandler BlockEndGatewayHandler (E_BLOCK_END_GATEWAY);
|
||||||
constexpr cBlockEndPortalFrameHandler BlockEndPortalFrameHandler (E_BLOCK_END_PORTAL_FRAME);
|
constexpr cBlockEndPortalFrameHandler BlockEndPortalFrameHandler (E_BLOCK_END_PORTAL_FRAME);
|
||||||
constexpr cBlockHandler BlockEndPortalHandler (E_BLOCK_END_PORTAL);
|
constexpr cDefaultBlockHandler BlockEndPortalHandler (E_BLOCK_END_PORTAL);
|
||||||
constexpr cBlockHandler BlockEndRodHandler (E_BLOCK_END_ROD);
|
constexpr cDefaultBlockHandler BlockEndRodHandler (E_BLOCK_END_ROD);
|
||||||
constexpr cBlockHandler BlockEndStoneHandler (E_BLOCK_END_STONE);
|
constexpr cDefaultBlockHandler BlockEndStoneHandler (E_BLOCK_END_STONE);
|
||||||
constexpr cBlockEnderchestHandler BlockEnderChestHandler (E_BLOCK_ENDER_CHEST);
|
constexpr cBlockEnderchestHandler BlockEnderChestHandler (E_BLOCK_ENDER_CHEST);
|
||||||
constexpr cBlockFarmlandHandler BlockFarmlandHandler (E_BLOCK_FARMLAND);
|
constexpr cBlockFarmlandHandler BlockFarmlandHandler (E_BLOCK_FARMLAND);
|
||||||
constexpr cBlockFenceHandler BlockFenceHandler (E_BLOCK_FENCE);
|
constexpr cBlockFenceHandler BlockFenceHandler (E_BLOCK_FENCE);
|
||||||
@ -283,29 +279,29 @@ namespace
|
|||||||
constexpr cBlockGlassHandler BlockGlassHandler (E_BLOCK_GLASS);
|
constexpr cBlockGlassHandler BlockGlassHandler (E_BLOCK_GLASS);
|
||||||
constexpr cBlockGlassHandler BlockGlassPaneHandler (E_BLOCK_GLASS_PANE);
|
constexpr cBlockGlassHandler BlockGlassPaneHandler (E_BLOCK_GLASS_PANE);
|
||||||
constexpr cBlockGlowstoneHandler BlockGlowstoneHandler (E_BLOCK_GLOWSTONE);
|
constexpr cBlockGlowstoneHandler BlockGlowstoneHandler (E_BLOCK_GLOWSTONE);
|
||||||
constexpr cBlockHandler BlockGoldBlockHandler (E_BLOCK_GOLD_BLOCK);
|
constexpr cDefaultBlockHandler BlockGoldBlockHandler (E_BLOCK_GOLD_BLOCK);
|
||||||
constexpr cBlockOreHandler BlockGoldOreHandler (E_BLOCK_GOLD_ORE);
|
constexpr cDefaultOreHandler BlockGoldOreHandler (E_BLOCK_GOLD_ORE);
|
||||||
constexpr cBlockGrassHandler BlockGrassHandler (E_BLOCK_GRASS);
|
constexpr cBlockGrassHandler BlockGrassHandler (E_BLOCK_GRASS);
|
||||||
constexpr cBlockHandler BlockGrassPathHandler (E_BLOCK_GRASS_PATH);
|
constexpr cDefaultBlockHandler BlockGrassPathHandler (E_BLOCK_GRASS_PATH);
|
||||||
constexpr cBlockGravelHandler BlockGravelHandler (E_BLOCK_GRAVEL);
|
constexpr cBlockGravelHandler BlockGravelHandler (E_BLOCK_GRAVEL);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockGrayGlazedTerracottaHandler (E_BLOCK_GRAY_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockGrayGlazedTerracottaHandler (E_BLOCK_GRAY_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockGrayShulkerBoxHandler (E_BLOCK_GRAY_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockGrayShulkerBoxHandler (E_BLOCK_GRAY_SHULKER_BOX);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockGreenGlazedTerracottaHandler (E_BLOCK_GREEN_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockGreenGlazedTerracottaHandler (E_BLOCK_GREEN_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockGreenShulkerBoxHandler (E_BLOCK_GREEN_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockGreenShulkerBoxHandler (E_BLOCK_GREEN_SHULKER_BOX);
|
||||||
constexpr cBlockHandler BlockHardenedClayHandler (E_BLOCK_HARDENED_CLAY);
|
constexpr cDefaultBlockHandler BlockHardenedClayHandler (E_BLOCK_HARDENED_CLAY);
|
||||||
constexpr cBlockSidewaysHandler BlockHayBaleHandler (E_BLOCK_HAY_BALE);
|
constexpr cBlockSidewaysHandler BlockHayBaleHandler (E_BLOCK_HAY_BALE);
|
||||||
constexpr cBlockMobHeadHandler BlockHeadHandler (E_BLOCK_HEAD);
|
constexpr cBlockMobHeadHandler BlockHeadHandler (E_BLOCK_HEAD);
|
||||||
constexpr cBlockPressurePlateHandler BlockHeavyWeightedPressurePHandler(E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE);
|
constexpr cBlockPressurePlateHandler BlockHeavyWeightedPressurePHandler(E_BLOCK_HEAVY_WEIGHTED_PRESSURE_PLATE);
|
||||||
constexpr cBlockHopperHandler BlockHopperHandler (E_BLOCK_HOPPER);
|
constexpr cBlockHopperHandler BlockHopperHandler (E_BLOCK_HOPPER);
|
||||||
constexpr cBlockHandler BlockHugeBrownMushroomHandler (E_BLOCK_HUGE_BROWN_MUSHROOM);
|
constexpr cDefaultBlockHandler BlockHugeBrownMushroomHandler (E_BLOCK_HUGE_BROWN_MUSHROOM);
|
||||||
constexpr cBlockHandler BlockHugeRedMushroomHandler (E_BLOCK_HUGE_RED_MUSHROOM);
|
constexpr cDefaultBlockHandler BlockHugeRedMushroomHandler (E_BLOCK_HUGE_RED_MUSHROOM);
|
||||||
constexpr cBlockIceHandler BlockIceHandler (E_BLOCK_ICE);
|
constexpr cBlockIceHandler BlockIceHandler (E_BLOCK_ICE);
|
||||||
constexpr cBlockComparatorHandler BlockInactiveComparatorHandler (E_BLOCK_INACTIVE_COMPARATOR);
|
constexpr cBlockComparatorHandler BlockInactiveComparatorHandler (E_BLOCK_INACTIVE_COMPARATOR);
|
||||||
constexpr cBlockHandler BlockInfestedBlockHandler (E_BLOCK_SILVERFISH_EGG);
|
constexpr cDefaultBlockHandler BlockInfestedBlockHandler (E_BLOCK_SILVERFISH_EGG);
|
||||||
constexpr cBlockHandler BlockIronBarsHandler (E_BLOCK_IRON_BARS);
|
constexpr cDefaultBlockHandler BlockIronBarsHandler (E_BLOCK_IRON_BARS);
|
||||||
constexpr cBlockHandler BlockIronBlockHandler (E_BLOCK_IRON_BLOCK);
|
constexpr cDefaultBlockHandler BlockIronBlockHandler (E_BLOCK_IRON_BLOCK);
|
||||||
constexpr cBlockDoorHandler BlockIronDoorHandler (E_BLOCK_IRON_DOOR);
|
constexpr cBlockDoorHandler BlockIronDoorHandler (E_BLOCK_IRON_DOOR);
|
||||||
constexpr cBlockOreHandler BlockIronOreHandler (E_BLOCK_IRON_ORE);
|
constexpr cDefaultOreHandler BlockIronOreHandler (E_BLOCK_IRON_ORE);
|
||||||
constexpr cBlockTrapdoorHandler BlockIronTrapdoorHandler (E_BLOCK_IRON_TRAPDOOR);
|
constexpr cBlockTrapdoorHandler BlockIronTrapdoorHandler (E_BLOCK_IRON_TRAPDOOR);
|
||||||
constexpr cBlockPumpkinHandler BlockJackOLanternHandler (E_BLOCK_JACK_O_LANTERN);
|
constexpr cBlockPumpkinHandler BlockJackOLanternHandler (E_BLOCK_JACK_O_LANTERN);
|
||||||
constexpr cBlockJukeboxHandler BlockJukeboxHandler (E_BLOCK_JUKEBOX);
|
constexpr cBlockJukeboxHandler BlockJukeboxHandler (E_BLOCK_JUKEBOX);
|
||||||
@ -314,64 +310,64 @@ namespace
|
|||||||
constexpr cBlockFenceHandler BlockJungleFenceHandler (E_BLOCK_JUNGLE_FENCE);
|
constexpr cBlockFenceHandler BlockJungleFenceHandler (E_BLOCK_JUNGLE_FENCE);
|
||||||
constexpr cBlockStairsHandler BlockJungleWoodStairsHandler (E_BLOCK_JUNGLE_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockJungleWoodStairsHandler (E_BLOCK_JUNGLE_WOOD_STAIRS);
|
||||||
constexpr cBlockLadderHandler BlockLadderHandler (E_BLOCK_LADDER);
|
constexpr cBlockLadderHandler BlockLadderHandler (E_BLOCK_LADDER);
|
||||||
constexpr cBlockHandler BlockLapisBlockHandler (E_BLOCK_LAPIS_BLOCK);
|
constexpr cDefaultBlockHandler BlockLapisBlockHandler (E_BLOCK_LAPIS_BLOCK);
|
||||||
constexpr cBlockOreHandler BlockLapisOreHandler (E_BLOCK_LAPIS_ORE);
|
constexpr cDefaultOreHandler BlockLapisOreHandler (E_BLOCK_LAPIS_ORE);
|
||||||
constexpr cBlockLavaHandler BlockLavaHandler (E_BLOCK_LAVA);
|
constexpr cBlockLavaHandler BlockLavaHandler (E_BLOCK_LAVA);
|
||||||
constexpr cBlockLeavesHandler BlockLeavesHandler (E_BLOCK_LEAVES);
|
constexpr cBlockLeavesHandler BlockLeavesHandler (E_BLOCK_LEAVES);
|
||||||
constexpr cBlockLeverHandler BlockLeverHandler (E_BLOCK_LEVER);
|
constexpr cBlockLeverHandler BlockLeverHandler (E_BLOCK_LEVER);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockLightBlueGlazedTerracoHandler(E_BLOCK_LIGHT_BLUE_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockLightBlueGlazedTerracoHandler(E_BLOCK_LIGHT_BLUE_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockLightBlueShulkerBoxHandler (E_BLOCK_LIGHT_BLUE_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockLightBlueShulkerBoxHandler (E_BLOCK_LIGHT_BLUE_SHULKER_BOX);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockLightGrayGlazedTerracoHandler(E_BLOCK_LIGHT_GRAY_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockLightGrayGlazedTerracoHandler(E_BLOCK_LIGHT_GRAY_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockLightGrayShulkerBoxHandler (E_BLOCK_LIGHT_GRAY_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockLightGrayShulkerBoxHandler (E_BLOCK_LIGHT_GRAY_SHULKER_BOX);
|
||||||
constexpr cBlockPressurePlateHandler BlockLightWeightedPressurePHandler(E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE);
|
constexpr cBlockPressurePlateHandler BlockLightWeightedPressurePHandler(E_BLOCK_LIGHT_WEIGHTED_PRESSURE_PLATE);
|
||||||
constexpr cBlockLilypadHandler BlockLilyPadHandler (E_BLOCK_LILY_PAD);
|
constexpr cBlockLilypadHandler BlockLilyPadHandler (E_BLOCK_LILY_PAD);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockLimeGlazedTerracottaHandler (E_BLOCK_LIME_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockLimeGlazedTerracottaHandler (E_BLOCK_LIME_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockLimeShulkerBoxHandler (E_BLOCK_LIME_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockLimeShulkerBoxHandler (E_BLOCK_LIME_SHULKER_BOX);
|
||||||
constexpr cBlockFurnaceHandler BlockLitFurnaceHandler (E_BLOCK_LIT_FURNACE);
|
constexpr cBlockFurnaceHandler BlockLitFurnaceHandler (E_BLOCK_LIT_FURNACE);
|
||||||
constexpr cBlockSidewaysHandler BlockLogHandler (E_BLOCK_LOG);
|
constexpr cBlockSidewaysHandler BlockLogHandler (E_BLOCK_LOG);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockMagentaGlazedTerracottHandler(E_BLOCK_MAGENTA_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockMagentaGlazedTerracottHandler(E_BLOCK_MAGENTA_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockMagentaShulkerBoxHandler (E_BLOCK_MAGENTA_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockMagentaShulkerBoxHandler (E_BLOCK_MAGENTA_SHULKER_BOX);
|
||||||
constexpr cBlockHandler BlockMagmaHandler (E_BLOCK_MAGMA);
|
constexpr cDefaultBlockHandler BlockMagmaHandler (E_BLOCK_MAGMA);
|
||||||
constexpr cBlockMelonHandler BlockMelonHandler (E_BLOCK_MELON);
|
constexpr cBlockMelonHandler BlockMelonHandler (E_BLOCK_MELON);
|
||||||
constexpr cBlockMelonStemHandler BlockMelonStemHandler (E_BLOCK_MELON_STEM);
|
constexpr cBlockMelonStemHandler BlockMelonStemHandler (E_BLOCK_MELON_STEM);
|
||||||
constexpr cBlockMobSpawnerHandler BlockMobSpawnerHandler (E_BLOCK_MOB_SPAWNER);
|
constexpr cBlockMobSpawnerHandler BlockMobSpawnerHandler (E_BLOCK_MOB_SPAWNER);
|
||||||
constexpr cBlockHandler BlockMossyCobblestoneHandler (E_BLOCK_MOSSY_COBBLESTONE);
|
constexpr cDefaultBlockHandler BlockMossyCobblestoneHandler (E_BLOCK_MOSSY_COBBLESTONE);
|
||||||
constexpr cBlockMyceliumHandler BlockMyceliumHandler (E_BLOCK_MYCELIUM);
|
constexpr cBlockMyceliumHandler BlockMyceliumHandler (E_BLOCK_MYCELIUM);
|
||||||
constexpr cBlockFenceHandler BlockNetherBrickFenceHandler (E_BLOCK_NETHER_BRICK_FENCE);
|
constexpr cBlockFenceHandler BlockNetherBrickFenceHandler (E_BLOCK_NETHER_BRICK_FENCE);
|
||||||
constexpr cBlockHandler BlockNetherBrickHandler (E_BLOCK_NETHER_BRICK);
|
constexpr cDefaultBlockHandler BlockNetherBrickHandler (E_BLOCK_NETHER_BRICK);
|
||||||
constexpr cBlockStairsHandler BlockNetherBrickStairsHandler (E_BLOCK_NETHER_BRICK_STAIRS);
|
constexpr cBlockStairsHandler BlockNetherBrickStairsHandler (E_BLOCK_NETHER_BRICK_STAIRS);
|
||||||
constexpr cBlockPortalHandler BlockNetherPortalHandler (E_BLOCK_NETHER_PORTAL);
|
constexpr cBlockPortalHandler BlockNetherPortalHandler (E_BLOCK_NETHER_PORTAL);
|
||||||
constexpr cBlockOreHandler BlockNetherQuartzOreHandler (E_BLOCK_NETHER_QUARTZ_ORE);
|
constexpr cDefaultOreHandler BlockNetherQuartzOreHandler (E_BLOCK_NETHER_QUARTZ_ORE);
|
||||||
constexpr cBlockHandler BlockNetherWartBlockHandler (E_BLOCK_NETHER_WART_BLOCK);
|
constexpr cDefaultBlockHandler BlockNetherWartBlockHandler (E_BLOCK_NETHER_WART_BLOCK);
|
||||||
constexpr cBlockNetherWartHandler BlockNetherWartHandler (E_BLOCK_NETHER_WART);
|
constexpr cBlockNetherWartHandler BlockNetherWartHandler (E_BLOCK_NETHER_WART);
|
||||||
constexpr cBlockNetherrack BlockNetherrackHandler (E_BLOCK_NETHERRACK);
|
constexpr cBlockNetherrack BlockNetherrackHandler (E_BLOCK_NETHERRACK);
|
||||||
constexpr cBlockLeavesHandler BlockNewLeavesHandler (E_BLOCK_NEW_LEAVES);
|
constexpr cBlockLeavesHandler BlockNewLeavesHandler (E_BLOCK_NEW_LEAVES);
|
||||||
constexpr cBlockSidewaysHandler BlockNewLogHandler (E_BLOCK_NEW_LOG);
|
constexpr cBlockSidewaysHandler BlockNewLogHandler (E_BLOCK_NEW_LOG);
|
||||||
constexpr cBlockEntityHandler BlockNoteBlockHandler (E_BLOCK_NOTE_BLOCK);
|
constexpr cDefaultBlockEntityHandler BlockNoteBlockHandler (E_BLOCK_NOTE_BLOCK);
|
||||||
constexpr cBlockDoorHandler BlockOakDoorHandler (E_BLOCK_OAK_DOOR);
|
constexpr cBlockDoorHandler BlockOakDoorHandler (E_BLOCK_OAK_DOOR);
|
||||||
constexpr cBlockFenceGateHandler BlockOakFenceGateHandler (E_BLOCK_OAK_FENCE_GATE);
|
constexpr cBlockFenceGateHandler BlockOakFenceGateHandler (E_BLOCK_OAK_FENCE_GATE);
|
||||||
constexpr cBlockStairsHandler BlockOakWoodStairsHandler (E_BLOCK_OAK_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockOakWoodStairsHandler (E_BLOCK_OAK_WOOD_STAIRS);
|
||||||
constexpr cBlockObserverHandler BlockObserverHandler (E_BLOCK_OBSERVER);
|
constexpr cBlockObserverHandler BlockObserverHandler (E_BLOCK_OBSERVER);
|
||||||
constexpr cBlockHandler BlockObsidianHandler (E_BLOCK_OBSIDIAN);
|
constexpr cDefaultBlockHandler BlockObsidianHandler (E_BLOCK_OBSIDIAN);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockOrangeGlazedTerracottaHandler(E_BLOCK_ORANGE_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockOrangeGlazedTerracottaHandler(E_BLOCK_ORANGE_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockOrangeShulkerBoxHandler (E_BLOCK_ORANGE_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockOrangeShulkerBoxHandler (E_BLOCK_ORANGE_SHULKER_BOX);
|
||||||
constexpr cBlockPackedIceHandler BlockPackedIceHandler (E_BLOCK_PACKED_ICE);
|
constexpr cBlockPackedIceHandler BlockPackedIceHandler (E_BLOCK_PACKED_ICE);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockPinkGlazedTerracottaHandler (E_BLOCK_PINK_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockPinkGlazedTerracottaHandler (E_BLOCK_PINK_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockPinkShulkerBoxHandler (E_BLOCK_PINK_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockPinkShulkerBoxHandler (E_BLOCK_PINK_SHULKER_BOX);
|
||||||
constexpr cBlockPistonHandler BlockPistonHandler (E_BLOCK_PISTON);
|
constexpr cBlockPistonHandler BlockPistonHandler (E_BLOCK_PISTON);
|
||||||
constexpr cBlockPistonHeadHandler BlockPistonHeadHandler;
|
constexpr cBlockPistonHeadHandler BlockPistonHeadHandler;
|
||||||
constexpr cBlockHandler BlockPistonMovedBlockHandler (E_BLOCK_PISTON_MOVED_BLOCK);
|
constexpr cDefaultBlockHandler BlockPistonMovedBlockHandler (E_BLOCK_PISTON_MOVED_BLOCK);
|
||||||
constexpr cBlockPlanksHandler BlockPlanksHandler (E_BLOCK_PLANKS);
|
constexpr cBlockPlanksHandler BlockPlanksHandler (E_BLOCK_PLANKS);
|
||||||
constexpr cBlockCropsHandler<7> BlockPotatoesHandler (E_BLOCK_POTATOES); // 8 stages of growth
|
constexpr cBlockCropsHandler<7> BlockPotatoesHandler (E_BLOCK_POTATOES); // 8 stages of growth
|
||||||
constexpr cBlockRailHandler BlockPoweredRailHandler (E_BLOCK_POWERED_RAIL);
|
constexpr cBlockRailHandler BlockPoweredRailHandler (E_BLOCK_POWERED_RAIL);
|
||||||
constexpr cBlockHandler BlockPrismarineBlockHandler (E_BLOCK_PRISMARINE_BLOCK);
|
constexpr cDefaultBlockHandler BlockPrismarineBlockHandler (E_BLOCK_PRISMARINE_BLOCK);
|
||||||
constexpr cBlockPumpkinHandler BlockPumpkinHandler (E_BLOCK_PUMPKIN);
|
constexpr cBlockPumpkinHandler BlockPumpkinHandler (E_BLOCK_PUMPKIN);
|
||||||
constexpr cBlockPumpkinStemHandler BlockPumpkinStemHandler (E_BLOCK_PUMPKIN_STEM);
|
constexpr cBlockPumpkinStemHandler BlockPumpkinStemHandler (E_BLOCK_PUMPKIN_STEM);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockPurpleGlazedTerracottaHandler(E_BLOCK_PURPLE_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockPurpleGlazedTerracottaHandler(E_BLOCK_PURPLE_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockPurpleShulkerBoxHandler (E_BLOCK_PURPLE_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockPurpleShulkerBoxHandler (E_BLOCK_PURPLE_SHULKER_BOX);
|
||||||
constexpr cBlockHandler BlockPurpurBlockHandler (E_BLOCK_PURPUR_BLOCK);
|
constexpr cDefaultBlockHandler BlockPurpurBlockHandler (E_BLOCK_PURPUR_BLOCK);
|
||||||
constexpr cBlockDoubleSlabHandler BlockPurpurDoubleSlabHandler (E_BLOCK_PURPUR_DOUBLE_SLAB);
|
constexpr cBlockDoubleSlabHandler BlockPurpurDoubleSlabHandler (E_BLOCK_PURPUR_DOUBLE_SLAB);
|
||||||
constexpr cBlockHandler BlockPurpurPillarHandler (E_BLOCK_PURPUR_PILLAR);
|
constexpr cDefaultBlockHandler BlockPurpurPillarHandler (E_BLOCK_PURPUR_PILLAR);
|
||||||
constexpr cBlockSlabHandler BlockPurpurSlabHandler (E_BLOCK_PURPUR_SLAB);
|
constexpr cBlockSlabHandler BlockPurpurSlabHandler (E_BLOCK_PURPUR_SLAB);
|
||||||
constexpr cBlockStairsHandler BlockPurpurStairsHandler (E_BLOCK_PURPUR_STAIRS);
|
constexpr cBlockStairsHandler BlockPurpurStairsHandler (E_BLOCK_PURPUR_STAIRS);
|
||||||
constexpr cBlockQuartzHandler BlockQuartzBlockHandler (E_BLOCK_QUARTZ_BLOCK);
|
constexpr cBlockQuartzHandler BlockQuartzBlockHandler (E_BLOCK_QUARTZ_BLOCK);
|
||||||
@ -379,12 +375,12 @@ namespace
|
|||||||
constexpr cBlockRailHandler BlockRailHandler (E_BLOCK_RAIL);
|
constexpr cBlockRailHandler BlockRailHandler (E_BLOCK_RAIL);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockRedGlazedTerracottaHandler (E_BLOCK_RED_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockRedGlazedTerracottaHandler (E_BLOCK_RED_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockMushroomHandler BlockRedMushroomHandler (E_BLOCK_RED_MUSHROOM);
|
constexpr cBlockMushroomHandler BlockRedMushroomHandler (E_BLOCK_RED_MUSHROOM);
|
||||||
constexpr cBlockHandler BlockRedNetherBrickHandler (E_BLOCK_RED_NETHER_BRICK);
|
constexpr cDefaultBlockHandler BlockRedNetherBrickHandler (E_BLOCK_RED_NETHER_BRICK);
|
||||||
constexpr cBlockFlowerHandler BlockRedRoseHandler (E_BLOCK_RED_ROSE);
|
constexpr cBlockFlowerHandler BlockRedRoseHandler (E_BLOCK_RED_ROSE);
|
||||||
constexpr cBlockHandler BlockRedSandstoneHandler (E_BLOCK_RED_SANDSTONE);
|
constexpr cDefaultBlockHandler BlockRedSandstoneHandler (E_BLOCK_RED_SANDSTONE);
|
||||||
constexpr cBlockSlabHandler BlockRedSandstoneSlabHandler (E_BLOCK_RED_SANDSTONE_SLAB);
|
constexpr cBlockSlabHandler BlockRedSandstoneSlabHandler (E_BLOCK_RED_SANDSTONE_SLAB);
|
||||||
constexpr cBlockStairsHandler BlockRedSandstoneStairsHandler (E_BLOCK_RED_SANDSTONE_STAIRS);
|
constexpr cBlockStairsHandler BlockRedSandstoneStairsHandler (E_BLOCK_RED_SANDSTONE_STAIRS);
|
||||||
constexpr cBlockHandler BlockRedShulkerBoxHandler (E_BLOCK_RED_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockRedShulkerBoxHandler (E_BLOCK_RED_SHULKER_BOX);
|
||||||
constexpr cBlockRedstoneLampHandler BlockRedstoneLampHandler (E_BLOCK_REDSTONE_LAMP_ON);
|
constexpr cBlockRedstoneLampHandler BlockRedstoneLampHandler (E_BLOCK_REDSTONE_LAMP_ON);
|
||||||
constexpr cBlockGlowingRedstoneOreHandler BlockRedstoneOreGlowingHandler (E_BLOCK_REDSTONE_ORE_GLOWING);
|
constexpr cBlockGlowingRedstoneOreHandler BlockRedstoneOreGlowingHandler (E_BLOCK_REDSTONE_ORE_GLOWING);
|
||||||
constexpr cBlockRedstoneOreHandler BlockRedstoneOreHandler (E_BLOCK_REDSTONE_ORE);
|
constexpr cBlockRedstoneOreHandler BlockRedstoneOreHandler (E_BLOCK_REDSTONE_ORE);
|
||||||
@ -395,35 +391,35 @@ namespace
|
|||||||
constexpr cBlockRedstoneHandler BlockRedstoneWireHandler (E_BLOCK_REDSTONE_WIRE);
|
constexpr cBlockRedstoneHandler BlockRedstoneWireHandler (E_BLOCK_REDSTONE_WIRE);
|
||||||
constexpr cBlockCommandBlockHandler BlockRepeatingCommandBlockHandler (E_BLOCK_REPEATING_COMMAND_BLOCK);
|
constexpr cBlockCommandBlockHandler BlockRepeatingCommandBlockHandler (E_BLOCK_REPEATING_COMMAND_BLOCK);
|
||||||
constexpr cBlockSandHandler BlockSandHandler (E_BLOCK_SAND);
|
constexpr cBlockSandHandler BlockSandHandler (E_BLOCK_SAND);
|
||||||
constexpr cBlockHandler BlockSandstoneHandler (E_BLOCK_SANDSTONE);
|
constexpr cDefaultBlockHandler BlockSandstoneHandler (E_BLOCK_SANDSTONE);
|
||||||
constexpr cBlockStairsHandler BlockSandstoneStairsHandler (E_BLOCK_SANDSTONE_STAIRS);
|
constexpr cBlockStairsHandler BlockSandstoneStairsHandler (E_BLOCK_SANDSTONE_STAIRS);
|
||||||
constexpr cBlockSaplingHandler BlockSaplingHandler (E_BLOCK_SAPLING);
|
constexpr cBlockSaplingHandler BlockSaplingHandler (E_BLOCK_SAPLING);
|
||||||
constexpr cBlockSeaLanternHandler BlockSeaLanternHandler (E_BLOCK_SEA_LANTERN);
|
constexpr cBlockSeaLanternHandler BlockSeaLanternHandler (E_BLOCK_SEA_LANTERN);
|
||||||
constexpr cBlockSignPostHandler BlockSignPostHandler (E_BLOCK_SIGN_POST);
|
constexpr cBlockSignPostHandler BlockSignPostHandler (E_BLOCK_SIGN_POST);
|
||||||
constexpr cBlockSlimeHandler BlockSlimeBlockHandler (E_BLOCK_SLIME_BLOCK);
|
constexpr cBlockSlimeHandler BlockSlimeBlockHandler (E_BLOCK_SLIME_BLOCK);
|
||||||
constexpr cBlockHandler BlockSnowBlockHandler (E_BLOCK_SNOW_BLOCK);
|
constexpr cDefaultBlockHandler BlockSnowBlockHandler (E_BLOCK_SNOW_BLOCK);
|
||||||
constexpr cBlockSnowHandler BlockSnowHandler (E_BLOCK_SNOW);
|
constexpr cBlockSnowHandler BlockSnowHandler (E_BLOCK_SNOW);
|
||||||
constexpr cBlockHandler BlockSoulSandHandler (E_BLOCK_SOULSAND);
|
constexpr cDefaultBlockHandler BlockSoulSandHandler (E_BLOCK_SOULSAND);
|
||||||
constexpr cBlockSpongeHandler BlockSpongeHandler (E_BLOCK_SPONGE);
|
constexpr cBlockSpongeHandler BlockSpongeHandler (E_BLOCK_SPONGE);
|
||||||
constexpr cBlockDoorHandler BlockSpruceDoorHandler (E_BLOCK_SPRUCE_DOOR);
|
constexpr cBlockDoorHandler BlockSpruceDoorHandler (E_BLOCK_SPRUCE_DOOR);
|
||||||
constexpr cBlockFenceGateHandler BlockSpruceFenceGateHandler (E_BLOCK_SPRUCE_FENCE_GATE);
|
constexpr cBlockFenceGateHandler BlockSpruceFenceGateHandler (E_BLOCK_SPRUCE_FENCE_GATE);
|
||||||
constexpr cBlockFenceHandler BlockSpruceFenceHandler (E_BLOCK_SPRUCE_FENCE);
|
constexpr cBlockFenceHandler BlockSpruceFenceHandler (E_BLOCK_SPRUCE_FENCE);
|
||||||
constexpr cBlockStairsHandler BlockSpruceWoodStairsHandler (E_BLOCK_SPRUCE_WOOD_STAIRS);
|
constexpr cBlockStairsHandler BlockSpruceWoodStairsHandler (E_BLOCK_SPRUCE_WOOD_STAIRS);
|
||||||
constexpr cBlockHandler BlockStainedClayHandler (E_BLOCK_STAINED_CLAY);
|
constexpr cDefaultBlockHandler BlockStainedClayHandler (E_BLOCK_STAINED_CLAY);
|
||||||
constexpr cBlockGlassHandler BlockStainedGlassHandler (E_BLOCK_STAINED_GLASS);
|
constexpr cBlockGlassHandler BlockStainedGlassHandler (E_BLOCK_STAINED_GLASS);
|
||||||
constexpr cBlockGlassHandler BlockStainedGlassPaneHandler (E_BLOCK_STAINED_GLASS_PANE);
|
constexpr cBlockGlassHandler BlockStainedGlassPaneHandler (E_BLOCK_STAINED_GLASS_PANE);
|
||||||
constexpr cBlockHandler BlockStandingBannerHandler (E_BLOCK_STANDING_BANNER); // TODO: drops correct?
|
constexpr cDefaultBlockHandler BlockStandingBannerHandler (E_BLOCK_STANDING_BANNER); // TODO: drops correct?
|
||||||
constexpr cBlockLavaHandler BlockStationaryLavaHandler (E_BLOCK_STATIONARY_LAVA);
|
constexpr cBlockLavaHandler BlockStationaryLavaHandler (E_BLOCK_STATIONARY_LAVA);
|
||||||
constexpr cBlockFluidHandler BlockStationaryWaterHandler (E_BLOCK_STATIONARY_WATER);
|
constexpr cBlockWaterHandler BlockStationaryWaterHandler (E_BLOCK_STATIONARY_WATER);
|
||||||
constexpr cBlockPistonHandler BlockStickyPistonHandler (E_BLOCK_STICKY_PISTON);
|
constexpr cBlockPistonHandler BlockStickyPistonHandler (E_BLOCK_STICKY_PISTON);
|
||||||
constexpr cBlockStairsHandler BlockStoneBrickStairsHandler (E_BLOCK_STONE_BRICK_STAIRS);
|
constexpr cBlockStairsHandler BlockStoneBrickStairsHandler (E_BLOCK_STONE_BRICK_STAIRS);
|
||||||
constexpr cBlockHandler BlockStoneBricksHandler (E_BLOCK_STONE_BRICKS);
|
constexpr cDefaultBlockHandler BlockStoneBricksHandler (E_BLOCK_STONE_BRICKS);
|
||||||
constexpr cBlockButtonHandler BlockStoneButtonHandler (E_BLOCK_STONE_BUTTON);
|
constexpr cBlockButtonHandler BlockStoneButtonHandler (E_BLOCK_STONE_BUTTON);
|
||||||
constexpr cBlockStoneHandler BlockStoneHandler (E_BLOCK_STONE);
|
constexpr cBlockStoneHandler BlockStoneHandler (E_BLOCK_STONE);
|
||||||
constexpr cBlockPressurePlateHandler BlockStonePressurePlateHandler (E_BLOCK_STONE_PRESSURE_PLATE);
|
constexpr cBlockPressurePlateHandler BlockStonePressurePlateHandler (E_BLOCK_STONE_PRESSURE_PLATE);
|
||||||
constexpr cBlockSlabHandler BlockStoneSlabHandler (E_BLOCK_STONE_SLAB);
|
constexpr cBlockSlabHandler BlockStoneSlabHandler (E_BLOCK_STONE_SLAB);
|
||||||
constexpr cBlockHandler BlockStructureBlockHandler (E_BLOCK_STRUCTURE_BLOCK);
|
constexpr cDefaultBlockHandler BlockStructureBlockHandler (E_BLOCK_STRUCTURE_BLOCK);
|
||||||
constexpr cBlockHandler BlockStructureVoidHandler (E_BLOCK_STRUCTURE_VOID);
|
constexpr cDefaultBlockHandler BlockStructureVoidHandler (E_BLOCK_STRUCTURE_VOID);
|
||||||
constexpr cBlockSugarcaneHandler BlockSugarcaneHandler (E_BLOCK_SUGARCANE);
|
constexpr cBlockSugarcaneHandler BlockSugarcaneHandler (E_BLOCK_SUGARCANE);
|
||||||
constexpr cBlockTallGrassHandler BlockTallGrassHandler (E_BLOCK_TALL_GRASS);
|
constexpr cBlockTallGrassHandler BlockTallGrassHandler (E_BLOCK_TALL_GRASS);
|
||||||
constexpr cBlockTNTHandler BlockTntHandler (E_BLOCK_TNT);
|
constexpr cBlockTNTHandler BlockTntHandler (E_BLOCK_TNT);
|
||||||
@ -433,11 +429,11 @@ namespace
|
|||||||
constexpr cBlockTripwireHandler BlockTripwireHandler (E_BLOCK_TRIPWIRE);
|
constexpr cBlockTripwireHandler BlockTripwireHandler (E_BLOCK_TRIPWIRE);
|
||||||
constexpr cBlockTripwireHookHandler BlockTripwireHookHandler (E_BLOCK_TRIPWIRE_HOOK);
|
constexpr cBlockTripwireHookHandler BlockTripwireHookHandler (E_BLOCK_TRIPWIRE_HOOK);
|
||||||
constexpr cBlockVineHandler BlockVinesHandler (E_BLOCK_VINES);
|
constexpr cBlockVineHandler BlockVinesHandler (E_BLOCK_VINES);
|
||||||
constexpr cBlockHandler BlockWallBannerHandler (E_BLOCK_WALL_BANNER); // TODO: drops correct?
|
constexpr cDefaultBlockHandler BlockWallBannerHandler (E_BLOCK_WALL_BANNER); // TODO: drops correct?
|
||||||
constexpr cBlockWallSignHandler BlockWallsignHandler (E_BLOCK_WALLSIGN);
|
constexpr cBlockWallSignHandler BlockWallsignHandler (E_BLOCK_WALLSIGN);
|
||||||
constexpr cBlockFluidHandler BlockWaterHandler (E_BLOCK_WATER);
|
constexpr cBlockWaterHandler BlockWaterHandler (E_BLOCK_WATER);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockWhiteGlazedTerracottaHandler (E_BLOCK_WHITE_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockWhiteGlazedTerracottaHandler (E_BLOCK_WHITE_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockWhiteShulkerBoxHandler (E_BLOCK_WHITE_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockWhiteShulkerBoxHandler (E_BLOCK_WHITE_SHULKER_BOX);
|
||||||
constexpr cBlockButtonHandler BlockWoodenButtonHandler (E_BLOCK_WOODEN_BUTTON);
|
constexpr cBlockButtonHandler BlockWoodenButtonHandler (E_BLOCK_WOODEN_BUTTON);
|
||||||
constexpr cBlockPressurePlateHandler BlockWoodenPressurePlateHandler (E_BLOCK_WOODEN_PRESSURE_PLATE);
|
constexpr cBlockPressurePlateHandler BlockWoodenPressurePlateHandler (E_BLOCK_WOODEN_PRESSURE_PLATE);
|
||||||
constexpr cBlockSlabHandler BlockWoodenSlabHandler (E_BLOCK_WOODEN_SLAB);
|
constexpr cBlockSlabHandler BlockWoodenSlabHandler (E_BLOCK_WOODEN_SLAB);
|
||||||
@ -445,7 +441,7 @@ namespace
|
|||||||
constexpr cBlockWorkbenchHandler BlockWorkbenchHandler (E_BLOCK_WORKBENCH);
|
constexpr cBlockWorkbenchHandler BlockWorkbenchHandler (E_BLOCK_WORKBENCH);
|
||||||
constexpr cBlockFlowerHandler BlockYellowFlowerHandler (E_BLOCK_YELLOW_FLOWER);
|
constexpr cBlockFlowerHandler BlockYellowFlowerHandler (E_BLOCK_YELLOW_FLOWER);
|
||||||
constexpr cBlockGlazedTerracottaHandler BlockYellowGlazedTerracottaHandler(E_BLOCK_YELLOW_GLAZED_TERRACOTTA);
|
constexpr cBlockGlazedTerracottaHandler BlockYellowGlazedTerracottaHandler(E_BLOCK_YELLOW_GLAZED_TERRACOTTA);
|
||||||
constexpr cBlockHandler BlockYellowShulkerBoxHandler (E_BLOCK_YELLOW_SHULKER_BOX);
|
constexpr cDefaultBlockHandler BlockYellowShulkerBoxHandler (E_BLOCK_YELLOW_SHULKER_BOX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -647,7 +643,7 @@ unsigned char cBlockHandler::ToolFortuneLevel(const cItem * a_Tool)
|
|||||||
if ((a_Tool != nullptr) && ItemCategory::IsTool(a_Tool->m_ItemType))
|
if ((a_Tool != nullptr) && ItemCategory::IsTool(a_Tool->m_ItemType))
|
||||||
{
|
{
|
||||||
// Return enchantment level, limited to avoid spawning excessive pickups (crashing the server) when modified items are used:
|
// Return enchantment level, limited to avoid spawning excessive pickups (crashing the server) when modified items are used:
|
||||||
return std::min(8U, a_Tool->m_Enchantments.GetLevel(cEnchantments::enchFortune));
|
return static_cast<unsigned char>(std::min(8U, a_Tool->m_Enchantments.GetLevel(cEnchantments::enchFortune)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a tool:
|
// Not a tool:
|
||||||
|
@ -66,12 +66,12 @@ public:
|
|||||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface,
|
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface,
|
||||||
Vector3i a_BlockPos,
|
Vector3i a_BlockPos,
|
||||||
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
|
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
|
||||||
) const {};
|
) const {}
|
||||||
|
|
||||||
/** Called by cPlayer::PlaceBlocks() for each block after it has been set to the world. Called after OnPlaced(). */
|
/** Called by cPlayer::PlaceBlocks() for each block after it has been set to the world. Called after OnPlaced(). */
|
||||||
virtual void OnPlacedByPlayer(
|
virtual void OnPlacedByPlayer(
|
||||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, const sSetBlock & a_BlockChange
|
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player, const sSetBlock & a_BlockChange
|
||||||
) const {};
|
) const {}
|
||||||
|
|
||||||
/** Called just after the player breaks the block.
|
/** Called just after the player breaks the block.
|
||||||
The block is already dug up in the world, the original block type and meta is passed in a_OldBlockType and a_OldBlockMeta.
|
The block is already dug up in the world, the original block type and meta is passed in a_OldBlockType and a_OldBlockMeta.
|
||||||
@ -91,7 +91,7 @@ public:
|
|||||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface,
|
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface,
|
||||||
Vector3i a_BlockPos,
|
Vector3i a_BlockPos,
|
||||||
BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta
|
BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta
|
||||||
) const {};
|
) const {}
|
||||||
|
|
||||||
/** Called when a direct neighbor of this block has been changed.
|
/** Called when a direct neighbor of this block has been changed.
|
||||||
The position is the block's own position, NOT the changed neighbor's position.
|
The position is the block's own position, NOT the changed neighbor's position.
|
||||||
@ -241,5 +241,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
BLOCKTYPE m_BlockType;
|
~cBlockHandler() = default;
|
||||||
|
|
||||||
|
const BLOCKTYPE m_BlockType;
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockHopperHandler :
|
class cBlockHopperHandler final :
|
||||||
public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>
|
public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>
|
||||||
{
|
{
|
||||||
using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>;
|
using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockIceHandler :
|
class cBlockIceHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -54,7 +54,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto Offset : Adjacents)
|
for (const auto & Offset : Adjacents)
|
||||||
{
|
{
|
||||||
auto Position = a_RelPos + Offset;
|
auto Position = a_RelPos + Offset;
|
||||||
const auto Chunk = a_Chunk.GetRelNeighborChunkAdjustCoords(Position);
|
const auto Chunk = a_Chunk.GetRelNeighborChunkAdjustCoords(Position);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockJukeboxHandler :
|
class cBlockJukeboxHandler final :
|
||||||
public cClearMetaOnDrop<cBlockEntityHandler>
|
public cClearMetaOnDrop<cBlockEntityHandler>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockLadderHandler:
|
class cBlockLadderHandler final :
|
||||||
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
|
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>;
|
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>>;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockLeavesHandler:
|
class cBlockLeavesHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "BlockSlab.h"
|
#include "BlockSlab.h"
|
||||||
|
|
||||||
|
|
||||||
class cBlockLeverHandler:
|
class cBlockLeverHandler final :
|
||||||
public cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>
|
public cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>
|
||||||
{
|
{
|
||||||
using Super = cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>;
|
using Super = cMetaRotator<cBlockHandler, 0x07, 0x04, 0x01, 0x03, 0x02, false>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockLilypadHandler:
|
class cBlockLilypadHandler final :
|
||||||
public cClearMetaOnDrop<cBlockHandler>
|
public cClearMetaOnDrop<cBlockHandler>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cBlockHandler>;
|
using Super = cClearMetaOnDrop<cBlockHandler>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockMelonHandler :
|
class cBlockMelonHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockMobHeadHandler :
|
class cBlockMobHeadHandler final :
|
||||||
public cBlockEntityHandler
|
public cBlockEntityHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockEntityHandler;
|
using Super = cBlockEntityHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockMobSpawnerHandler:
|
class cBlockMobSpawnerHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** Handler for the small (singleblock) mushrooms. */
|
/** Handler for the small (singleblock) mushrooms. */
|
||||||
class cBlockMushroomHandler:
|
class cBlockMushroomHandler final :
|
||||||
public cClearMetaOnDrop<cBlockHandler>
|
public cClearMetaOnDrop<cBlockHandler>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cBlockHandler>;
|
using Super = cClearMetaOnDrop<cBlockHandler>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockMyceliumHandler:
|
class cBlockMyceliumHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockNetherWartHandler:
|
class cBlockNetherWartHandler final :
|
||||||
public cBlockPlant<false>
|
public cBlockPlant<false>
|
||||||
{
|
{
|
||||||
using Super = cBlockPlant<false>;
|
using Super = cBlockPlant<false>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockNetherrack : public cBlockHandler
|
class cBlockNetherrack final : public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "Mixins.h"
|
#include "Mixins.h"
|
||||||
|
|
||||||
|
|
||||||
class cBlockObserverHandler:
|
class cBlockObserverHandler final :
|
||||||
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>
|
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>;
|
using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockOreHandler:
|
class cBlockOreHandler :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -16,6 +16,10 @@ public:
|
|||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cBlockOreHandler() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
||||||
@ -124,3 +128,11 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cDefaultOreHandler final :
|
||||||
|
public cBlockOreHandler
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
using cBlockOreHandler::cBlockOreHandler;
|
||||||
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPackedIceHandler :
|
class cBlockPackedIceHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -15,7 +15,7 @@ class cWorld;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPistonHandler:
|
class cBlockPistonHandler final :
|
||||||
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>
|
public cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>;
|
using Super = cClearMetaOnDrop<cPitchYawRotator<cBlockHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>>;
|
||||||
@ -141,7 +141,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPistonHeadHandler:
|
class cBlockPistonHeadHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPlanksHandler:
|
class cBlockPlanksHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
/** Base class for plants that use light values to decide whether to grow or not.
|
/** Base class for plants that use light values to decide whether to grow or not.
|
||||||
On block update, the plant decides whether to grow, die or stay as-is, based on the CanGrow() overridable method result. */
|
On block update, the plant decides whether to grow, die or stay as-is, based on the CanGrow() overridable method result. */
|
||||||
template <bool NeedsLightToGrow>
|
template <bool NeedsLightToGrow>
|
||||||
class cBlockPlant:
|
class cBlockPlant :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -18,39 +18,10 @@ public:
|
|||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
virtual void OnUpdate(
|
|
||||||
cChunkInterface & a_ChunkInterface,
|
|
||||||
cWorldInterface & a_WorldInterface,
|
|
||||||
cBlockPluginInterface & a_PluginInterface,
|
|
||||||
cChunk & a_Chunk,
|
|
||||||
const Vector3i a_RelPos
|
|
||||||
) const override
|
|
||||||
{
|
|
||||||
auto Action = CanGrow(a_Chunk, a_RelPos);
|
|
||||||
switch (Action)
|
|
||||||
{
|
|
||||||
case paGrowth:
|
|
||||||
{
|
|
||||||
Grow(a_Chunk, a_RelPos);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case paDeath:
|
|
||||||
{
|
|
||||||
a_ChunkInterface.SetBlock(a_Chunk.RelativeToAbsolute(a_RelPos), E_BLOCK_AIR, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case paStay: break; // do nothing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
~cBlockPlant() = default;
|
||||||
|
|
||||||
/** The action the plant can take on an update. */
|
/** The action the plant can take on an update. */
|
||||||
enum PlantAction
|
enum PlantAction
|
||||||
{
|
{
|
||||||
@ -59,10 +30,6 @@ protected:
|
|||||||
paStay
|
paStay
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Checks whether there is enough light for the plant to grow.
|
/** Checks whether there is enough light for the plant to grow.
|
||||||
If the plant doesn't require light to grow, then it returns paGrowth.
|
If the plant doesn't require light to grow, then it returns paGrowth.
|
||||||
If the plant requires light to grow and there is enough light, it returns paGrowth.
|
If the plant requires light to grow and there is enough light, it returns paGrowth.
|
||||||
@ -167,4 +134,31 @@ protected:
|
|||||||
}
|
}
|
||||||
return FloorC(24.0f / Chance) + 1;
|
return FloorC(24.0f / Chance) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual void OnUpdate(
|
||||||
|
cChunkInterface & a_ChunkInterface,
|
||||||
|
cWorldInterface & a_WorldInterface,
|
||||||
|
cBlockPluginInterface & a_PluginInterface,
|
||||||
|
cChunk & a_Chunk,
|
||||||
|
const Vector3i a_RelPos
|
||||||
|
) const override
|
||||||
|
{
|
||||||
|
auto Action = CanGrow(a_Chunk, a_RelPos);
|
||||||
|
switch (Action)
|
||||||
|
{
|
||||||
|
case paGrowth:
|
||||||
|
{
|
||||||
|
Grow(a_Chunk, a_RelPos);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case paDeath:
|
||||||
|
{
|
||||||
|
a_ChunkInterface.SetBlock(a_Chunk.RelativeToAbsolute(a_RelPos), E_BLOCK_AIR, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case paStay: break; // do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPortalHandler:
|
class cBlockPortalHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPressurePlateHandler :
|
class cBlockPressurePlateHandler final :
|
||||||
public cClearMetaOnDrop<cBlockHandler>
|
public cClearMetaOnDrop<cBlockHandler>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cBlockHandler>;
|
using Super = cClearMetaOnDrop<cBlockHandler>;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockPumpkinHandler :
|
class cBlockPumpkinHandler final :
|
||||||
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>
|
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
|
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockQuartzHandler:
|
class cBlockQuartzHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -16,7 +16,7 @@ enum ENUM_PURE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRailHandler :
|
class cBlockRailHandler final :
|
||||||
public cClearMetaOnDrop<cBlockHandler>
|
public cClearMetaOnDrop<cBlockHandler>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cBlockHandler>;
|
using Super = cClearMetaOnDrop<cBlockHandler>;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRedstoneHandler:
|
class cBlockRedstoneHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRedstoneLampHandler:
|
class cBlockRedstoneLampHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRedstoneOreHandler :
|
class cBlockRedstoneOreHandler final :
|
||||||
public cBlockOreHandler
|
public cBlockOreHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockOreHandler;
|
using Super = cBlockOreHandler;
|
||||||
@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockGlowingRedstoneOreHandler:
|
class cBlockGlowingRedstoneOreHandler final :
|
||||||
public cBlockOreHandler
|
public cBlockOreHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockOreHandler;
|
using Super = cBlockOreHandler;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRedstoneRepeaterHandler:
|
class cBlockRedstoneRepeaterHandler final :
|
||||||
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
|
public cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>
|
||||||
{
|
{
|
||||||
using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
|
using Super = cYawRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03>;
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "BlockTorch.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockRedstoneTorchHandler :
|
|
||||||
public cBlockTorchHandler
|
|
||||||
{
|
|
||||||
using Super = cBlockTorchHandler;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
using Super::Super;
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
|
||||||
{
|
|
||||||
// Always drop the ON torch, meta 0
|
|
||||||
return cItem(E_BLOCK_REDSTONE_TORCH_ON, 1, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
|
|
||||||
{
|
|
||||||
UNUSED(a_Meta);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSandHandler :
|
class cBlockSandHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSaplingHandler :
|
class cBlockSaplingHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSeaLanternHandler :
|
class cBlockSeaLanternHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
/** Handler for blocks that have 3 orientations (hay bale, log), specified by the upper 2 bits in meta.
|
/** Handler for blocks that have 3 orientations (hay bale, log), specified by the upper 2 bits in meta.
|
||||||
Handles setting the correct orientation on placement.
|
Handles setting the correct orientation on placement.
|
||||||
Additionally supports the metadata specifying block sub-type in its lower 2 bits. */
|
Additionally supports the metadata specifying block sub-type in its lower 2 bits. */
|
||||||
class cBlockSidewaysHandler:
|
class cBlockSidewaysHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSignPostHandler:
|
class cBlockSignPostHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSlabHandler :
|
class cBlockSlabHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
@ -235,7 +235,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockDoubleSlabHandler:
|
class cBlockDoubleSlabHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSlimeHandler:
|
class cBlockSlimeHandler final :
|
||||||
public cClearMetaOnDrop<cBlockHandler>
|
public cClearMetaOnDrop<cBlockHandler>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSnowHandler :
|
class cBlockSnowHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSpongeHandler :
|
class cBlockSpongeHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockStairsHandler :
|
class cBlockStairsHandler final :
|
||||||
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>
|
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>;
|
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x03, 0x00, 0x02, 0x01, true>>;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
ProduceBlockType is the blocktype for the produce to be grown.
|
ProduceBlockType is the blocktype for the produce to be grown.
|
||||||
StemPickupType is the item type for the pickup resulting from breaking the stem. */
|
StemPickupType is the item type for the pickup resulting from breaking the stem. */
|
||||||
template <BLOCKTYPE ProduceBlockType, ENUM_ITEM_TYPE StemPickupType>
|
template <BLOCKTYPE ProduceBlockType, ENUM_ITEM_TYPE StemPickupType>
|
||||||
class cBlockStemsHandler:
|
class cBlockStemsHandler final :
|
||||||
public cBlockPlant<true>
|
public cBlockPlant<true>
|
||||||
{
|
{
|
||||||
using Super = cBlockPlant<true>;
|
using Super = cBlockPlant<true>;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockStoneHandler:
|
class cBlockStoneHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockSugarcaneHandler :
|
class cBlockSugarcaneHandler final :
|
||||||
public cBlockPlant<false>
|
public cBlockPlant<false>
|
||||||
{
|
{
|
||||||
using Super = cBlockPlant<false>;
|
using Super = cBlockPlant<false>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockTNTHandler :
|
class cBlockTNTHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/** Handles the grass that is 1 block tall */
|
/** Handles the grass that is 1 block tall */
|
||||||
class cBlockTallGrassHandler:
|
class cBlockTallGrassHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,15 +8,20 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockTorchHandler:
|
|
||||||
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>
|
class cBlockTorchBaseHandler :
|
||||||
|
public cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>>;
|
using Super = cMetaRotator<cBlockHandler, 0x7, 0x4, 0x1, 0x3, 0x2>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cBlockTorchBaseHandler() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
virtual bool GetPlacementBlockTypeMeta(
|
virtual bool GetPlacementBlockTypeMeta(
|
||||||
@ -214,3 +219,41 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockTorchHandler final :
|
||||||
|
public cClearMetaOnDrop<cBlockTorchBaseHandler>
|
||||||
|
{
|
||||||
|
using Super = cClearMetaOnDrop<cBlockTorchBaseHandler>;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
using Super::Super;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class cBlockRedstoneTorchHandler final :
|
||||||
|
public cBlockTorchBaseHandler
|
||||||
|
{
|
||||||
|
using Super = cBlockTorchBaseHandler;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
using Super::Super;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
||||||
|
{
|
||||||
|
// Always drop the ON torch, meta 0:
|
||||||
|
return { E_BLOCK_REDSTONE_TORCH_ON };
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
|
||||||
|
{
|
||||||
|
UNUSED(a_Meta);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockTrapdoorHandler :
|
class cBlockTrapdoorHandler final :
|
||||||
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>
|
public cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>
|
||||||
{
|
{
|
||||||
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>;
|
using Super = cClearMetaOnDrop<cYawRotator<cBlockHandler, 0x03, 0x01, 0x02, 0x00, 0x03, false>>;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockTripwireHandler :
|
class cBlockTripwireHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockTripwireHookHandler :
|
class cBlockTripwireHookHandler final :
|
||||||
public cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>
|
public cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>
|
||||||
{
|
{
|
||||||
using Super = cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>;
|
using Super = cMetaRotator<cClearMetaOnDrop<cBlockHandler>, 0x03, 0x02, 0x03, 0x00, 0x01>;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockVineHandler :
|
class cBlockVineHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockWallSignHandler:
|
class cBlockWallSignHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class cBlockWorkbenchHandler:
|
class cBlockWorkbenchHandler final :
|
||||||
public cBlockHandler
|
public cBlockHandler
|
||||||
{
|
{
|
||||||
using Super = cBlockHandler;
|
using Super = cBlockHandler;
|
||||||
|
@ -7,6 +7,7 @@ target_sources(
|
|||||||
BlockPiston.cpp
|
BlockPiston.cpp
|
||||||
ChunkInterface.cpp
|
ChunkInterface.cpp
|
||||||
|
|
||||||
|
BlockAir.h
|
||||||
BlockAnvil.h
|
BlockAnvil.h
|
||||||
BlockBed.h
|
BlockBed.h
|
||||||
BlockBigFlower.h
|
BlockBigFlower.h
|
||||||
@ -26,6 +27,7 @@ target_sources(
|
|||||||
BlockConcretePowder.h
|
BlockConcretePowder.h
|
||||||
BlockCrops.h
|
BlockCrops.h
|
||||||
BlockDeadBush.h
|
BlockDeadBush.h
|
||||||
|
BlockDefaultBlock.h
|
||||||
BlockDirt.h
|
BlockDirt.h
|
||||||
BlockDoor.h
|
BlockDoor.h
|
||||||
BlockDropSpenser.h
|
BlockDropSpenser.h
|
||||||
@ -42,6 +44,7 @@ target_sources(
|
|||||||
BlockFluid.h
|
BlockFluid.h
|
||||||
BlockFurnace.h
|
BlockFurnace.h
|
||||||
BlockGlass.h
|
BlockGlass.h
|
||||||
|
BlockGlazedTerracotta.h
|
||||||
BlockGlowstone.h
|
BlockGlowstone.h
|
||||||
BlockGrass.h
|
BlockGrass.h
|
||||||
BlockGravel.h
|
BlockGravel.h
|
||||||
@ -76,21 +79,21 @@ target_sources(
|
|||||||
BlockRedstoneLamp.h
|
BlockRedstoneLamp.h
|
||||||
BlockRedstoneOre.h
|
BlockRedstoneOre.h
|
||||||
BlockRedstoneRepeater.h
|
BlockRedstoneRepeater.h
|
||||||
BlockRedstoneTorch.h
|
|
||||||
BlockSand.h
|
BlockSand.h
|
||||||
BlockSapling.h
|
BlockSapling.h
|
||||||
BlockSeaLantern.h
|
BlockSeaLantern.h
|
||||||
BlockSideways.h
|
BlockSideways.h
|
||||||
BlockSignPost.h
|
BlockSignPost.h
|
||||||
BlockSlab.h
|
BlockSlab.h
|
||||||
|
BlockSlime.h
|
||||||
BlockSnow.h
|
BlockSnow.h
|
||||||
BlockSponge.h
|
BlockSponge.h
|
||||||
BlockStairs.h
|
BlockStairs.h
|
||||||
BlockStems.h
|
BlockStems.h
|
||||||
BlockStone.h
|
BlockStone.h
|
||||||
BlockSugarcane.h
|
BlockSugarcane.h
|
||||||
BlockTallGrass.h
|
|
||||||
BlockTNT.h
|
BlockTNT.h
|
||||||
|
BlockTallGrass.h
|
||||||
BlockTorch.h
|
BlockTorch.h
|
||||||
BlockTrapdoor.h
|
BlockTrapdoor.h
|
||||||
BlockTripwire.h
|
BlockTripwire.h
|
||||||
|
@ -25,33 +25,9 @@ class cBlockLadder: public cMetaRotator<cClearMetaOnDrop, ...>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class Base = cBlockHandler>
|
|
||||||
class cBlockWithNoDrops:
|
|
||||||
public Base
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
constexpr cBlockWithNoDrops(BLOCKTYPE a_BlockType):
|
|
||||||
Base(a_BlockType)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
|
||||||
{
|
|
||||||
// Don't drop anything:
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Mixin to clear the block's meta value when converting to a pickup. */
|
/** Mixin to clear the block's meta value when converting to a pickup. */
|
||||||
template <class Base>
|
template <class Base>
|
||||||
class cClearMetaOnDrop:
|
class cClearMetaOnDrop :
|
||||||
public Base
|
public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -61,6 +37,10 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cClearMetaOnDrop() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const override
|
||||||
@ -78,7 +58,7 @@ private:
|
|||||||
Inherit from this class providing your base class as Base, the BitMask for the direction bits in bitmask and the masked value for the directions in North, East, South, West.
|
Inherit from this class providing your base class as Base, the BitMask for the direction bits in bitmask and the masked value for the directions in North, East, South, West.
|
||||||
There is also an aptional parameter AssertIfNotMatched, set this if it is invalid for a block to exist in any other state. */
|
There is also an aptional parameter AssertIfNotMatched, set this if it is invalid for a block to exist in any other state. */
|
||||||
template <class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
|
template <class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
|
||||||
class cMetaRotator:
|
class cMetaRotator :
|
||||||
public Base
|
public Base
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -90,6 +70,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
~cMetaRotator() = default;
|
||||||
|
|
||||||
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) const override
|
virtual NIBBLETYPE MetaRotateCCW(NIBBLETYPE a_Meta) const override
|
||||||
{
|
{
|
||||||
NIBBLETYPE OtherMeta = a_Meta & (~BitMask);
|
NIBBLETYPE OtherMeta = a_Meta & (~BitMask);
|
||||||
@ -176,7 +158,7 @@ template <
|
|||||||
NIBBLETYPE West = 0x04,
|
NIBBLETYPE West = 0x04,
|
||||||
bool AssertIfNotMatched = false
|
bool AssertIfNotMatched = false
|
||||||
>
|
>
|
||||||
class cYawRotator:
|
class cYawRotator :
|
||||||
public cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
|
public cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>
|
||||||
{
|
{
|
||||||
using Super = cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>;
|
using Super = cMetaRotator<Base, BitMask, North, East, South, West, AssertIfNotMatched>;
|
||||||
@ -185,8 +167,6 @@ public:
|
|||||||
|
|
||||||
using Super::Super;
|
using Super::Super;
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
virtual bool GetPlacementBlockTypeMeta(
|
virtual bool GetPlacementBlockTypeMeta(
|
||||||
cChunkInterface & a_ChunkInterface, cPlayer & a_Player,
|
cChunkInterface & a_ChunkInterface, cPlayer & a_Player,
|
||||||
const Vector3i a_BlockPos,
|
const Vector3i a_BlockPos,
|
||||||
@ -230,6 +210,10 @@ public:
|
|||||||
return North;
|
return North;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
~cYawRotator() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -259,6 +243,8 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
~cPitchYawRotator() = default;
|
||||||
|
|
||||||
virtual bool GetPlacementBlockTypeMeta(
|
virtual bool GetPlacementBlockTypeMeta(
|
||||||
cChunkInterface & a_ChunkInterface,
|
cChunkInterface & a_ChunkInterface,
|
||||||
cPlayer & a_Player,
|
cPlayer & a_Player,
|
||||||
|
@ -155,6 +155,7 @@ target_sources(
|
|||||||
WebAdmin.h
|
WebAdmin.h
|
||||||
World.h
|
World.h
|
||||||
XMLParser.h
|
XMLParser.h
|
||||||
|
main.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FOLDERS
|
set(FOLDERS
|
||||||
|
@ -589,7 +589,7 @@ private:
|
|||||||
cBlockEntities m_BlockEntities;
|
cBlockEntities m_BlockEntities;
|
||||||
|
|
||||||
/** Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero, the chunk can be unloaded */
|
/** Number of times the chunk has been requested to stay (by various cChunkStay objects); if zero, the chunk can be unloaded */
|
||||||
unsigned m_StayCount;
|
int m_StayCount;
|
||||||
|
|
||||||
int m_PosX, m_PosZ;
|
int m_PosX, m_PosZ;
|
||||||
cWorld * m_World;
|
cWorld * m_World;
|
||||||
@ -619,7 +619,7 @@ private:
|
|||||||
/** If greater than zero, the chunk is ticked even if it has no clients.
|
/** If greater than zero, the chunk is ticked even if it has no clients.
|
||||||
Manipulated by the SetAlwaysTicked() function, allows for nested calls of the function.
|
Manipulated by the SetAlwaysTicked() function, allows for nested calls of the function.
|
||||||
This is the support for plugin-accessible chunk tick forcing. */
|
This is the support for plugin-accessible chunk tick forcing. */
|
||||||
unsigned m_AlwaysTicked;
|
int m_AlwaysTicked;
|
||||||
|
|
||||||
// Pick up a random block of this chunk
|
// Pick up a random block of this chunk
|
||||||
void GetRandomBlockCoords(int & a_X, int & a_Y, int & a_Z);
|
void GetRandomBlockCoords(int & a_X, int & a_Y, int & a_Z);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user