TextureWeaving???

This commit is contained in:
leha-code 2022-04-18 21:05:40 -04:00
parent 8fa97352ba
commit c348cbe0e3
No known key found for this signature in database
GPG Key ID: 15227A6455DDF7EE
2 changed files with 35 additions and 1 deletions

View File

@ -60,7 +60,7 @@ INDEX = [
"spritesheet.png",
"title.png",
"touchgui.png",
"badge/minecon140.png",
"minecon140.png",
"raknet_high_72.png",
"raknet_low_18.png",
# Item entitites

34
planet/weaving.py Normal file
View File

@ -0,0 +1,34 @@
from PIL import Image
POSITIONS = {
"grass_top" : (0, 0, 16, 16),
"stone": (16, 0, 32, 16),
"dirt": (32, 0, 48, 16),
"grass_side_carried": (48, 0, 64, 16),
"planks_oak": (64, 0, 80, 16),
"stone_slab_side" : (80, 0, 96, 16),
"stone_slab_top":(96, 0, 112, 16),
"brick":(112, 0, 128, 16),
"tnt_side":(128, 0, 144, 16),
"tnt_top":(144, 0, 160, 16),
"tnt_bottom":(160, 0, 176, 16),
"web": (176, 0, 192, 16),
"flower_rose":(192, 0, 208, 16),
"flower_dandelion":(208, 0, 224, 16),
"sapling_oak": (240, 0, 256, 16),
"cobblestone": (0, 16, 16, 32),
"bedrock": (16, 16, 32, 32),
"sand":(32, 16, 48, 32), # I love these blocks
"gravel":(48, 16, 64, 32),
"log_oak":(64, 16, 80, 32),
"log_oak_top":(80, 16, 96, 32),
}
if __name__ == "__main__":
with Image.open("/home/leha2/.minecraft-pi/overrides/images/terrain.png") as img:
region=img.crop(POSITIONS["gravel"])
region.show()