CavEX/source/block/block_dirt.c
2022-12-03 13:15:27 +01:00

46 lines
1.1 KiB
C

#include "blocks.h"
static enum block_material getMaterial(struct block_info* this) {
return MATERIAL_ORGANIC;
}
static bool getBoundingBox(struct block_info* this, bool entity,
struct AABB* x) {
aabb_setsize(x, 1.0F, 1.0F, 1.0F);
return true;
}
static struct face_occlusion*
getSideMask(struct block_info* this, enum side side, struct block_info* it) {
return face_occlusion_full();
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(2, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_dirt = {
.name = "Dirt",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
.double_sided = false,
.can_see_through = false,
.ignore_lighting = false,
.flammable = false,
};