Add pointed dripstone

This commit is contained in:
Bernd Buschinski 2021-07-11 17:49:33 +02:00
parent 86b241a5f7
commit fc8a87fe2a
3 changed files with 22 additions and 0 deletions

View File

@ -392,6 +392,7 @@ enum mc_block_id {
block_dripstone = 1107,
block_smooth_basalt = 1108,
block_tuff = 1109,
block_pointed_dripstone = 1110,
// adding a gap in the numbering of walls to keep them all
// in one numbering block starting at 1792

View File

@ -6059,3 +6059,19 @@ block(blockid=1098, top_image="assets/minecraft/textures/block/chiseled_deepslat
block(blockid=1107, top_image="assets/minecraft/textures/block/dripstone_block.png")
block(blockid=1108, top_image="assets/minecraft/textures/block/smooth_basalt.png")
block(blockid=1109, top_image="assets/minecraft/textures/block/tuff.png")
@material(blockid=1110, data=list(range(16)), transparent=True)
def pointed_dripstone(self, blockid, data):
up_down = "down" if data & 0b1000 else "up"
if (data & 4) == 4: # base
tex = self.load_image_texture("assets/minecraft/textures/block/pointed_dripstone_%s_base.png" % (up_down))
elif (data & 3) == 3: # frustum
tex = self.load_image_texture("assets/minecraft/textures/block/pointed_dripstone_%s_frustum.png" % (up_down))
elif (data & 2) == 2: # middle
tex = self.load_image_texture("assets/minecraft/textures/block/pointed_dripstone_%s_middle.png" % (up_down))
elif (data & 1) == 1: # tip_merge
tex = self.load_image_texture("assets/minecraft/textures/block/pointed_dripstone_%s_tip_merge.png" % (up_down))
else: # 0 - tip
tex = self.load_image_texture("assets/minecraft/textures/block/pointed_dripstone_%s_tip.png" % (up_down))
return self.build_sprite(tex)

View File

@ -846,6 +846,7 @@ class RegionSet(object):
'minecraft:dripstone_block': (1107, 0),
'minecraft:smooth_basalt': (1108, 0),
'minecraft:tuff': (1109, 0),
'minecraft:pointed_dripstone': (1110, 0),
# New blocks
'minecraft:carved_pumpkin': (11300, 0),
@ -1400,6 +1401,10 @@ class RegionSet(object):
data |= (4 << 4)
if p['west'] == 'true':
data |= (8 << 4)
elif key == 'minecraft:pointed_dripstone':
p = palette_entry['Properties']
data = {'tip': 0, 'tip_merge': 1, 'middle': 2, 'frustum': 3, 'base': 4}[p['thickness']]
data |= {'up': 0, 'down': 0b1000}[p['vertical_direction']]
return (block, data)