From c52f299e724bf893944553ac3aeedf7bf0a58241 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 2 Jan 2022 11:56:36 +0000 Subject: Handlers: update item and block handlers (#5371) + Resend blocks when server rejects placement because in a block * Fix chest handler not invoked, fixes #5367 * Fix comparator handler not invoked * Update some naming --- src/Blocks/BlockEnderchest.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/Blocks/BlockEnderchest.h (limited to 'src/Blocks/BlockEnderchest.h') diff --git a/src/Blocks/BlockEnderchest.h b/src/Blocks/BlockEnderchest.h deleted file mode 100644 index aae16ccec..000000000 --- a/src/Blocks/BlockEnderchest.h +++ /dev/null @@ -1,44 +0,0 @@ - -#pragma once - -#include "Mixins.h" - - - - -class cBlockEnderchestHandler final : - public cYawRotator -{ - using Super = cYawRotator; - -public: - - using Super::Super; - -private: - - virtual cItems ConvertToPickups(const NIBBLETYPE a_BlockMeta, const cItem * const a_Tool) const override - { - // Only drop something when mined with a pickaxe: - if ( - (a_Tool != nullptr) && - ItemCategory::IsPickaxe(a_Tool->m_ItemType) - ) - { - // Only drop self when mined with a silk-touch pickaxe: - if (a_Tool->m_Enchantments.GetLevel(cEnchantments::enchSilkTouch) > 0) - { - return cItem(E_BLOCK_ENDER_CHEST); - } - - return cItem(E_BLOCK_OBSIDIAN, 8); - } - - return {}; - } - -}; - - - - -- cgit v1.2.3