summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-23 17:06:27 +0200
committerAlexander Harkness <me@bearbin.net>2020-09-25 11:07:01 +0200
commitc53a0ba5f6f71da384a45a07685f8e25c3f91a29 (patch)
treebc8d016d1f5c5b5206b3b4f5580295bd91bb6099 /src/Blocks
parentSmall cleanup in Jukeboxes (diff)
downloadcuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.gz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.bz2
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.lz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.xz
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.tar.zst
cuberite-c53a0ba5f6f71da384a45a07685f8e25c3f91a29.zip
Diffstat (limited to 'src/Blocks')
-rw-r--r--src/Blocks/BlockAnvil.h2
-rw-r--r--src/Blocks/BlockBed.cpp10
-rw-r--r--src/Blocks/BlockBed.h7
-rw-r--r--src/Blocks/BlockBigFlower.h2
-rw-r--r--src/Blocks/BlockBookShelf.h2
-rw-r--r--src/Blocks/BlockBrewingStand.h11
-rw-r--r--src/Blocks/BlockCake.h2
-rw-r--r--src/Blocks/BlockCauldron.h2
-rw-r--r--src/Blocks/BlockChest.h5
-rw-r--r--src/Blocks/BlockCobWeb.h2
-rw-r--r--src/Blocks/BlockCocoaPod.h2
-rw-r--r--src/Blocks/BlockCommandBlock.h2
-rw-r--r--src/Blocks/BlockComparator.h2
-rw-r--r--src/Blocks/BlockCrops.h2
-rw-r--r--src/Blocks/BlockDeadBush.h2
-rw-r--r--src/Blocks/BlockDirt.h2
-rw-r--r--src/Blocks/BlockDoor.h2
-rw-r--r--src/Blocks/BlockDropSpenser.h25
-rw-r--r--src/Blocks/BlockEnchantingTable.h13
-rw-r--r--src/Blocks/BlockEnderchest.h12
-rw-r--r--src/Blocks/BlockEntity.h35
-rw-r--r--src/Blocks/BlockFarmland.h2
-rw-r--r--src/Blocks/BlockFire.h2
-rw-r--r--src/Blocks/BlockFlower.h2
-rw-r--r--src/Blocks/BlockFlowerPot.h4
-rw-r--r--src/Blocks/BlockFluid.h2
-rw-r--r--src/Blocks/BlockFurnace.h12
-rw-r--r--src/Blocks/BlockGlass.h2
-rw-r--r--src/Blocks/BlockGlowstone.h2
-rw-r--r--src/Blocks/BlockGrass.h2
-rw-r--r--src/Blocks/BlockGravel.h2
-rw-r--r--src/Blocks/BlockHandler.cpp12
-rw-r--r--src/Blocks/BlockHandler.h8
-rw-r--r--src/Blocks/BlockHopper.h4
-rw-r--r--src/Blocks/BlockIce.h2
-rw-r--r--src/Blocks/BlockLeaves.h2
-rw-r--r--src/Blocks/BlockLever.h2
-rw-r--r--src/Blocks/BlockMelon.h2
-rw-r--r--src/Blocks/BlockMobHead.h11
-rw-r--r--src/Blocks/BlockMobSpawner.h2
-rw-r--r--src/Blocks/BlockMycelium.h2
-rw-r--r--src/Blocks/BlockNetherWart.h2
-rw-r--r--src/Blocks/BlockOre.h2
-rw-r--r--src/Blocks/BlockPiston.cpp2
-rw-r--r--src/Blocks/BlockPiston.h2
-rw-r--r--src/Blocks/BlockPortal.h2
-rw-r--r--src/Blocks/BlockRedstone.h2
-rw-r--r--src/Blocks/BlockRedstoneLamp.h2
-rw-r--r--src/Blocks/BlockRedstoneRepeater.h2
-rw-r--r--src/Blocks/BlockRedstoneTorch.h2
-rw-r--r--src/Blocks/BlockSapling.h2
-rw-r--r--src/Blocks/BlockSeaLantern.h2
-rw-r--r--src/Blocks/BlockSideways.h2
-rw-r--r--src/Blocks/BlockSignPost.h2
-rw-r--r--src/Blocks/BlockSlab.h4
-rw-r--r--src/Blocks/BlockSnow.h2
-rw-r--r--src/Blocks/BlockStems.h2
-rw-r--r--src/Blocks/BlockStone.h2
-rw-r--r--src/Blocks/BlockSugarcane.h2
-rw-r--r--src/Blocks/BlockTallGrass.h2
-rw-r--r--src/Blocks/BlockTripwire.h2
-rw-r--r--src/Blocks/BlockVine.h2
-rw-r--r--src/Blocks/BlockWallSign.h2
-rw-r--r--src/Blocks/Mixins.h4
64 files changed, 81 insertions, 192 deletions
diff --git a/src/Blocks/BlockAnvil.h b/src/Blocks/BlockAnvil.h
index c3a7f5745..8eaed870c 100644
--- a/src/Blocks/BlockAnvil.h
+++ b/src/Blocks/BlockAnvil.h
@@ -21,7 +21,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(m_BlockType, 1, a_BlockMeta >> 2);
}
diff --git a/src/Blocks/BlockBed.cpp b/src/Blocks/BlockBed.cpp
index 0277f522c..fb6bb29c7 100644
--- a/src/Blocks/BlockBed.cpp
+++ b/src/Blocks/BlockBed.cpp
@@ -168,14 +168,10 @@ void cBlockBedHandler::OnPlacedByPlayer(cChunkInterface & a_ChunkInterface, cWor
-cItems cBlockBedHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const
+cItems cBlockBedHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const
{
- short color = E_META_WOOL_RED;
- if (a_BlockEntity != nullptr)
- {
- color = reinterpret_cast<cBedEntity *>(a_BlockEntity)->GetColor();
- }
- return cItem(E_ITEM_BED, 1, color);
+ // Drops handled by the block entity:
+ return {};
}
diff --git a/src/Blocks/BlockBed.h b/src/Blocks/BlockBed.h
index aacd26e73..8aac898df 100644
--- a/src/Blocks/BlockBed.h
+++ b/src/Blocks/BlockBed.h
@@ -67,12 +67,7 @@ private:
const Vector3i a_CursorPos
) const override;
- virtual cItems ConvertToPickups(
- NIBBLETYPE a_BlockMeta,
- cBlockEntity * a_BlockEntity,
- 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;
virtual void OnPlacedByPlayer(
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer & a_Player,
diff --git a/src/Blocks/BlockBigFlower.h b/src/Blocks/BlockBigFlower.h
index cb2053c77..848cdce16 100644
--- a/src/Blocks/BlockBigFlower.h
+++ b/src/Blocks/BlockBigFlower.h
@@ -47,7 +47,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
if (IsMetaTopPart(a_BlockMeta))
{
diff --git a/src/Blocks/BlockBookShelf.h b/src/Blocks/BlockBookShelf.h
index 28994c009..dcc29eab0 100644
--- a/src/Blocks/BlockBookShelf.h
+++ b/src/Blocks/BlockBookShelf.h
@@ -15,7 +15,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
if (ToolHasSilkTouch(a_Tool))
{
diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h
index e23a60b67..27ba33ca7 100644
--- a/src/Blocks/BlockBrewingStand.h
+++ b/src/Blocks/BlockBrewingStand.h
@@ -1,7 +1,6 @@
#pragma once
-#include "../BlockEntities/BrewingstandEntity.h"
#include "Mixins.h"
@@ -19,15 +18,9 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
- cItems res(cItem(E_ITEM_BREWING_STAND, 1)); // We have to drop the item form of a brewing stand
- if (a_BlockEntity != nullptr)
- {
- auto be = static_cast<cBrewingstandEntity *>(a_BlockEntity);
- res.AddItemGrid(be->GetContents());
- }
- return res;
+ return cItem(E_ITEM_BREWING_STAND); // We have to drop the item form of a brewing stand
}
diff --git a/src/Blocks/BlockCake.h b/src/Blocks/BlockCake.h
index 089dc58bd..639015df2 100644
--- a/src/Blocks/BlockCake.h
+++ b/src/Blocks/BlockCake.h
@@ -49,7 +49,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Give nothing
return {};
diff --git a/src/Blocks/BlockCauldron.h b/src/Blocks/BlockCauldron.h
index b8cd9081c..f5471ded7 100644
--- a/src/Blocks/BlockCauldron.h
+++ b/src/Blocks/BlockCauldron.h
@@ -19,7 +19,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_CAULDRON, 1, 0);
}
diff --git a/src/Blocks/BlockChest.h b/src/Blocks/BlockChest.h
index 122a345ca..e3a6fb623 100644
--- a/src/Blocks/BlockChest.h
+++ b/src/Blocks/BlockChest.h
@@ -1,7 +1,6 @@
#pragma once
-#include "../BlockEntities/ChestEntity.h"
#include "../BlockArea.h"
#include "../Entities/Player.h"
#include "Mixins.h"
@@ -11,9 +10,9 @@
class cBlockChestHandler :
- public cYawRotator<cContainerEntityHandler<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>
+ public cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>
{
- using Super = cYawRotator<cContainerEntityHandler<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
+ using Super = cYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05>;
public:
diff --git a/src/Blocks/BlockCobWeb.h b/src/Blocks/BlockCobWeb.h
index 661880141..c8b0433d4 100644
--- a/src/Blocks/BlockCobWeb.h
+++ b/src/Blocks/BlockCobWeb.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Silk touch gives cobweb, anything else gives just string:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockCocoaPod.h b/src/Blocks/BlockCocoaPod.h
index 6cf2e0e5d..557367dcf 100644
--- a/src/Blocks/BlockCocoaPod.h
+++ b/src/Blocks/BlockCocoaPod.h
@@ -70,7 +70,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// If fully grown, give 3 items, otherwise just one:
auto growState = a_BlockMeta >> 2;
diff --git a/src/Blocks/BlockCommandBlock.h b/src/Blocks/BlockCommandBlock.h
index 6d4aad40a..03b20aba2 100644
--- a/src/Blocks/BlockCommandBlock.h
+++ b/src/Blocks/BlockCommandBlock.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Don't allow as a pickup:
return {};
diff --git a/src/Blocks/BlockComparator.h b/src/Blocks/BlockComparator.h
index 53edaca50..d20c70aeb 100644
--- a/src/Blocks/BlockComparator.h
+++ b/src/Blocks/BlockComparator.h
@@ -182,7 +182,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_COMPARATOR, 1, 0);
}
diff --git a/src/Blocks/BlockCrops.h b/src/Blocks/BlockCrops.h
index 7208c8ff8..1d612e685 100644
--- a/src/Blocks/BlockCrops.h
+++ b/src/Blocks/BlockCrops.h
@@ -21,7 +21,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
auto & rand = GetRandomProvider();
diff --git a/src/Blocks/BlockDeadBush.h b/src/Blocks/BlockDeadBush.h
index 0653f538b..f7ae8bb96 100644
--- a/src/Blocks/BlockDeadBush.h
+++ b/src/Blocks/BlockDeadBush.h
@@ -52,7 +52,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// If cutting down with shears, drop self:
if ((a_Tool != nullptr) && (a_Tool->m_ItemType == E_ITEM_SHEARS))
diff --git a/src/Blocks/BlockDirt.h b/src/Blocks/BlockDirt.h
index 860bc66c8..fade1f992 100644
--- a/src/Blocks/BlockDirt.h
+++ b/src/Blocks/BlockDirt.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
if (a_BlockMeta == E_META_DIRT_COARSE)
{
diff --git a/src/Blocks/BlockDoor.h b/src/Blocks/BlockDoor.h
index ff3757d79..36dc788aa 100644
--- a/src/Blocks/BlockDoor.h
+++ b/src/Blocks/BlockDoor.h
@@ -196,7 +196,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
switch (m_BlockType)
{
diff --git a/src/Blocks/BlockDropSpenser.h b/src/Blocks/BlockDropSpenser.h
index fa591bf93..793cc0be9 100644
--- a/src/Blocks/BlockDropSpenser.h
+++ b/src/Blocks/BlockDropSpenser.h
@@ -5,8 +5,6 @@
#pragma once
-#include "../Blocks/BlockPiston.h"
-#include "../BlockEntities/DropSpenserEntity.h"
#include "Mixins.h"
@@ -14,9 +12,9 @@
class cBlockDropSpenserHandler :
- public cPitchYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>
+ public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>
{
- using Super = cPitchYawRotator<cBlockEntityHandler, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
+ using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>, 0x07, 0x03, 0x04, 0x02, 0x05, 0x01, 0x00>;
public:
@@ -24,28 +22,9 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
- {
- cItems res(cItem(m_BlockType, 1));
- if (a_BlockEntity != nullptr)
- {
- auto be = static_cast<cDropSpenserEntity *>(a_BlockEntity);
- res.AddItemGrid(be->GetContents());
- }
- return res;
- }
-
-
-
-
-
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) const override
{
UNUSED(a_Meta);
return 11;
}
} ;
-
-
-
-
diff --git a/src/Blocks/BlockEnchantingTable.h b/src/Blocks/BlockEnchantingTable.h
index a03ae7a2a..5edf9fdda 100644
--- a/src/Blocks/BlockEnchantingTable.h
+++ b/src/Blocks/BlockEnchantingTable.h
@@ -62,17 +62,10 @@ private:
}
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
- if ((a_BlockEntity == nullptr) || (a_BlockEntity->GetBlockType() != E_BLOCK_ENCHANTMENT_TABLE))
- {
- return {};
- }
-
- auto & EnchantingTable = static_cast<const cEnchantingTableEntity &>(*a_BlockEntity);
- cItem Item = cItem(E_BLOCK_ENCHANTMENT_TABLE);
- Item.m_CustomName = EnchantingTable.GetCustomName();
- return Item;
+ // Drops handled by the block entity:
+ return {};
}
diff --git a/src/Blocks/BlockEnderchest.h b/src/Blocks/BlockEnderchest.h
index 93009da64..fe5835f9a 100644
--- a/src/Blocks/BlockEnderchest.h
+++ b/src/Blocks/BlockEnderchest.h
@@ -1,7 +1,6 @@
#pragma once
-#include "BlockEntity.h"
#include "Mixins.h"
@@ -18,7 +17,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Only drop something when mined with a pickaxe:
if (
@@ -29,13 +28,12 @@ private:
// 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, 1, 0);
- }
- else
- {
- return cItem(E_BLOCK_OBSIDIAN, 8, 0);
+ return cItem(E_BLOCK_ENDER_CHEST);
}
+
+ return cItem(E_BLOCK_OBSIDIAN, 8);
}
+
return {};
}
diff --git a/src/Blocks/BlockEntity.h b/src/Blocks/BlockEntity.h
index b1aee7526..4b9de1f12 100644
--- a/src/Blocks/BlockEntity.h
+++ b/src/Blocks/BlockEntity.h
@@ -4,7 +4,6 @@
#include "BlockHandler.h"
#include "ChunkInterface.h"
#include "../Item.h"
-#include "../BlockEntities/BlockEntityWithItems.h"
@@ -44,37 +43,3 @@ private:
return true;
}
};
-
-
-
-
-
-/** Wrapper for blocks that have a cBlockEntityWithItems descendant attached to them.
-When converting to pickups, drops self with meta reset to zero, and adds the container contents. */
-template <typename Base = cBlockEntityHandler>
-class cContainerEntityHandler:
- public Base
-{
-public:
-
- constexpr cContainerEntityHandler(BLOCKTYPE a_BlockType):
- Base(a_BlockType)
- {
- }
-
-private:
-
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const override
- {
- // Reset meta to 0
- cItems res(cItem(Base::m_BlockType, 1, 0));
-
- // Drop the contents:
- if (a_BlockEntity != nullptr)
- {
- auto container = static_cast<cBlockEntityWithItems *>(a_BlockEntity);
- res.AddItemGrid(container->GetContents());
- }
- return res;
- }
-};
diff --git a/src/Blocks/BlockFarmland.h b/src/Blocks/BlockFarmland.h
index c6340f58a..27ec7e89c 100644
--- a/src/Blocks/BlockFarmland.h
+++ b/src/Blocks/BlockFarmland.h
@@ -27,7 +27,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_BLOCK_DIRT, 1, 0);
}
diff --git a/src/Blocks/BlockFire.h b/src/Blocks/BlockFire.h
index eff29d03e..4227c67a0 100644
--- a/src/Blocks/BlockFire.h
+++ b/src/Blocks/BlockFire.h
@@ -52,7 +52,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// No pickups from this block
return {};
diff --git a/src/Blocks/BlockFlower.h b/src/Blocks/BlockFlower.h
index 527be7d5d..b5bc6f957 100644
--- a/src/Blocks/BlockFlower.h
+++ b/src/Blocks/BlockFlower.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
NIBBLETYPE meta = a_BlockMeta & 0x7;
return cItem(m_BlockType, 1, meta);
diff --git a/src/Blocks/BlockFlowerPot.h b/src/Blocks/BlockFlowerPot.h
index d91347654..d5e37c243 100644
--- a/src/Blocks/BlockFlowerPot.h
+++ b/src/Blocks/BlockFlowerPot.h
@@ -1,8 +1,6 @@
#pragma once
-#include "BlockEntity.h"
-
@@ -18,7 +16,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_FLOWER_POT, 1, 0);
}
diff --git a/src/Blocks/BlockFluid.h b/src/Blocks/BlockFluid.h
index b7510b9a9..05a7c0d62 100644
--- a/src/Blocks/BlockFluid.h
+++ b/src/Blocks/BlockFluid.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// No pickups
return {};
diff --git a/src/Blocks/BlockFurnace.h b/src/Blocks/BlockFurnace.h
index 781843f5a..2c88cfafd 100644
--- a/src/Blocks/BlockFurnace.h
+++ b/src/Blocks/BlockFurnace.h
@@ -1,8 +1,6 @@
#pragma once
-#include "../Blocks/BlockPiston.h"
-#include "../BlockEntities/FurnaceEntity.h"
#include "Mixins.h"
@@ -19,15 +17,9 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
- cItems res(cItem(E_BLOCK_FURNACE, 1)); // We can't drop a lit furnace
- if (a_BlockEntity != nullptr)
- {
- auto be = static_cast<cFurnaceEntity *>(a_BlockEntity);
- res.AddItemGrid(be->GetContents());
- }
- return res;
+ return cItem(E_BLOCK_FURNACE); // We can't drop a lit furnace
}
diff --git a/src/Blocks/BlockGlass.h b/src/Blocks/BlockGlass.h
index 5269402d4..6dc82c1a5 100644
--- a/src/Blocks/BlockGlass.h
+++ b/src/Blocks/BlockGlass.h
@@ -16,7 +16,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Only drop self when mined with silk-touch:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockGlowstone.h b/src/Blocks/BlockGlowstone.h
index 11aa5e379..1e187084d 100644
--- a/src/Blocks/BlockGlowstone.h
+++ b/src/Blocks/BlockGlowstone.h
@@ -16,7 +16,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Drop self only when using silk-touch:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockGrass.h b/src/Blocks/BlockGrass.h
index 65a3f5908..1292ebfc2 100644
--- a/src/Blocks/BlockGrass.h
+++ b/src/Blocks/BlockGrass.h
@@ -31,7 +31,7 @@ private:
DieInDarkness
};
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
if (!ToolHasSilkTouch(a_Tool))
{
diff --git a/src/Blocks/BlockGravel.h b/src/Blocks/BlockGravel.h
index 6e26c92ed..972dea4e4 100644
--- a/src/Blocks/BlockGravel.h
+++ b/src/Blocks/BlockGravel.h
@@ -16,7 +16,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// TODO: Handle the Fortune and Silk touch enchantments here
if (GetRandomProvider().RandBool(0.10))
diff --git a/src/Blocks/BlockHandler.cpp b/src/Blocks/BlockHandler.cpp
index f2eb4f966..371f34ec0 100644
--- a/src/Blocks/BlockHandler.cpp
+++ b/src/Blocks/BlockHandler.cpp
@@ -522,21 +522,13 @@ void cBlockHandler::NeighborChanged(cChunkInterface & a_ChunkInterface, Vector3i
-cItems cBlockHandler::ConvertToPickups(
- NIBBLETYPE a_BlockMeta,
- cBlockEntity * a_BlockEntity,
- const cEntity * a_Digger,
- const cItem * a_Tool
-) const
+cItems cBlockHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const
{
- UNUSED(a_BlockEntity);
UNUSED(a_Digger);
UNUSED(a_Tool);
// Add self:
- cItems res;
- res.push_back(cItem(m_BlockType, 1, a_BlockMeta));
- return res;
+ return cItem(m_BlockType, 1, a_BlockMeta);
}
diff --git a/src/Blocks/BlockHandler.h b/src/Blocks/BlockHandler.h
index 87b259d54..91362960e 100644
--- a/src/Blocks/BlockHandler.h
+++ b/src/Blocks/BlockHandler.h
@@ -146,16 +146,10 @@ public:
/** Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
Doesn't do any actual block change / mining, only calculates the pickups.
- a_BlockEntity is the block entity present at the block, if any, nullptr if none.
a_Digger is the entity that caused the conversion, usually the player digging.
a_Tool is the tool used for the digging.
The default implementation drops a single item created from m_BlockType and the current meta. */
- virtual cItems ConvertToPickups(
- NIBBLETYPE a_BlockMeta,
- cBlockEntity * a_BlockEntity,
- const cEntity * a_Digger = nullptr,
- const cItem * a_Tool = nullptr
- ) const;
+ virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger = nullptr, const cItem * a_Tool = nullptr) const;
/** Checks if the block can stay at the specified relative coords in the chunk */
virtual bool CanBeAt(
diff --git a/src/Blocks/BlockHopper.h b/src/Blocks/BlockHopper.h
index d05bb3bf8..7380b8d34 100644
--- a/src/Blocks/BlockHopper.h
+++ b/src/Blocks/BlockHopper.h
@@ -8,9 +8,9 @@
class cBlockHopperHandler :
- public cPitchYawRotator<cContainerEntityHandler<cBlockEntityHandler>>
+ public cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>
{
- using Super = cPitchYawRotator<cContainerEntityHandler<cBlockEntityHandler>>;
+ using Super = cPitchYawRotator<cClearMetaOnDrop<cBlockEntityHandler>>;
public:
diff --git a/src/Blocks/BlockIce.h b/src/Blocks/BlockIce.h
index 10cd71b8a..12505b3fd 100644
--- a/src/Blocks/BlockIce.h
+++ b/src/Blocks/BlockIce.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Only drop self when using silk-touch:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h
index 647f96211..c08f1b6bb 100644
--- a/src/Blocks/BlockLeaves.h
+++ b/src/Blocks/BlockLeaves.h
@@ -93,7 +93,7 @@ private:
return false;
}
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// If breaking with shears, drop self:
if ((a_Tool != nullptr) && (a_Tool->m_ItemType == E_ITEM_SHEARS))
diff --git a/src/Blocks/BlockLever.h b/src/Blocks/BlockLever.h
index 14389add0..d3b03bbda 100644
--- a/src/Blocks/BlockLever.h
+++ b/src/Blocks/BlockLever.h
@@ -45,7 +45,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Reset meta to zero:
return cItem(E_BLOCK_LEVER, 1, 0);
diff --git a/src/Blocks/BlockMelon.h b/src/Blocks/BlockMelon.h
index f5230b7e5..09841e642 100644
--- a/src/Blocks/BlockMelon.h
+++ b/src/Blocks/BlockMelon.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_MELON_SLICE, GetRandomProvider().RandInt<char>(3, 7), 0);
}
diff --git a/src/Blocks/BlockMobHead.h b/src/Blocks/BlockMobHead.h
index 71fb6c958..fb81a07d8 100644
--- a/src/Blocks/BlockMobHead.h
+++ b/src/Blocks/BlockMobHead.h
@@ -2,7 +2,6 @@
#pragma once
#include "BlockEntity.h"
-#include "../BlockEntities/MobHeadEntity.h"
@@ -19,14 +18,10 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
- if ((a_BlockEntity == nullptr) || (a_BlockEntity->GetBlockType() != E_BLOCK_HEAD))
- {
- return {};
- }
- auto mobHeadEntity = static_cast<cMobHeadEntity *>(a_BlockEntity);
- return cItem(E_ITEM_HEAD, 1, static_cast<short>(mobHeadEntity->GetType()));
+ // Drops handled by the block entity:
+ return {};
}
diff --git a/src/Blocks/BlockMobSpawner.h b/src/Blocks/BlockMobSpawner.h
index 5e3592f84..b9d8cd29f 100644
--- a/src/Blocks/BlockMobSpawner.h
+++ b/src/Blocks/BlockMobSpawner.h
@@ -44,7 +44,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// No pickups
return {};
diff --git a/src/Blocks/BlockMycelium.h b/src/Blocks/BlockMycelium.h
index 322c9d4d5..bf489eed7 100644
--- a/src/Blocks/BlockMycelium.h
+++ b/src/Blocks/BlockMycelium.h
@@ -18,7 +18,7 @@ private:
// TODO: Add Mycel Spread
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_BLOCK_DIRT, 1, 0);
}
diff --git a/src/Blocks/BlockNetherWart.h b/src/Blocks/BlockNetherWart.h
index c1226224f..590a55772 100644
--- a/src/Blocks/BlockNetherWart.h
+++ b/src/Blocks/BlockNetherWart.h
@@ -19,7 +19,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
if (a_BlockMeta == 0x03)
{
diff --git a/src/Blocks/BlockOre.h b/src/Blocks/BlockOre.h
index 5dbeac268..98db5198d 100644
--- a/src/Blocks/BlockOre.h
+++ b/src/Blocks/BlockOre.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// If using silk-touch, drop self rather than the resource:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 87b5c1480..7e6ff5e3f 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -339,7 +339,7 @@ void cBlockPistonHeadHandler::OnBroken(
-cItems cBlockPistonHeadHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, const cEntity * a_Digger, const cItem * a_Tool) const
+cItems cBlockPistonHeadHandler::ConvertToPickups(NIBBLETYPE a_BlockMeta, const cEntity * a_Digger, const cItem * a_Tool) const
{
// Give a normal\sticky piston base, not piston extension
// With 1.7, the item forms of these technical blocks have been removed, so giving someone this will crash their client...
diff --git a/src/Blocks/BlockPiston.h b/src/Blocks/BlockPiston.h
index f8d155196..cbde5967e 100644
--- a/src/Blocks/BlockPiston.h
+++ b/src/Blocks/BlockPiston.h
@@ -159,5 +159,5 @@ public:
BLOCKTYPE a_OldBlockType, NIBBLETYPE a_OldBlockMeta
) const override;
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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;
} ;
diff --git a/src/Blocks/BlockPortal.h b/src/Blocks/BlockPortal.h
index e3970bbbb..64815f38f 100644
--- a/src/Blocks/BlockPortal.h
+++ b/src/Blocks/BlockPortal.h
@@ -40,7 +40,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// No pickups
return {};
diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h
index 14af7fe8a..39fdf7d2d 100644
--- a/src/Blocks/BlockRedstone.h
+++ b/src/Blocks/BlockRedstone.h
@@ -49,7 +49,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_REDSTONE_DUST, 1, 0);
}
diff --git a/src/Blocks/BlockRedstoneLamp.h b/src/Blocks/BlockRedstoneLamp.h
index 1f3016e40..3382f543b 100644
--- a/src/Blocks/BlockRedstoneLamp.h
+++ b/src/Blocks/BlockRedstoneLamp.h
@@ -16,7 +16,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Always drop the Off variant:
return(cItem(E_BLOCK_REDSTONE_LAMP_OFF, 1, 0));
diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h
index 332f39cea..eccb497e6 100644
--- a/src/Blocks/BlockRedstoneRepeater.h
+++ b/src/Blocks/BlockRedstoneRepeater.h
@@ -135,7 +135,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_REDSTONE_REPEATER, 1, 0);
}
diff --git a/src/Blocks/BlockRedstoneTorch.h b/src/Blocks/BlockRedstoneTorch.h
index d26b0bd8a..9680ca0dd 100644
--- a/src/Blocks/BlockRedstoneTorch.h
+++ b/src/Blocks/BlockRedstoneTorch.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Always drop the ON torch, meta 0
return cItem(E_BLOCK_REDSTONE_TORCH_ON, 1, 0);
diff --git a/src/Blocks/BlockSapling.h b/src/Blocks/BlockSapling.h
index 3ee48b1ed..3bce74fb1 100644
--- a/src/Blocks/BlockSapling.h
+++ b/src/Blocks/BlockSapling.h
@@ -19,7 +19,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// The low 3 bits store the sapling type; bit 0x08 is the growth timer (not used in pickups)
return cItem(m_BlockType, 1, a_BlockMeta & 0x07);
diff --git a/src/Blocks/BlockSeaLantern.h b/src/Blocks/BlockSeaLantern.h
index 2ff100d85..9804642ca 100644
--- a/src/Blocks/BlockSeaLantern.h
+++ b/src/Blocks/BlockSeaLantern.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Drop self only when using silk-touch:
if (ToolHasSilkTouch(a_Tool))
diff --git a/src/Blocks/BlockSideways.h b/src/Blocks/BlockSideways.h
index c846c5543..95619f564 100644
--- a/src/Blocks/BlockSideways.h
+++ b/src/Blocks/BlockSideways.h
@@ -40,7 +40,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Reset the orientation part of meta, keep the sub-type part of meta
return cItem(m_BlockType, 1, a_BlockMeta & 0x03);
diff --git a/src/Blocks/BlockSignPost.h b/src/Blocks/BlockSignPost.h
index 717a85ecf..8f0a1c157 100644
--- a/src/Blocks/BlockSignPost.h
+++ b/src/Blocks/BlockSignPost.h
@@ -33,7 +33,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_SIGN, 1, 0);
}
diff --git a/src/Blocks/BlockSlab.h b/src/Blocks/BlockSlab.h
index 0f6b0442f..2de4922b8 100644
--- a/src/Blocks/BlockSlab.h
+++ b/src/Blocks/BlockSlab.h
@@ -39,7 +39,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Reset the "top half" flag:
return cItem(m_BlockType, 1, a_BlockMeta & 0x07);
@@ -246,7 +246,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
BLOCKTYPE Block = GetSingleSlabType(m_BlockType);
return cItem(Block, 2, a_BlockMeta & 0x7);
diff --git a/src/Blocks/BlockSnow.h b/src/Blocks/BlockSnow.h
index 527d2c3b4..43e341e0c 100644
--- a/src/Blocks/BlockSnow.h
+++ b/src/Blocks/BlockSnow.h
@@ -81,7 +81,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// No drop unless dug up with a shovel
if ((a_Tool == nullptr) || !ItemCategory::IsShovel(a_Tool->m_ItemType))
diff --git a/src/Blocks/BlockStems.h b/src/Blocks/BlockStems.h
index 1742fe7e4..dc30fa6ec 100644
--- a/src/Blocks/BlockStems.h
+++ b/src/Blocks/BlockStems.h
@@ -22,7 +22,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(StemPickupType, 1, 0);
}
diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h
index 910473623..846ddf5df 100644
--- a/src/Blocks/BlockStone.h
+++ b/src/Blocks/BlockStone.h
@@ -17,7 +17,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Convert stone to cobblestone, unless using silk-touch:
if (
diff --git a/src/Blocks/BlockSugarcane.h b/src/Blocks/BlockSugarcane.h
index 49cf9db07..24c08db9f 100644
--- a/src/Blocks/BlockSugarcane.h
+++ b/src/Blocks/BlockSugarcane.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_SUGARCANE, 1, 0);
}
diff --git a/src/Blocks/BlockTallGrass.h b/src/Blocks/BlockTallGrass.h
index 2ae6e1910..f0da32cf5 100644
--- a/src/Blocks/BlockTallGrass.h
+++ b/src/Blocks/BlockTallGrass.h
@@ -29,7 +29,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// If using shears, drop self:
if ((a_Tool != nullptr) && (a_Tool->m_ItemType == E_ITEM_SHEARS))
diff --git a/src/Blocks/BlockTripwire.h b/src/Blocks/BlockTripwire.h
index b818a3628..7fbcc678d 100644
--- a/src/Blocks/BlockTripwire.h
+++ b/src/Blocks/BlockTripwire.h
@@ -18,7 +18,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_STRING, 1, 0);
}
diff --git a/src/Blocks/BlockVine.h b/src/Blocks/BlockVine.h
index b652a2498..5d4da0319 100644
--- a/src/Blocks/BlockVine.h
+++ b/src/Blocks/BlockVine.h
@@ -46,7 +46,7 @@ private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Only drops self when using shears, otherwise drops nothing:
if ((a_Tool == nullptr) || (a_Tool->m_ItemType != E_ITEM_SHEARS))
diff --git a/src/Blocks/BlockWallSign.h b/src/Blocks/BlockWallSign.h
index 1e9ea2e1f..d4b1ca59d 100644
--- a/src/Blocks/BlockWallSign.h
+++ b/src/Blocks/BlockWallSign.h
@@ -38,7 +38,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
return cItem(E_ITEM_SIGN, 1, 0);
}
diff --git a/src/Blocks/Mixins.h b/src/Blocks/Mixins.h
index 040969ddb..a5c3e751e 100644
--- a/src/Blocks/Mixins.h
+++ b/src/Blocks/Mixins.h
@@ -38,7 +38,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Don't drop anything:
return {};
@@ -63,7 +63,7 @@ public:
private:
- virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity * a_BlockEntity, 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
{
// Reset the meta to zero:
return cItem(this->m_BlockType);