Merge pull request #1786 from IncredibleHolg/flowers-berry
add flowers and berries
This commit is contained in:
@@ -331,6 +331,7 @@ enum mc_block_id {
|
||||
block_bee_nest = 11502,
|
||||
block_honeycomb_block = 11503,
|
||||
block_honey_block = 11504,
|
||||
block_sweet_berry_bush = 11505,
|
||||
// adding a gap in the numbering of walls to keep them all
|
||||
// in one numbering block starting at 21000
|
||||
block_andesite_wall = 21000,
|
||||
|
||||
@@ -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 83
|
||||
#define OVERVIEWER_EXTENSION_VERSION 84
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -1686,12 +1686,12 @@ def wool(self, blockid, data):
|
||||
sprite(blockid=37, imagename="assets/minecraft/textures/block/dandelion.png")
|
||||
|
||||
# flowers
|
||||
@material(blockid=38, data=list(range(10)), transparent=True)
|
||||
@material(blockid=38, data=list(range(13)), transparent=True)
|
||||
def flower(self, blockid, data):
|
||||
flower_map = ["poppy", "blue_orchid", "allium", "azure_bluet", "red_tulip", "orange_tulip",
|
||||
"white_tulip", "pink_tulip", "oxeye_daisy", "dandelion"]
|
||||
"white_tulip", "pink_tulip", "oxeye_daisy", "dandelion", "wither_rose",
|
||||
"cornflower", "lily_of_the_valley"]
|
||||
texture = self.load_image_texture("assets/minecraft/textures/block/%s.png" % flower_map[data])
|
||||
|
||||
return self.build_billboard(texture)
|
||||
|
||||
# brown mushroom
|
||||
@@ -5118,10 +5118,16 @@ def structure_block(self, blockid, data):
|
||||
img = self.load_image_texture("assets/minecraft/textures/block/structure_block_data.png")
|
||||
return self.build_block(img, img)
|
||||
|
||||
# beetroots
|
||||
@material(blockid=207, data=list(range(4)), transparent=True, nospawn=True)
|
||||
# beetroots(207), berry bushes(11505)
|
||||
@material(blockid=[207, 11505], data=list(range(4)), transparent=True, nospawn=True)
|
||||
def crops(self, blockid, data):
|
||||
raw_crop = self.load_image_texture("assets/minecraft/textures/block/beetroots_stage%d.png" % data)
|
||||
|
||||
crops_id_to_tex = {
|
||||
207: "assets/minecraft/textures/block/beetroots_stage%d.png",
|
||||
11505: "assets/minecraft/textures/block/sweet_berry_bush_stage%d.png",
|
||||
}
|
||||
|
||||
raw_crop = self.load_image_texture(crops_id_to_tex[blockid] % data)
|
||||
crop1 = self.transform_image_top(raw_crop)
|
||||
crop2 = self.transform_image_side(raw_crop)
|
||||
crop3 = crop2.transpose(Image.FLIP_LEFT_RIGHT)
|
||||
|
||||
@@ -387,7 +387,7 @@ class RegionSet(object):
|
||||
'minecraft:green_wool': (35, 13),
|
||||
'minecraft:red_wool': (35, 14),
|
||||
'minecraft:black_wool': (35, 15),
|
||||
|
||||
# Flowers
|
||||
'minecraft:poppy': (38, 0),
|
||||
'minecraft:blue_orchid': (38, 1),
|
||||
'minecraft:allium': (38, 2),
|
||||
@@ -398,6 +398,10 @@ class RegionSet(object):
|
||||
'minecraft:pink_tulip': (38, 7),
|
||||
'minecraft:oxeye_daisy': (38, 8),
|
||||
'minecraft:dandelion': (38, 9),
|
||||
"minecraft:wither_rose": (38, 10),
|
||||
"minecraft:cornflower": (38, 11),
|
||||
"minecraft:lily_of_the_valley": (38, 12),
|
||||
|
||||
'minecraft:brown_mushroom': (39, 0),
|
||||
'minecraft:red_mushroom': (40, 0),
|
||||
'minecraft:gold_block': (41, 0),
|
||||
@@ -842,6 +846,7 @@ class RegionSet(object):
|
||||
'minecraft:bee_nest': (11502, 0),
|
||||
'minecraft:honeycomb_block': (11503, 0),
|
||||
'minecraft:honey_block': (11504, 0),
|
||||
'minecraft:sweet_berry_bush': (11505, 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),
|
||||
@@ -1134,7 +1139,8 @@ class RegionSet(object):
|
||||
if p['open'] == 'true': data |= 0x04
|
||||
if p['half'] == 'top': data |= 0x08
|
||||
elif key in ['minecraft:beetroots', 'minecraft:melon_stem', 'minecraft:wheat',
|
||||
'minecraft:pumpkin_stem', 'minecraft:potatoes', 'minecraft:carrots']:
|
||||
'minecraft:pumpkin_stem', 'minecraft:potatoes', 'minecraft:carrots',
|
||||
'minecraft:sweet_berry_bush']:
|
||||
data = palette_entry['Properties']['age']
|
||||
elif key == 'minecraft:lantern':
|
||||
if palette_entry['Properties']['hanging'] == 'true':
|
||||
|
||||
Reference in New Issue
Block a user