Remove obsolete block functions

This commit is contained in:
xtreme8000 2023-03-27 19:54:06 +02:00
parent 656d9a9826
commit 6328ae8a6f
62 changed files with 0 additions and 674 deletions

View file

@ -44,10 +44,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
if(this->block->metadata & 0x8) {
switch(side) {
@ -78,19 +74,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_bed = {
.name = "Bed",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_bed,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(1, 1);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_bedrock = {
.name = "Bedrock",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_TOP:
@ -46,19 +42,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_bookshelf = {
.name = "Bookshelf",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(7, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_bricks = {
.name = "Bricks",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(13, 1);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_brown_mushroom = {
.name = "Brown mushroom",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 1,

View file

@ -43,10 +43,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
switch(side) {
case SIDE_TOP: return TEXTURE_INDEX(5, 4);
@ -55,19 +51,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_cactus = {
.name = "Cactus",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cactus,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -44,10 +44,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
switch(side) {
case SIDE_TOP: return TEXTURE_INDEX(9, 7);
@ -59,19 +55,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_cake = {
.name = "Cake",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cake,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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 getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(6, 1);
}
@ -54,19 +50,13 @@ static uint8_t getTextureIndex4(struct block_info* this, enum side side) {
return TEXTURE_INDEX(0, 9);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_iron = {
.name = "Block of Iron",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -84,13 +74,11 @@ struct block block_iron = {
struct block block_gold = {
.name = "Block of Gold",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -108,13 +96,11 @@ struct block block_gold = {
struct block block_diamond = {
.name = "Diamond Block",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex3,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -132,13 +118,11 @@ struct block block_diamond = {
struct block block_lapis = {
.name = "Lapis Block",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex4,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
struct block_data* right = this->neighbours + SIDE_RIGHT;
struct block_data* left = this->neighbours + SIDE_LEFT;
@ -106,19 +102,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return tex[side];
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_chest = {
.name = "Chest",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -138,13 +128,11 @@ struct block block_chest = {
struct block block_locked_chest = {
.name = "Chest",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 15,

View file

@ -34,27 +34,17 @@ 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(8, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_clay = {
.name = "Clay",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(this->block->type) {
default: return TEXTURE_INDEX(0, 1);
@ -45,19 +41,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_cobblestone = {
.name = "Cobblestone",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -75,13 +65,11 @@ struct block block_cobblestone = {
struct block block_mossstone = {
.name = "Moss Stone",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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,

View file

@ -34,27 +34,17 @@ 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(this->block->metadata + 6, 5);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_crops = {
.name = "Crops",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_crops,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_FRONT:
@ -64,19 +60,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_dispenser = {
.name = "Dispenser",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -60,10 +60,6 @@ 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_FULL;
}
static uint8_t getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(1, (this->block->metadata & 0x08) ? 5 : 6);
}
@ -72,19 +68,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(2, (this->block->metadata & 0x08) ? 5 : 6);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_wooden_door = {
.name = "Wooden Door",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial1,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_door,
.renderBlockAlways = NULL,
.luminance = 0,
@ -102,13 +92,11 @@ struct block block_wooden_door = {
struct block block_iron_door = {
.name = "Iron Door",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial2,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_door,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(this->block->metadata) {
default:
@ -55,19 +51,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_double_slab = {
.name = "Double Slab",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -38,10 +38,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
switch(side) {
case SIDE_TOP:
@ -51,19 +47,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_farmland = {
.name = "Farmland",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_farmland,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -43,27 +43,17 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
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(4, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_fence = {
.name = "Fence",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_fence,
.renderBlockAlways = render_block_fence_always,
.luminance = 0,

View file

@ -33,27 +33,17 @@ 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_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(3, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_fire = {
.name = "Fire",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_fire,
.renderBlockAlways = NULL,
.luminance = 15,

View file

@ -34,27 +34,17 @@ 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(13, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_flower = {
.name = "Flower",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_FRONT:
@ -64,19 +60,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_furnaceoff = {
.name = "Furnace",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -96,13 +86,11 @@ struct block block_furnaceoff = {
struct block block_furnaceon = {
.name = "Furnace",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 13,

View file

@ -35,27 +35,17 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
face_occlusion_empty();
}
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(1, 3);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_glass = {
.name = "Glass",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(9, 6);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_glowstone = {
.name = "Glowstone",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 15,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_TOP:
@ -52,22 +48,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
switch(side) {
case SIDE_TOP: return 0x619961;
default: return 0xFFFFFF;
}
}
struct block block_grass = {
.name = "Grass",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(3, 1);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_gravel = {
.name = "Gravel",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -35,27 +35,17 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
face_occlusion_empty();
}
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(4, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_ice = {
.name = "Ice",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_TOP: return TEXTURE_INDEX(11, 4);
@ -45,19 +41,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_jukebox = {
.name = "Jukebox",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -51,27 +51,17 @@ 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_LADDER;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(3, 5);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_ladder = {
.name = "Ladder",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_ladder,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -47,27 +47,17 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FLUID;
}
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_lava = {
.name = "Lava",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_fluid,
.renderBlockAlways = NULL,
.luminance = 15,

View file

@ -43,10 +43,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
&sides_mask;
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
switch(this->block->metadata & 0x3) {
case 1: return TEXTURE_INDEX(4, 8);
@ -55,24 +51,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
switch(this->block->metadata & 0x3) {
case 0: return 0x619961;
case 1: return 0x48B518;
case 2: return 0x80A755;
default: return 0xFFFFFF;
}
}
struct block block_leaves = {
.name = "Leaves",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(this->block->metadata) {
default:
@ -65,19 +61,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_log = {
.name = "Log",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(7, 6);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_netherrack = {
.name = "Netherrack",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(10, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_noteblock = {
.name = "Note Block",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(5, 2);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_obsidian = {
.name = "Obsidian",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(this->block->type) {
case 14: // gold
@ -56,19 +52,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_coalore = {
.name = "Coal ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -86,13 +76,11 @@ struct block block_coalore = {
struct block block_ironore = {
.name = "Iron ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -110,13 +98,11 @@ struct block block_ironore = {
struct block block_goldore = {
.name = "Gold ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -134,13 +120,11 @@ struct block block_goldore = {
struct block block_diamondore = {
.name = "Diamond ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -158,13 +142,11 @@ struct block block_diamondore = {
struct block block_redstoneore = {
.name = "Redstone ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -182,13 +164,11 @@ struct block block_redstoneore = {
struct block block_lapisore = {
.name = "Lapis lazuli ore",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(4, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_planks = {
.name = "Planks",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -33,27 +33,17 @@ 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_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(0, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_portal = {
.name = "Portal",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_portal,
.renderBlockAlways = NULL,
.luminance = 11,

View file

@ -43,10 +43,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
return (side == SIDE_BOTTOM) ? &side_bottom : face_occlusion_empty();
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FULL;
}
static uint8_t getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(1, 0);
}
@ -55,19 +51,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(4, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_stone_pressure_plate = {
.name = "Pressure Plate",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial1,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_pressure_plate,
.renderBlockAlways = NULL,
.luminance = 0,
@ -86,13 +76,11 @@ struct block block_stone_pressure_plate = {
struct block block_wooden_pressure_plate = {
.name = "Pressure Plate",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial2,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_pressure_plate,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_FRONT:
@ -64,19 +60,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_pumpkin = {
.name = "Pumpkin",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -96,13 +86,11 @@ struct block block_pumpkin = {
struct block block_pumpkin_lit = {
.name = "Jack o'Lantern",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 15,

View file

@ -39,10 +39,6 @@ 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_FLAT;
}
static uint8_t getTextureIndex1(struct block_info* this, enum side side) {
return (this->block->metadata < 6) ? TEXTURE_INDEX(0, 8) :
TEXTURE_INDEX(0, 7);
@ -57,19 +53,13 @@ static uint8_t getTextureIndex3(struct block_info* this, enum side side) {
return TEXTURE_INDEX(3, 12);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_rail = {
.name = "Rail",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_rail,
.renderBlockAlways = NULL,
.luminance = 0,
@ -88,13 +78,11 @@ struct block block_rail = {
struct block block_powered_rail = {
.name = "Powered rail",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_rail,
.renderBlockAlways = NULL,
.luminance = 0,
@ -113,13 +101,11 @@ struct block block_powered_rail = {
struct block block_detector_rail = {
.name = "Detector rail",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex3,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_rail,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(12, 1);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_red_mushroom = {
.name = "Red mushroom",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(9, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_reed = {
.name = "Reed",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(12, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_rose = {
.name = "Rose",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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 getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(2, 1);
}
@ -46,19 +42,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(8, 6);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_sand = {
.name = "Sand",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,
@ -76,13 +66,11 @@ struct block block_sand = {
struct block block_soulsand = {
.name = "Soul Sand",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_TOP: return TEXTURE_INDEX(0, 11);
@ -46,19 +42,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_sandstone = {
.name = "Sandstone",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(this->block->metadata) {
case 1: return TEXTURE_INDEX(7, 2);
@ -46,19 +42,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_sapling = {
.name = "Sapling",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -38,10 +38,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_HALF;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
switch(this->block->metadata) {
default:
@ -59,19 +55,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_slab = {
.name = "Slab",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_slab,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -49,27 +49,17 @@ getSideMask2(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_LAYER;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(2, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_snow = {
.name = "Snow",
.getRenderType = getRenderType,
.getSideMask = getSideMask1,
.getBoundingBox = getBoundingBox1,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_layer,
.renderBlockAlways = NULL,
.luminance = 0,
@ -88,13 +78,11 @@ struct block block_snow = {
struct block block_snow_block = {
.name = "Snow Block",
.getRenderType = getRenderType,
.getSideMask = getSideMask2,
.getBoundingBox = getBoundingBox2,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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_FULL;
}
static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(1, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_spawner = {
.name = "Monster Spawner",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(0, 3);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_sponge = {
.name = "Sponge",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -97,10 +97,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_STAIRS;
}
static uint8_t getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(4, 0);
}
@ -109,19 +105,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(0, 1);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_wooden_stairs = {
.name = "Stairs",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial1,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_stairs,
.renderBlockAlways = render_block_stairs_always,
.luminance = 0,
@ -142,13 +132,11 @@ struct block block_wooden_stairs = {
struct block block_stone_stairs = {
.name = "Stairs",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial2,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_stairs,
.renderBlockAlways = render_block_stairs_always,
.luminance = 0,

View file

@ -34,27 +34,17 @@ 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(1, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_stone = {
.name = "Stone",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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 getTextureIndex1(struct block_info* this, enum side side) {
switch(this->block->metadata) {
case 1: return TEXTURE_INDEX(5, 12); // tallgrass
@ -50,19 +46,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(6, 3); // deadbush
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return (this->block->metadata == 0) ? 0xFFFFFF : 0x619961;
}
struct block block_tallgrass = {
.name = "Tallgrass",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,
@ -81,13 +71,11 @@ struct block block_tallgrass = {
struct block block_deadbush = {
.name = "Deadbush",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_cross,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_TOP: return TEXTURE_INDEX(9, 0);
@ -46,19 +42,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_tnt = {
.name = "TNT",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -43,10 +43,6 @@ 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 getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(0, 5);
}
@ -59,19 +55,13 @@ static uint8_t getTextureIndex3(struct block_info* this, enum side side) {
return TEXTURE_INDEX(3, 6);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_torch = {
.name = "Torch",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_torch,
.renderBlockAlways = NULL,
.luminance = 14,
@ -89,13 +79,11 @@ struct block block_torch = {
struct block block_redstone_torch = {
.name = "Redstone Torch",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_torch,
.renderBlockAlways = NULL,
.luminance = 0,
@ -113,13 +101,11 @@ struct block block_redstone_torch = {
struct block block_redstone_torch_lit = {
.name = "Redstone Torch",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex3,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_torch,
.renderBlockAlways = NULL,
.luminance = 7,

View file

@ -68,27 +68,17 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
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(8, 3);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_trapdoor = {
.name = "Trapdoor",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_trapdoor,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -47,10 +47,6 @@ getSideMask(struct block_info* this, enum side side, struct block_info* it) {
}
}
static enum block_render_type getRenderType(struct block_info* this) {
return RENDERTYPE_FLUID;
}
static uint8_t getTextureIndex1(struct block_info* this, enum side side) {
return TEXTURE_INDEX(1, 0);
}
@ -59,19 +55,13 @@ static uint8_t getTextureIndex2(struct block_info* this, enum side side) {
return TEXTURE_INDEX(5, 0);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_water_still = {
.name = "Water",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex1,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_fluid,
.renderBlockAlways = NULL,
.luminance = 0,
@ -89,13 +79,11 @@ struct block block_water_still = {
struct block block_water_flowing = {
.name = "Water",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex2,
.transparent = true,
.getBaseColor = getBaseColor,
.renderBlock = render_block_fluid,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
if(this->block->metadata >= 9)
return TEXTURE_INDEX(1, 13 + 9 - this->block->metadata);
@ -51,19 +47,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
return TEXTURE_INDEX(0, 4);
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_wool = {
.name = "Wool",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -34,10 +34,6 @@ 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) {
switch(side) {
case SIDE_FRONT:
@ -50,19 +46,13 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
}
}
static uint32_t getBaseColor(struct block_info* this, enum side side) {
return 0xFFFFFF;
}
struct block block_workbench = {
.name = "Workbench",
.getRenderType = getRenderType,
.getSideMask = getSideMask,
.getBoundingBox = getBoundingBox,
.getMaterial = getMaterial,
.getTextureIndex = getTextureIndex,
.transparent = false,
.getBaseColor = getBaseColor,
.renderBlock = render_block_full,
.renderBlockAlways = NULL,
.luminance = 0,

View file

@ -127,12 +127,10 @@ void blocks_init() {
for(int k = 0; k < 256; k++) {
if(blocks[k]) {
assert(blocks[k]->getRenderType);
assert(blocks[k]->getMaterial);
assert(blocks[k]->getTextureIndex);
assert(blocks[k]->getSideMask);
assert(blocks[k]->getBoundingBox);
assert(blocks[k]->getBaseColor);
assert(blocks[k]->renderBlock);
assert(blocks[k]->block_item.renderItem);
}

View file

@ -49,22 +49,6 @@ enum side {
SIDE_MAX
};
enum block_render_type {
RENDERTYPE_FULL,
RENDERTYPE_FULL_OVERLAY,
RENDERTYPE_HALF,
RENDERTYPE_STAIRS,
RENDERTYPE_CROSS,
RENDERTYPE_CAKE,
RENDERTYPE_FLAT,
RENDERTYPE_LADDER,
RENDERTYPE_CACTUS,
RENDERTYPE_DOOR,
RENDERTYPE_TRAPDOOR,
RENDERTYPE_FLUID,
RENDERTYPE_LAYER
};
enum block_type {
BLOCK_AIR = 0,
BLOCK_STONE = 1,
@ -92,13 +76,11 @@ enum block_type {
struct block {
char name[32];
enum block_render_type (*getRenderType)(struct block_info*);
enum block_material (*getMaterial)(struct block_info*);
uint8_t (*getTextureIndex)(struct block_info*, enum side);
struct face_occlusion* (*getSideMask)(struct block_info*, enum side,
struct block_info*);
bool (*getBoundingBox)(struct block_info*, bool, struct AABB*);
uint32_t (*getBaseColor)(struct block_info*, enum side);
size_t (*renderBlock)(struct displaylist*, struct block_info*, enum side,
struct block_info*, uint8_t*, bool);
size_t (*renderBlockAlways)(struct displaylist*, struct block_info*,