Added first implementation of cClearMetaOnDrop
This commit is contained in:
parent
a4d9ccded4
commit
1929d16724
@ -3,17 +3,18 @@
|
||||
|
||||
#include "BlockHandler.h"
|
||||
#include "../World.h"
|
||||
#include "ClearMetaOnDrop.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class cBlockLadderHandler :
|
||||
public cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>
|
||||
public cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >
|
||||
{
|
||||
public:
|
||||
cBlockLadderHandler(BLOCKTYPE a_BlockType)
|
||||
: cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04>(a_BlockType)
|
||||
: cClearMetaOnDrop<cMetaRotator<cBlockHandler, 0x07, 0x02, 0x05, 0x03, 0x04> >(a_BlockType)
|
||||
{
|
||||
}
|
||||
|
||||
|
18
src/Blocks/ClearMetaOnDrop.h
Normal file
18
src/Blocks/ClearMetaOnDrop.h
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
template<class Base>
|
||||
class cClearMetaOnDrop : public Base
|
||||
{
|
||||
public:
|
||||
|
||||
cClearMetaOnDrop(BLOCKTYPE a_BlockType) :
|
||||
Base(a_BlockType)
|
||||
{}
|
||||
|
||||
virtual ~cClearMetaOnDrop() {}
|
||||
virtual void ConvertToPickups(cItems & a_Pickups, NIBBLETYPE a_BlockMeta) override
|
||||
{
|
||||
a_Pickups.push_back(cItem(this->m_BlockType, 1, 0));
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user