0

Add bee_hive, beenest, honeycom_block and honey_block

This commit is contained in:
Gijs Oortgiese
2019-12-26 14:35:03 +01:00
committed by Nicolas F
parent a9fa06f019
commit 885fa75f54
4 changed files with 82 additions and 1 deletions

View File

@@ -326,6 +326,11 @@ enum mc_block_id {
block_scaffolding = 11414,
block_bamboo = 11416,
block_composter = 11417,
// 1.15 blocks below
block_beehive = 11501,
block_bee_nest = 11502,
block_honeycomb_block = 11503,
block_honey_block = 11504,
// adding a gap in the numbering of walls to keep them all
// in one numbering block starting at 21000
block_andesite_wall = 21000,

View File

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

View File

@@ -5170,3 +5170,68 @@ def sandstone(self, blockid, data):
# scaffolding
block(blockid=11414, top_image="assets/minecraft/textures/block/scaffolding_top.png", side_image="assets/minecraft/textures/block/scaffolding_side.png", solid=False, transparent=True)
# beehive and bee_nest
@material(blockid=[11501, 11502], data=list(range(8)), solid=True)
def beehivenest(self, blockid, data):
if blockid == 11501: #beehive
t_top = self.load_image("assets/minecraft/textures/block/beehive_end.png")
t_side = self.load_image("assets/minecraft/textures/block/beehive_side.png")
t_front = self.load_image("assets/minecraft/textures/block/beehive_front.png")
t_front_honey = self.load_image("assets/minecraft/textures/block/beehive_front_honey.png")
elif blockid == 11502: #bee_nest
t_top = self.load_image("assets/minecraft/textures/block/bee_nest_top.png")
t_side = self.load_image("assets/minecraft/textures/block/bee_nest_side.png")
t_front = self.load_image("assets/minecraft/textures/block/bee_nest_front.png")
t_front_honey = self.load_image("assets/minecraft/textures/block/bee_nest_front_honey.png")
if data >= 4:
front = t_front_honey
else:
front = t_front
if self.rotation == 0: # rendering north upper-left
if data == 0 or data == 4: # south
return self.build_full_block(t_top, t_side, t_side, t_side, front)
elif data == 1 or data == 5: # west
return self.build_full_block(t_top, t_side, t_side, front, t_side)
elif data == 2 or data == 6: # north
return self.build_full_block(t_top, t_side, front, t_side, t_side)
elif data == 3 or data == 7: # east
return self.build_full_block(t_top, front, t_side, t_side, t_side)
elif self.rotation == 1: # north upper-right
if data == 0 or data == 4: # south
return self.build_full_block(t_top, t_side, t_side, front, t_side)
elif data == 1 or data == 5: # west
return self.build_full_block(t_top, t_side, front, t_side, t_side)
elif data == 2 or data == 6: # north
return self.build_full_block(t_top, front, t_side, t_side, t_side)
elif data == 3 or data == 7: # east
return self.build_full_block(t_top, t_side, t_side, t_side, front)
elif self.rotation == 2: # north lower-right
if data == 0 or data == 4: # south
return self.build_full_block(t_top, t_side, front, t_side, t_side)
elif data == 1 or data == 5: # west
return self.build_full_block(t_top, front, t_side, t_side, t_side)
elif data == 2 or data == 6: # north
return self.build_full_block(t_top, t_side, t_side, t_side, front)
elif data == 3 or data == 7: # east
return self.build_full_block(t_top, t_side, t_side, front, t_side)
elif self.rotation == 3: # north lower-left
if data == 0 or data == 4: # south
return self.build_full_block(t_top, front, t_side, t_side, t_side)
elif data == 1 or data == 5: # west
return self.build_full_block(t_top, t_side, t_side, t_side, front)
elif data == 2 or data == 6: # north
return self.build_full_block(t_top, t_side, t_side, front, t_side)
elif data == 3 or data == 7: # east
return self.build_full_block(t_top, t_side, front, t_side, t_side)
# honeycomb_block
block(blockid=11503, top_image="assets/minecraft/textures/block/honeycomb_block.png")
# honey_block
block(blockid=11504, top_image="assets/minecraft/textures/block/honey_block_top.png", side_image="assets/minecraft/textures/block/honey_block_side.png")

View File

@@ -835,6 +835,11 @@ class RegionSet(object):
"minecraft:smooth_red_sandstone_stairs": (11415, 0),
'minecraft:bamboo': (11416, 0),
"minecraft:composter": (11417, 0),
# 1.15 blocks below
'minecraft:beehive': (11501, 0),
'minecraft:bee_nest': (11502, 0),
'minecraft:honeycomb_block': (11503, 0),
'minecraft:honey_block': (11504, 0),
# adding a gap in the numbering of walls to keep them all
# in one numbering block starting at 21000
'minecraft:andesite_wall': (21000, 0),
@@ -1017,6 +1022,12 @@ class RegionSet(object):
elif key in ['minecraft:ladder', 'minecraft:chest', 'minecraft:ender_chest', 'minecraft:trapped_chest', 'minecraft:furnace']:
facing = palette_entry['Properties']['facing']
data = {'north': 2, 'south': 3, 'west': 4, 'east': 5}[facing]
elif key in ['minecraft:beehive', 'minecraft:bee_nest']:
facing = palette_entry['Properties']['facing']
honey_level = int(palette_entry['Properties']['honey_level'])
data = {'south': 0, 'west': 1, 'north': 2, 'east': 3}[facing]
if honey_level == 5:
data = {'south': 4, 'west': 5, 'north': 6, 'east': 7}[facing]
elif key.endswith('_button'):
facing = palette_entry['Properties']['facing']
face = palette_entry['Properties']['face']