0

Merge PR #1812 from IncredibleHolg

This commit is contained in:
Nicolas F
2020-08-05 18:14:27 +02:00
5 changed files with 102 additions and 5 deletions

View File

@@ -267,7 +267,20 @@ enum mc_block_id {
block_soul_campfire = 1003, block_soul_campfire = 1003,
block_blackstone = 1004, block_blackstone = 1004,
block_netherite_block = 1005, block_netherite_block = 1005,
block_warped_nylium = 1006,
block_crimson_nylium = 1007,
block_warped_wart_block = 1010,
block_shroomlight = 1011,
block_twisting_vines = 1012,
block_twisting_vines_plant = 1013,
block_weeping_vines = 1014,
block_weeping_vines_plant = 1015,
block_warped_fungus = 1016,
block_crimson_fungus = 1017,
block_warped_roots = 1018,
block_crimson_roots = 1019,
block_soul_soil = 1020,
block_nether_gold_ore = 1021,
// adding a gap in the numbering of walls to keep them all // adding a gap in the numbering of walls to keep them all
// in one numbering block starting at 1792 // in one numbering block starting at 1792
// all blocks between 1792 and 2047 are considered walls // all blocks between 1792 and 2047 are considered walls

View File

@@ -31,7 +31,7 @@
// increment this value if you've made a change to the c extension // increment this value if you've made a change to the c extension
// and want to force users to rebuild // and want to force users to rebuild
#define OVERVIEWER_EXTENSION_VERSION 87 #define OVERVIEWER_EXTENSION_VERSION 89
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>

View File

@@ -37,7 +37,9 @@ walk_chunk(RenderState* state, RenderPrimitiveNether* data) {
for (y = NETHER_ROOF - 1; y >= 0; y--) { for (y = NETHER_ROOF - 1; y >= 0; y--) {
blockid = get_data(state, BLOCKS, x, y - (state->chunky * 16), z); blockid = get_data(state, BLOCKS, x, y - (state->chunky * 16), z);
if (block_class_is_subset(blockid, (mc_block_t[]){block_bedrock, block_netherrack, block_quartz_ore, block_lava}, 4)) if (block_class_is_subset(blockid, (mc_block_t[]){block_bedrock, block_netherrack,
block_quartz_ore, block_lava, block_soul_sand, block_basalt, block_blackstone,
block_soul_soil, block_nether_gold_ore}, 9))
data->remove_block[x + 1][y][z + 1] = true; data->remove_block[x + 1][y][z + 1] = true;
else else
break; break;

View File

@@ -1077,7 +1077,8 @@ block(blockid=15, top_image="assets/minecraft/textures/block/iron_ore.png")
# coal ore # coal ore
block(blockid=16, top_image="assets/minecraft/textures/block/coal_ore.png") block(blockid=16, top_image="assets/minecraft/textures/block/coal_ore.png")
@material(blockid=[17,162,11306,11307,11308,11309,11310,11311], data=list(range(12)), solid=True) @material(blockid=[17, 162, 11306, 11307, 11308, 11309, 11310, 11311, 1008, 1009],
data=list(range(12)), solid=True)
def wood(self, blockid, data): def wood(self, blockid, data):
# extract orientation and wood type frorm data bits # extract orientation and wood type frorm data bits
wood_type = data & 3 wood_type = data & 3
@@ -1172,6 +1173,32 @@ def wood(self, blockid, data):
if wood_type == 3: # jungle wood if wood_type == 3: # jungle wood
top = self.load_image_texture("assets/minecraft/textures/block/stripped_jungle_log.png") top = self.load_image_texture("assets/minecraft/textures/block/stripped_jungle_log.png")
side = top side = top
if blockid == 1008: # nether logs aka stem
if wood_type == 0: # warped_stem
top = self.load_image_texture("assets/minecraft/textures/block/warped_stem_top.png")
side = self.load_image_texture("assets/minecraft/textures/block/warped_stem.png")
if wood_type == 1: # stripped_warped_stem
top = self.load_image_texture("assets/minecraft/textures/block/warped_stem_top.png")
side = self.load_image_texture("assets/minecraft/textures/block/stripped_warped_stem.png")
if wood_type == 2: # crimson_stem
top = self.load_image_texture("assets/minecraft/textures/block/crimson_stem_top.png")
side = self.load_image_texture("assets/minecraft/textures/block/crimson_stem.png")
if wood_type == 3: # crimson_stem
top = self.load_image_texture("assets/minecraft/textures/block/crimson_stem_top.png")
side = self.load_image_texture("assets/minecraft/textures/block/stripped_crimson_stem.png")
if blockid == 1009: # nether hyphae
if wood_type == 0: # warped_hyphae
top = self.load_image_texture("assets/minecraft/textures/block/warped_stem.png")
side = top
if wood_type == 1: # stripped_warped_hyphae
top = self.load_image_texture("assets/minecraft/textures/block/stripped_warped_stem.png")
side = top
if wood_type == 2: # crimson_hyphae
top = self.load_image_texture("assets/minecraft/textures/block/crimson_stem.png")
side = top
if wood_type == 3: # stripped_crimson_hyphae
top = self.load_image_texture("assets/minecraft/textures/block/stripped_crimson_stem.png")
side = top
elif blockid == 11311: # stripped acacia/dark wood: elif blockid == 11311: # stripped acacia/dark wood:
if wood_type == 0: # acacia if wood_type == 0: # acacia
top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png") top = self.load_image_texture("assets/minecraft/textures/block/stripped_acacia_log.png")
@@ -1688,6 +1715,15 @@ def flower(self, blockid, data):
sprite(blockid=39, imagename="assets/minecraft/textures/block/brown_mushroom.png") sprite(blockid=39, imagename="assets/minecraft/textures/block/brown_mushroom.png")
# red mushroom # red mushroom
sprite(blockid=40, imagename="assets/minecraft/textures/block/red_mushroom.png") sprite(blockid=40, imagename="assets/minecraft/textures/block/red_mushroom.png")
# warped fungus
sprite(blockid=1016, imagename="assets/minecraft/textures/block/warped_fungus.png")
# crimson fungus
sprite(blockid=1017, imagename="assets/minecraft/textures/block/crimson_fungus.png")
# warped roots
sprite(blockid=1018, imagename="assets/minecraft/textures/block/warped_roots.png")
# crimson roots
sprite(blockid=1019, imagename="assets/minecraft/textures/block/crimson_roots.png")
# block of gold # block of gold
block(blockid=41, top_image="assets/minecraft/textures/block/gold_block.png") block(blockid=41, top_image="assets/minecraft/textures/block/gold_block.png")
# block of iron # block of iron
@@ -3666,6 +3702,8 @@ block(blockid=88, top_image="assets/minecraft/textures/block/soul_sand.png")
# glowstone # glowstone
block(blockid=89, top_image="assets/minecraft/textures/block/glowstone.png") block(blockid=89, top_image="assets/minecraft/textures/block/glowstone.png")
# shroomlight
block(blockid=1011, top_image="assets/minecraft/textures/block/shroomlight.png")
# portal # portal
@material(blockid=90, data=[1, 2, 4, 5, 8, 10], transparent=True) @material(blockid=90, data=[1, 2, 4, 5, 8, 10], transparent=True)
@@ -4225,6 +4263,12 @@ def stem(self, blockid, data):
return img return img
# nether vines
billboard(blockid=1012, imagename="assets/minecraft/textures/block/twisting_vines.png")
billboard(blockid=1013, imagename="assets/minecraft/textures/block/twisting_vines_plant.png")
billboard(blockid=1014, imagename="assets/minecraft/textures/block/weeping_vines.png")
billboard(blockid=1015, imagename="assets/minecraft/textures/block/weeping_vines_plant.png")
# vines # vines
@material(blockid=106, data=list(range(32)), transparent=True, solid=False, nospawn=True) @material(blockid=106, data=list(range(32)), transparent=True, solid=False, nospawn=True)
def vines(self, blockid, data): def vines(self, blockid, data):
@@ -4234,6 +4278,7 @@ def vines(self, blockid, data):
# 1 UNWSE # 1 UNWSE
# 2 UWSEN # 2 UWSEN
# 3 USENW # 3 USENW
if self.rotation in [1, 2, 3]: if self.rotation in [1, 2, 3]:
bit_map = {1: [5, 3, 2, 1, 4], bit_map = {1: [5, 3, 2, 1, 4],
2: [5, 2, 1, 4, 3], 2: [5, 2, 1, 4, 3],
@@ -4359,6 +4404,15 @@ def fence_gate(self, blockid, data):
# mycelium # mycelium
block(blockid=110, top_image="assets/minecraft/textures/block/mycelium_top.png", side_image="assets/minecraft/textures/block/mycelium_side.png") block(blockid=110, top_image="assets/minecraft/textures/block/mycelium_top.png", side_image="assets/minecraft/textures/block/mycelium_side.png")
# warped_nylium & crimson_nylium
block(blockid=1006, top_image="assets/minecraft/textures/block/warped_nylium.png", side_image="assets/minecraft/textures/block/warped_nylium_side.png")
block(blockid=1007, top_image="assets/minecraft/textures/block/crimson_nylium.png", side_image="assets/minecraft/textures/block/crimson_nylium_side.png")
# soul soil
soul_soil_texture="assets/minecraft/textures/block/soul_soil.png"
block(blockid=1020, top_image=soul_soil_texture, side_image=soul_soil_texture)
# nether gold ore
nether_gold_texture="assets/minecraft/textures/block/nether_gold_ore.png"
block(blockid=1021, top_image=nether_gold_texture, side_image=nether_gold_texture)
# lilypad # lilypad
# At the moment of writing this lilypads has no ancil data and their # At the moment of writing this lilypads has no ancil data and their
@@ -5151,6 +5205,8 @@ block(blockid=213, top_image="assets/minecraft/textures/block/magma.png")
# nether wart block # nether wart block
block(blockid=214, top_image="assets/minecraft/textures/block/nether_wart_block.png") block(blockid=214, top_image="assets/minecraft/textures/block/nether_wart_block.png")
# warped wart block
block(blockid=1010, top_image="assets/minecraft/textures/block/warped_wart_block.png")
# red nether brick # red nether brick
block(blockid=215, top_image="assets/minecraft/textures/block/red_nether_bricks.png") block(blockid=215, top_image="assets/minecraft/textures/block/red_nether_bricks.png")

View File

@@ -696,6 +696,31 @@ class RegionSet(object):
'minecraft:soul_campfire': (1003, 0), 'minecraft:soul_campfire': (1003, 0),
'minecraft:blackstone': (1004, 0), 'minecraft:blackstone': (1004, 0),
'minecraft:netherite_block': (1005, 0), 'minecraft:netherite_block': (1005, 0),
'minecraft:warped_nylium': (1006, 0),
'minecraft:crimson_nylium': (1007, 0),
# Nether logs aka stem
'minecraft:warped_stem': (1008, 0),
'minecraft:stripped_warped_stem': (1008, 1),
'minecraft:crimson_stem': (1008, 2),
'minecraft:stripped_crimson_stem': (1008, 3),
# hyphae
'minecraft:warped_hyphae': (1009, 0),
'minecraft:stripped_warped_hyphae': (1009, 1),
'minecraft:crimson_hyphae': (1009, 2),
'minecraft:stripped_crimson_hyphae': (1009, 3),
# nether biomes
'minecraft:warped_wart_block': (1010, 0),
'minecraft:shroomlight': (1011, 0),
'minecraft:twisting_vines': (1012, 0),
'minecraft:twisting_vines_plant': (1013, 0),
'minecraft:weeping_vines': (1014, 0),
'minecraft:weeping_vines_plant': (1015, 0),
'minecraft:warped_fungus': (1016, 0),
'minecraft:crimson_fungus': (1017, 0),
'minecraft:warped_roots': (1018, 0),
'minecraft:crimson_roots': (1019, 0),
'minecraft:soul_soil': (1020, 0),
'minecraft:nether_gold_ore': (1021, 0),
# New blocks # New blocks
'minecraft:carved_pumpkin': (11300, 0), 'minecraft:carved_pumpkin': (11300, 0),
@@ -1027,7 +1052,8 @@ class RegionSet(object):
(key == 'minecraft:piston_head' and p.get('type', 'normal') == 'sticky') or (key == 'minecraft:piston_head' and p.get('type', 'normal') == 'sticky') or
(key == 'minecraft:observer' and p.get('powered', 'false') == 'true')): (key == 'minecraft:observer' and p.get('powered', 'false') == 'true')):
data |= 0x08 data |= 0x08
elif key.endswith('_log') or key.endswith('_wood') or key == 'minecraft:bone_block': elif (key.endswith('_log') or key.endswith('_wood') or
key == 'minecraft:bone_block' or key.endswith('_stem')):
axis = palette_entry['Properties']['axis'] axis = palette_entry['Properties']['axis']
if axis == 'x': if axis == 'x':
data |= 4 data |= 4