1
0

Cobwebs are now washed away by water and can be broken by swords and shears, giving string.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1363 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-04-06 18:20:06 +00:00
parent 98afdb03a8
commit 2006de2217
6 changed files with 39 additions and 2 deletions

View File

@ -1810,6 +1810,10 @@
RelativePath="..\source\blocks\BlockCloth.h" RelativePath="..\source\blocks\BlockCloth.h"
> >
</File> </File>
<File
RelativePath="..\source\Blocks\BlockCobWeb.h"
>
</File>
<File <File
RelativePath="..\source\blocks\BlockCrops.h" RelativePath="..\source\blocks\BlockCrops.h"
> >

View File

@ -0,0 +1,30 @@
// BlockCobWeb.h
// Declares the cBlockCobWebHandler object representing the BlockHandler for cobwebs
#pragma once
class cBlockCobWebHandler :
public cBlockHandler
{
public:
cBlockCobWebHandler(BLOCKTYPE 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));
}
} ;

View File

@ -55,6 +55,7 @@
#include "BlockFlowerPot.h" #include "BlockFlowerPot.h"
#include "BlockCauldron.h" #include "BlockCauldron.h"
#include "BlockBrewingStand.h" #include "BlockBrewingStand.h"
#include "BlockCobWeb.h"
@ -104,6 +105,7 @@ cBlockHandler * cBlockHandler::CreateBlockHandler(BLOCKTYPE a_BlockType)
case E_BLOCK_COAL_ORE: return new cBlockOreHandler (a_BlockType); case E_BLOCK_COAL_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_COBBLESTONE: return new cBlockStoneHandler (a_BlockType); case E_BLOCK_COBBLESTONE: return new cBlockStoneHandler (a_BlockType);
case E_BLOCK_COBBLESTONE_STAIRS: return new cBlockStairsHandler (a_BlockType); case E_BLOCK_COBBLESTONE_STAIRS: return new cBlockStairsHandler (a_BlockType);
case E_BLOCK_COBWEB: return new cBlockCobWebHandler (a_BlockType);
case E_BLOCK_CROPS: return new cBlockCropsHandler (a_BlockType); case E_BLOCK_CROPS: return new cBlockCropsHandler (a_BlockType);
case E_BLOCK_DIAMOND_ORE: return new cBlockOreHandler (a_BlockType); case E_BLOCK_DIAMOND_ORE: return new cBlockOreHandler (a_BlockType);
case E_BLOCK_DIRT: return new cBlockDirtHandler (a_BlockType); case E_BLOCK_DIRT: return new cBlockDirtHandler (a_BlockType);

View File

@ -53,7 +53,7 @@ public:
{ {
return true; return true;
} }
} // switch (a_BlockType } // switch (a_BlockType)
return false; return false;
} }
} ; } ;

View File

@ -16,6 +16,6 @@ public:
virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override virtual bool CanHarvestBlock(BLOCKTYPE a_BlockType) override
{ {
return a_BlockType == E_BLOCK_COBWEB; return (a_BlockType == E_BLOCK_COBWEB);
} }
}; };

View File

@ -34,6 +34,7 @@ bool cFluidSimulator::CanWashAway(BLOCKTYPE a_BlockType)
{ {
case E_BLOCK_BROWN_MUSHROOM: case E_BLOCK_BROWN_MUSHROOM:
case E_BLOCK_CACTUS: case E_BLOCK_CACTUS:
case E_BLOCK_COBWEB:
case E_BLOCK_CROPS: case E_BLOCK_CROPS:
case E_BLOCK_DEAD_BUSH: case E_BLOCK_DEAD_BUSH:
case E_BLOCK_RAIL: case E_BLOCK_RAIL: