Flowerpots: use flowerpot mod!
Gets rid of homedecor entirely, which is a huge gain.
This commit is contained in:
parent
a89dbf1981
commit
016ddf2570
12
block.py
12
block.py
@ -315,7 +315,7 @@ class MTBlock:
|
||||
|
||||
for te in mcblock.tile_entities:
|
||||
id = te["id"]
|
||||
x, y, z = te["x"], te["y"], te["z"]
|
||||
x, y, z = -te["x"] - 1, te["y"], -te["z"] - 1
|
||||
index = ((y&0xf)<<8)|((z&0xf)<<4)|(x&0xf)
|
||||
f = te_convert.get(id.lower(), lambda arg: (None, None, None)) # Do nothing if not found
|
||||
block, p2, meta = f(te)
|
||||
@ -330,14 +330,10 @@ class MTBlock:
|
||||
if meta != None:
|
||||
try:
|
||||
p = meta[0]["_plant"]
|
||||
above = index + 256
|
||||
if above < 4096 and blocks[above] == 0:
|
||||
if p > 15:
|
||||
content[above], param2[above] = conversion_table[941][p&0xf]
|
||||
else:
|
||||
content[above], param2[above] = conversion_table[940][p]
|
||||
if p > 15:
|
||||
content[index], param2[index] = conversion_table[941][p&0xf]
|
||||
else:
|
||||
logger.warning("can't pot plant in pot across block border, or not air")
|
||||
content[index], param2[index] = conversion_table[940][p]
|
||||
except:
|
||||
self.metadata[(x&0xf, y&0xf, z&0xf)] = meta
|
||||
|
||||
|
@ -679,7 +679,7 @@
|
||||
139 1 default:mossycobble // FIXME: you may not want this
|
||||
139 default:cobble // FIXME: you may not want this
|
||||
|
||||
140 homedecor:flower_pot_terracotta // code will plant flowers on top
|
||||
140 flowerpot:empty // code will plant right flower
|
||||
|
||||
143 0 mesecons_button:button_off 8
|
||||
143 1 mesecons_button:button_off 3
|
||||
@ -883,33 +883,33 @@
|
||||
931 4 default:grass_5
|
||||
|
||||
// flower pot plants
|
||||
940 0 air
|
||||
940 1 flowers:mushroom_brown
|
||||
940 2 flowers:mushroom_red
|
||||
940 3 default:cactus
|
||||
940 4 default:dry_shrub
|
||||
940 5 flowers:rose
|
||||
940 6 flowers:geranium
|
||||
940 7 flowers:viola
|
||||
940 8 flowers:geranium
|
||||
940 9 flowers:rose
|
||||
940 10 flowers:tulip
|
||||
940 11 flowers:dandelion_white
|
||||
940 12 flowers:viola
|
||||
940 13 flowers:dandelion_white
|
||||
940 14 default:sapling
|
||||
940 15 default:pine_sapling
|
||||
940 0 flowerpot:empty
|
||||
940 1 flowerpot:flowers_mushroom_brown
|
||||
940 2 flowerpot:flowers_mushroom_red
|
||||
940 3 flowerpot:default_cactus
|
||||
940 4 flowerpot:default_dry_shrub
|
||||
940 5 flowerpot:flowers_rose
|
||||
940 6 flowerpot:flowers_geranium
|
||||
940 7 flowerpot:flowers_viola
|
||||
940 8 flowerpot:flowers_geranium
|
||||
940 9 flowerpot:flowers_rose
|
||||
940 10 flowerpot:flowers_tulip
|
||||
940 11 flowerpot:flowers_dandelion_white
|
||||
940 12 flowerpot:flowers_viola
|
||||
940 13 flowerpot:flowers_dandelion_white
|
||||
940 14 flowerpot:default_sapling
|
||||
940 15 flowerpot:default_pine_sapling
|
||||
// overflow
|
||||
#ifdef MORETREES
|
||||
941 0 moretrees:birch_sapling
|
||||
#else
|
||||
941 0 default:aspen_sapling
|
||||
941 0 flowerpot:default_aspen_sapling
|
||||
#endif
|
||||
941 1 default:junglesapling
|
||||
941 2 default:acacia_sapling
|
||||
941 3 default:sapling
|
||||
941 4 ferns:tree_fern_leaves
|
||||
941 5 flowers:dandelion_white
|
||||
941 1 flowerpot:default_junglesapling
|
||||
941 2 flowerpot:default_acacia_sapling
|
||||
941 3 flowerpot:default_sapling
|
||||
941 4 flowerpot:ferns_tree_fern_leaves
|
||||
941 5 flowerpot:flowers_dandelion_white
|
||||
|
||||
964 0 doors:door_wood_b_1 1
|
||||
964 1 doors:door_wood_b_1 2
|
||||
|
@ -56,7 +56,7 @@ if not os.path.exists(sys.argv[2]+"/get-mods.sh"):
|
||||
md.write("#!/bin/sh\n")
|
||||
md.write("# run this script to automatically get all the required mods\n")
|
||||
md.write("cd worldmods\n")
|
||||
md.write("for mod in LNJ2/carpet minetest-mods/signs_lib minetest-mods/xdecor minetest-mods/plantlife_modpack minetest-mods/homedecor_modpack Jeija/minetest-mod-mesecons minetest-mods/moreblocks pilzadam/nether minetest-mods/crops minetest-mods/quartz minetest-mods/biome_lib oOChainLynxOo/hardenedclay minetest-mods/lapis; do\n")
|
||||
md.write("for mod in LNJ2/carpet minetest-mods/signs_lib minetest-mods/xdecor minetest-mods/plantlife_modpack Jeija/minetest-mod-mesecons minetest-mods/moreblocks pilzadam/nether minetest-mods/crops minetest-mods/quartz minetest-mods/biome_lib oOChainLynxOo/hardenedclay minetest-mods/lapis minetest-mods/flowerpot; do\n")
|
||||
md.write(" echo \"Fetching: $mod\"\n")
|
||||
md.write(" s=`basename $mod`\n")
|
||||
md.write(" curl -q -L -o master.zip https://codeload.github.com/$mod/zip/master\n")
|
||||
@ -64,7 +64,7 @@ if not os.path.exists(sys.argv[2]+"/get-mods.sh"):
|
||||
md.write(" rm master.zip\n")
|
||||
md.write(" mv $s-master $s\n")
|
||||
md.write("done\n")
|
||||
md.write("for ex in plantlife_modpack/dryplants plantlife_modpack/along_shore plantlife_modpack/molehills plantlife_modpack/woodsoils plantlife_modpack/bushes plantlife_modpack/bushes_classic plantlife_modpack/youngtrees plantlife_modpack/3dmushrooms plantlife_modpack/cavestuff plantlife_modpack/poisonivy plantlife_modpack/trunks homedecor_modpack/fake_fire homedecor_modpack/computer homedecor_modpack/plasmascreen homedecor_modpack/lavalamp homedecor_modpack/building_blocks homedecor_modpack/inbox homedecor_modpack/homedecor_3d_extras homedecor_modpack/chains homedecor_modpack/lrfurn; do\n");
|
||||
md.write("for ex in plantlife_modpack/dryplants plantlife_modpack/along_shore plantlife_modpack/molehills plantlife_modpack/woodsoils plantlife_modpack/bushes plantlife_modpack/bushes_classic plantlife_modpack/youngtrees plantlife_modpack/3dmushrooms plantlife_modpack/cavestuff plantlife_modpack/poisonivy plantlife_modpack/trunks; do\n");
|
||||
md.write(" echo \"Pruning: $ex\"\n")
|
||||
md.write(" rm -rf $ex\n")
|
||||
md.write("done\n")
|
||||
|
@ -78,7 +78,7 @@ def convert_pot(te):
|
||||
# translation table for flowers
|
||||
# highly approximate, based on color only
|
||||
t = {
|
||||
":0" : 0, # air
|
||||
"minecraft:air:0" : 0,
|
||||
"minecraft:brown_mushroom:0" : 1,
|
||||
"minecraft:red_mushroom:0" : 2,
|
||||
"minecraft:cactus:0" : 3,
|
||||
@ -128,9 +128,9 @@ def convert_cmdblock(te):
|
||||
}
|
||||
return None, None, (fields, {})
|
||||
|
||||
te_convert = {"chest": convert_chest,
|
||||
"sign": convert_sign,
|
||||
"furnace": convert_furnace,
|
||||
"music": convert_nodeblock,
|
||||
"flowerpot": convert_pot,
|
||||
"control": convert_cmdblock}
|
||||
te_convert = {"minecraft:chest": convert_chest,
|
||||
"minecraft:sign": convert_sign,
|
||||
"minecraft:furnace": convert_furnace,
|
||||
"minecraft:music": convert_nodeblock,
|
||||
"minecraft:flower_pot": convert_pot,
|
||||
"minecraft:command_block": convert_cmdblock}
|
||||
|
Loading…
Reference in New Issue
Block a user