blob: 75ba77f9ac6ba2e1fb1d1bebf17868575eb92f74 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#include "cBlockToPickup.h"
#include "BlockID.h"
ENUM_ITEM_ID cBlockToPickup::ToPickup( unsigned char a_BlockID, ENUM_ITEM_ID a_UsedItemID )
{
(void)a_UsedItemID;
switch( a_BlockID )
{
case E_BLOCK_AIR:
return E_ITEM_EMPTY;
case E_BLOCK_STONE:
return E_ITEM_COBBLESTONE;
case E_BLOCK_GRASS:
return E_ITEM_DIRT;
case E_BLOCK_GLASS:
return E_ITEM_EMPTY;
case E_BLOCK_DIRT:
return E_ITEM_DIRT;
case E_BLOCK_LOG:
return E_ITEM_LOG;
case E_BLOCK_LEAVES:
if( a_UsedItemID == E_ITEM_SHEARS )
return E_ITEM_LEAVES;
else
return E_ITEM_EMPTY;
case E_BLOCK_COAL_ORE:
return E_ITEM_COAL;
case E_BLOCK_LAPIS_ORE:
return E_ITEM_DYE;
case E_BLOCK_REDSTONE_ORE_GLOWING:
case E_BLOCK_REDSTONE_ORE:
return E_ITEM_REDSTONE_DUST;
case E_BLOCK_DIAMOND_ORE:
return E_ITEM_DIAMOND;
case E_BLOCK_IRON_BLOCK:
return E_ITEM_IRON_BLOCK;
case E_BLOCK_DIAMOND_BLOCK:
return E_ITEM_DIAMOND_BLOCK;
case E_BLOCK_GOLD_BLOCK:
return E_ITEM_GOLD_BLOCK;
case E_BLOCK_SIGN_POST:
case E_BLOCK_WALLSIGN:
return E_ITEM_SIGN;
case E_BLOCK_REDSTONE_WIRE:
return E_ITEM_REDSTONE_DUST;
case E_BLOCK_REDSTONE_TORCH_OFF:
return E_ITEM_REDSTONE_TORCH_ON;
case E_BLOCK_MELON:
return E_ITEM_MELON_SLICE;
default:
return (ENUM_ITEM_ID)a_BlockID;
}
return E_ITEM_EMPTY;
}
|