Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
content_mapnode.cpp File Reference
#include "content_mapnode.h"
#include "irrlichttypes_bloated.h"
#include "mapnode.h"
#include "nodedef.h"
#include "nameidmapping.h"
#include "util/string.h"
+ Include dependency graph for content_mapnode.cpp:

Macros

#define CONTENT_STONE   0
 
#define CONTENT_WATER   2
 
#define CONTENT_TORCH   3
 
#define CONTENT_WATERSOURCE   9
 
#define CONTENT_SIGN_WALL   14
 
#define CONTENT_CHEST   15
 
#define CONTENT_FURNACE   16
 
#define CONTENT_LOCKABLE_CHEST   17
 
#define CONTENT_FENCE   21
 
#define CONTENT_RAIL   30
 
#define CONTENT_LADDER   31
 
#define CONTENT_LAVA   32
 
#define CONTENT_LAVASOURCE   33
 
#define CONTENT_GRASS   0x800
 
#define CONTENT_TREE   0x801
 
#define CONTENT_LEAVES   0x802
 
#define CONTENT_GRASS_FOOTSTEPS   0x803
 
#define CONTENT_MESE   0x804
 
#define CONTENT_MUD   0x805
 
#define CONTENT_CLOUD   0x806
 
#define CONTENT_COALSTONE   0x807
 
#define CONTENT_WOOD   0x808
 
#define CONTENT_SAND   0x809
 
#define CONTENT_COBBLE   0x80a
 
#define CONTENT_STEEL   0x80b
 
#define CONTENT_GLASS   0x80c
 
#define CONTENT_MOSSYCOBBLE   0x80d
 
#define CONTENT_GRAVEL   0x80e
 
#define CONTENT_SANDSTONE   0x80f
 
#define CONTENT_CACTUS   0x810
 
#define CONTENT_BRICK   0x811
 
#define CONTENT_CLAY   0x812
 
#define CONTENT_PAPYRUS   0x813
 
#define CONTENT_BOOKSHELF   0x814
 
#define CONTENT_JUNGLETREE   0x815
 
#define CONTENT_JUNGLEGRASS   0x816
 
#define CONTENT_NC   0x817
 
#define CONTENT_NC_RB   0x818
 
#define CONTENT_APPLE   0x819
 
#define CONTENT_SAPLING   0x820
 

Functions

MapNode mapnode_translate_to_internal (MapNode n_from, u8 version)
 
void content_mapnode_get_name_id_mapping (NameIdMapping *nimap)
 

Variables

content_t trans_table_19 [21][2]
 

Macro Definition Documentation

◆ CONTENT_APPLE

#define CONTENT_APPLE   0x819

◆ CONTENT_BOOKSHELF

#define CONTENT_BOOKSHELF   0x814

◆ CONTENT_BRICK

#define CONTENT_BRICK   0x811

◆ CONTENT_CACTUS

#define CONTENT_CACTUS   0x810

◆ CONTENT_CHEST

#define CONTENT_CHEST   15

◆ CONTENT_CLAY

#define CONTENT_CLAY   0x812

◆ CONTENT_CLOUD

#define CONTENT_CLOUD   0x806

◆ CONTENT_COALSTONE

#define CONTENT_COALSTONE   0x807

◆ CONTENT_COBBLE

#define CONTENT_COBBLE   0x80a

◆ CONTENT_FENCE

#define CONTENT_FENCE   21

◆ CONTENT_FURNACE

#define CONTENT_FURNACE   16

◆ CONTENT_GLASS

#define CONTENT_GLASS   0x80c

◆ CONTENT_GRASS

#define CONTENT_GRASS   0x800

◆ CONTENT_GRASS_FOOTSTEPS

#define CONTENT_GRASS_FOOTSTEPS   0x803

◆ CONTENT_GRAVEL

#define CONTENT_GRAVEL   0x80e

◆ CONTENT_JUNGLEGRASS

#define CONTENT_JUNGLEGRASS   0x816

◆ CONTENT_JUNGLETREE

#define CONTENT_JUNGLETREE   0x815

◆ CONTENT_LADDER

#define CONTENT_LADDER   31

◆ CONTENT_LAVA

#define CONTENT_LAVA   32

◆ CONTENT_LAVASOURCE

#define CONTENT_LAVASOURCE   33

◆ CONTENT_LEAVES

#define CONTENT_LEAVES   0x802

◆ CONTENT_LOCKABLE_CHEST

#define CONTENT_LOCKABLE_CHEST   17

◆ CONTENT_MESE

#define CONTENT_MESE   0x804

◆ CONTENT_MOSSYCOBBLE

#define CONTENT_MOSSYCOBBLE   0x80d

◆ CONTENT_MUD

#define CONTENT_MUD   0x805

◆ CONTENT_NC

#define CONTENT_NC   0x817

◆ CONTENT_NC_RB

#define CONTENT_NC_RB   0x818

◆ CONTENT_PAPYRUS

#define CONTENT_PAPYRUS   0x813

◆ CONTENT_RAIL

#define CONTENT_RAIL   30

◆ CONTENT_SAND

#define CONTENT_SAND   0x809

◆ CONTENT_SANDSTONE

#define CONTENT_SANDSTONE   0x80f

◆ CONTENT_SAPLING

#define CONTENT_SAPLING   0x820

◆ CONTENT_SIGN_WALL

#define CONTENT_SIGN_WALL   14

◆ CONTENT_STEEL

#define CONTENT_STEEL   0x80b

◆ CONTENT_STONE

#define CONTENT_STONE   0

◆ CONTENT_TORCH

#define CONTENT_TORCH   3

◆ CONTENT_TREE

#define CONTENT_TREE   0x801

◆ CONTENT_WATER

#define CONTENT_WATER   2

◆ CONTENT_WATERSOURCE

#define CONTENT_WATERSOURCE   9

◆ CONTENT_WOOD

#define CONTENT_WOOD   0x808

Function Documentation

◆ content_mapnode_get_name_id_mapping()

void content_mapnode_get_name_id_mapping ( NameIdMapping * nimap)

References CONTENT_AIR, CONTENT_IGNORE, and NameIdMapping::set().

Referenced by ItemStack::deSerialize(), and MapBlock::deSerialize_pre22().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapnode_translate_to_internal()

MapNode mapnode_translate_to_internal ( MapNode n_from,
u8 version )

References MapNode::getContent(), MapNode::setContent(), and trans_table_19.

Referenced by MapNode::deSerialize_pre22().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ trans_table_19

content_t trans_table_19[21][2]
Initial value:
= {
{CONTENT_WOOD, 12},
{CONTENT_SAND, 13},
{CONTENT_CLAY, 27},
}
#define CONTENT_LEAVES
Definition content_mapnode.cpp:35
#define CONTENT_SAND
Definition content_mapnode.cpp:42
#define CONTENT_PAPYRUS
Definition content_mapnode.cpp:52
#define CONTENT_GRASS
Definition content_mapnode.cpp:33
#define CONTENT_BOOKSHELF
Definition content_mapnode.cpp:53
#define CONTENT_MUD
Definition content_mapnode.cpp:38
#define CONTENT_SANDSTONE
Definition content_mapnode.cpp:48
#define CONTENT_GRAVEL
Definition content_mapnode.cpp:47
#define CONTENT_CLOUD
Definition content_mapnode.cpp:39
#define CONTENT_CLAY
Definition content_mapnode.cpp:51
#define CONTENT_WOOD
Definition content_mapnode.cpp:41
#define CONTENT_BRICK
Definition content_mapnode.cpp:50
#define CONTENT_GLASS
Definition content_mapnode.cpp:45
#define CONTENT_TREE
Definition content_mapnode.cpp:34
#define CONTENT_STEEL
Definition content_mapnode.cpp:44
#define CONTENT_COBBLE
Definition content_mapnode.cpp:43
#define CONTENT_MOSSYCOBBLE
Definition content_mapnode.cpp:46
#define CONTENT_COALSTONE
Definition content_mapnode.cpp:40
#define CONTENT_CACTUS
Definition content_mapnode.cpp:49
#define CONTENT_MESE
Definition content_mapnode.cpp:37
#define CONTENT_GRASS_FOOTSTEPS
Definition content_mapnode.cpp:36

Referenced by content_translate_from_19_to_internal(), and mapnode_translate_to_internal().