0

add flowers and berries

This commit is contained in:
InrcedibleHolg
2019-12-07 08:27:16 +01:00
parent 678048177d
commit 8c08b44a38
4 changed files with 22 additions and 9 deletions

View File

@@ -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)