summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockBrewingStand.h10
-rw-r--r--src/Blocks/BlockCobWeb.h10
-rw-r--r--src/Blocks/BlockFlowerPot.h9
-rw-r--r--src/Blocks/BlockLilypad.h9
-rw-r--r--src/Blocks/BlockMycelium.h8
-rw-r--r--src/Blocks/BlockRedstone.h11
-rw-r--r--src/Blocks/BlockRedstoneLamp.h9
-rw-r--r--src/Blocks/BlockRedstoneRepeater.h13
-rw-r--r--src/Blocks/BlockStone.h9
9 files changed, 67 insertions, 21 deletions
diff --git a/src/Blocks/BlockBrewingStand.h b/src/Blocks/BlockBrewingStand.h
index 77e383b16..57642bcb6 100644
--- a/src/Blocks/BlockBrewingStand.h
+++ b/src/Blocks/BlockBrewingStand.h
@@ -2,21 +2,25 @@
#pragma once
#include "BlockHandler.h"
-#include "ClearMetaOnDrop.h"
class cBlockBrewingStandHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockBrewingStandHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_ITEM_BREWING_STAND, 1, 0));
+ }
+
virtual bool IsUseable() override
{
return true;
diff --git a/src/Blocks/BlockCobWeb.h b/src/Blocks/BlockCobWeb.h
index 29a6b8155..982bfaa30 100644
--- a/src/Blocks/BlockCobWeb.h
+++ b/src/Blocks/BlockCobWeb.h
@@ -10,13 +10,19 @@
class cBlockCobWebHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockCobWebHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_Meta) override
+ {
+ a_Pickups.push_back(cItem(E_ITEM_STRING, 1, 0));
+ }
} ;
diff --git a/src/Blocks/BlockFlowerPot.h b/src/Blocks/BlockFlowerPot.h
index 39fbe1bd9..fc75ef638 100644
--- a/src/Blocks/BlockFlowerPot.h
+++ b/src/Blocks/BlockFlowerPot.h
@@ -9,13 +9,18 @@
class cBlockFlowerPotHandler :
- public cClearMetaOnDrop<cBlockEntityHandler>
+ public cBlockEntityHandler
{
public:
cBlockFlowerPotHandler(BLOCKTYPE a_BlockType) :
- cClearMetaOnDrop<cBlockEntityHandler>(a_BlockType)
+ cBlockEntityHandler(a_BlockType)
{
}
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_ITEM_FLOWER_POT, 1, 0));
+ }
} ;
diff --git a/src/Blocks/BlockLilypad.h b/src/Blocks/BlockLilypad.h
index fc37f360c..2dd4ec768 100644
--- a/src/Blocks/BlockLilypad.h
+++ b/src/Blocks/BlockLilypad.h
@@ -8,14 +8,19 @@
class cBlockLilypadHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockLilypadHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ // Reset meta to zero
+ a_Pickups.push_back(cItem(E_BLOCK_LILY_PAD, 1, 0));
+ }
};
diff --git a/src/Blocks/BlockMycelium.h b/src/Blocks/BlockMycelium.h
index 4d4a0bb4f..2a8ef5fca 100644
--- a/src/Blocks/BlockMycelium.h
+++ b/src/Blocks/BlockMycelium.h
@@ -8,16 +8,20 @@
class cBlockMyceliumHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockMyceliumHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
// TODO: Add Mycel Spread
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_BLOCK_DIRT, 1, 0));
+ }
virtual const char * GetStepSound(void) override
{
diff --git a/src/Blocks/BlockRedstone.h b/src/Blocks/BlockRedstone.h
index 6dbf46a57..a898c9acb 100644
--- a/src/Blocks/BlockRedstone.h
+++ b/src/Blocks/BlockRedstone.h
@@ -9,11 +9,11 @@
class cBlockRedstoneHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockRedstoneHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
@@ -22,6 +22,13 @@ public:
{
return ((a_RelY > 0) && cBlockInfo::FullyOccupiesVoxel(a_Chunk.GetBlock(a_RelX, a_RelY - 1, a_RelZ)));
}
+
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ // Reset meta to 0
+ a_Pickups.push_back(cItem(E_ITEM_REDSTONE_DUST, 1));
+ }
} ;
diff --git a/src/Blocks/BlockRedstoneLamp.h b/src/Blocks/BlockRedstoneLamp.h
index 4b0ca5b34..69a2b27c2 100644
--- a/src/Blocks/BlockRedstoneLamp.h
+++ b/src/Blocks/BlockRedstoneLamp.h
@@ -8,13 +8,18 @@
class cBlockRedstoneLampHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockRedstoneLampHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_BLOCK_REDSTONE_LAMP_OFF, 1, 0));
+ }
};
diff --git a/src/Blocks/BlockRedstoneRepeater.h b/src/Blocks/BlockRedstoneRepeater.h
index 1e9c00f2e..fe6cd21b9 100644
--- a/src/Blocks/BlockRedstoneRepeater.h
+++ b/src/Blocks/BlockRedstoneRepeater.h
@@ -4,16 +4,16 @@
#include "BlockHandler.h"
#include "Chunk.h"
#include "MetaRotator.h"
-#include "ClearMetaOnDrop.h"
+
class cBlockRedstoneRepeaterHandler :
- public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03, true> >
+ public cMetaRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03, true>
{
public:
cBlockRedstoneRepeaterHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03, true> >(a_BlockType)
+ : cMetaRotator<cBlockHandler, 0x03, 0x00, 0x01, 0x02, 0x03, true>(a_BlockType)
{
}
@@ -44,6 +44,13 @@ public:
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ // Reset meta to 0
+ a_Pickups.push_back(cItem(E_ITEM_REDSTONE_REPEATER, 1, 0));
+ }
+
+
virtual bool IsUseable(void) override
{
return true;
diff --git a/src/Blocks/BlockStone.h b/src/Blocks/BlockStone.h
index 697ab0312..cd5230f49 100644
--- a/src/Blocks/BlockStone.h
+++ b/src/Blocks/BlockStone.h
@@ -2,21 +2,24 @@
#pragma once
#include "BlockHandler.h"
-#include "ClearMetaOnDrop.h"
class cBlockStoneHandler :
- public cClearMetaOnDrop<cBlockHandler>
+ public cBlockHandler
{
public:
cBlockStoneHandler(BLOCKTYPE a_BlockType)
- : cClearMetaOnDrop<cBlockHandler>(a_BlockType)
+ : cBlockHandler(a_BlockType)
{
}
+ virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
+ {
+ a_Pickups.push_back(cItem(E_BLOCK_COBBLESTONE, 1, 0));
+ }
} ;