From 1c5b324767683fd73729d95eab8559ebafc2098f Mon Sep 17 00:00:00 2001 From: Alejandro Aguilera Date: Tue, 27 Sep 2011 11:06:57 +0200 Subject: [PATCH] Make iron bars and glass panes stick to everything but air. --- overviewer_core/src/iterate.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/overviewer_core/src/iterate.c b/overviewer_core/src/iterate.c index 450815b..041f0b4 100644 --- a/overviewer_core/src/iterate.c +++ b/overviewer_core/src/iterate.c @@ -284,14 +284,15 @@ generate_pseudo_data(RenderState *state, unsigned char ancilData) { return final_data; - /* portal, iron bars and glass panes - * Note: iron bars and glass panes "stick" to other blocks, but - * at the moment of writing this is not clear which ones stick and - * which others no, so for the moment stick only with himself. - * This is a TODO! - */ - } else if ((state->block == 90) || (state->block == 101) || - (state->block == 102) || (state->block == 113)) { + } else if ((state->block == 101) || (state->block == 102)) { + /* iron bars and glass panes: + * they seem to stick to almost everything but air, but + * not sure yet! Still a TODO! */ + /* return check adjacent blocks with air, bit inverted */ + return check_adjacent_blocks(state, x, y, z, 0) ^ 0x0f; + + } else if ((state->block == 90) || (state->block == 113)) { + /* portal and nether brick fences */ return check_adjacent_blocks(state, x, y, z, state->block); }