CavEX/source/block/block_cobweb.c
2022-12-04 11:34:16 +01:00

47 lines
1.2 KiB
C

#include "blocks.h"
static enum block_material getMaterial(struct block_info* this) {
return MATERIAL_STONE;
}
static bool getBoundingBox(struct block_info* this, bool entity,
struct AABB* x) {
aabb_setsize(x, 1.0F, 1.0F, 1.0F);
return !entity;
}
static struct face_occlusion*
getSideMask(struct block_info* this, enum side side, struct block_info* it) {
return face_occlusion_empty();
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_CROSS;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(11, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_cobweb = {
.name = "Cobweb",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,
.double_sided = true,
.can_see_through = true,
.render_block_data.cross_random_displacement = false,
.ignore_lighting = false,
.flammable = false,
};