import random
from pymclevel import MCSchematic
inputs = (
("length", (5, 1, 100)),
)
def perform(level, box, options, blockData = 15):
length = options["length"]
g = 5
if g == 5:
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
for y in xrange(box.miny, box.maxy):
if level.blockAt(x, y, z) == 106 and level.blockAt(x,y-1,z) == 0:
level.setBlockAt(x, y-1, z, 106])
level.setBlockDataAt(x, y-1, z, length)
Alternativey, this code should be fully working, the vines grow to the specified length and are given a metadata of 15 so they grow quickly.
import random
from pymclevel import MCSchematic
inputs = (
("length", (5, 1, 100)),
)
displayName = "Grow Vines"
def perform(level, box, options):
length = options["length"]
blockData = 15
g = 5
if g == 5:
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
for y in xrange(box.miny, box.maxy):
while(length > 0):
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0:
level.setBlockAt(x, y-1, z, 106)
level.setBlockDataAt(x, y-1, z, blockData)
length = length - 1
y = y - 1
Ok, now i have it like this:
import random
from pymclevel import MCSchematic
inputs = (
("length", (1, 1, 100)),
)
displayName = "Grow Vines"
def perform(level, box, options):
length = options["length"]
blockData = 15
g = 5
if g == 5:
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
for y in xrange(box.miny, box.maxy):
while(length > 0):
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 1:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 1)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 2:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 2)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 3:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 3)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 4:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 4)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 5:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 5)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 6:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 6)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 7:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 7)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 8:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 8)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 9:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 9)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 10:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 10)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 11:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 11)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 12:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 12)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 13:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 13)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 14:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 14)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 15:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 15)
length = length - 1
y = y - 1
This crashes mcedit when i use it. If i remove the while loop, it works but then i have to click the 'filter' button several times to get the length i want. The same thing happends with the code you wrote.
Thanks for you're help, dezlad. This is the first time i am coding something, so i might be a little bit noobish
import random
from pymclevel import MCSchematic
inputs = (
("length", (1, 1, 100)),
)
displayName = "Grow Vines"
def perform(level, box, options):
length = options["length"]
blockData = 15
g = 5
if g == 5:
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
for y in xrange(box.miny, box.maxy):
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 1:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 1)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 2:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 2)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 3:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 3)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 4:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 4)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 5:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 5)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 6:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 6)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 7:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 7)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 8:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 8)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 9:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 9)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 10:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 10)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 11:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 11)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 12:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 12)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 13:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 13)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 14:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 14)
if level.blockAt(x, y, z) == 106 and level.blockAt(x, y-1, z) == 0 and level.blockDataAt(x, y, z) == 15:
level.setBlockAt(x, y-length, z, 106)
level.setBlockDataAt(x, y-length, z, 15)
Its the exact same script without the while loop. With this i can't choose the length. My problem is that i can't get the while loop to work, it crashes mcedit with no errors.
Sup every 1.I have a problem with updating imported blocks of water.Yes, all this can be solved by using sand, but I'm creating a large map on which such problems will be everywhere, maybe there is a way to make the water fall?
Do not suggest an active water it's make it spread in all directions...
Sup every 1.I have a problem with updating imported blocks of water.Yes, all this can be solved by using sand, but I'm creating a large map on which such problems will be everywhere, maybe there is a way to make the water fall?
Do not suggest an active water it's make it spread in all directions...
Select area > fill and replace > find air replace with water.
It might not work depending on you're problem(you did not describe it properly!).
I made these filters for my CTM map when I needed, nothing more. I hope you find this post useful. Sorry for spelling errors, English isn't my native language.
Small, simple, tiny request. I need a filter that spreads ores out over the selected area replacing stone. I need it for my series of Maja's Lost Island Adventure (Link in my sig). For now I'm working on the V4 of the map. And so far I have been using a brush with random small sizes and placed the ores underground randomly. So could any of you dear coders make a filter that "replaces" random stones into ores? Don't make them generate too far from each other. The ore height
rule doesn't matter. So diamonds and gold can spawn at any height. If you see the pics on my topic you will see what I mean about the rule. As the sea level on my map is at height of 8-9 blocks. The veins should be the same like in MC. Diamonds 2-5, gold ~4, coal ~10, iron 3-6 and lapiz ~2.
Thank you. Keeping an eye on this topic. I will credit you in the topic. Helping me makes my map popular, which will make you popular at the same time
Sethbling made a filter like this a few weeks ago. Why not check it out?
hey um i have downloaded sum filters and when i press filter it gives some crappy eror i fink it might be i need to upgrade to the 0.1.6 version of mcedit
and also i want to learn python to create a filter i have in mind its kinda advanced but simple in other ways like it is to spawn mobs on top of each other like a pig spawns on top of a creeper im pretty sure its possible cause its basic creating a custom mob so if someone can give me something to learn python cause i want to create it my self but if someone can create it for me ill be very happy
thanks (ps would the latst version of mcedit affect filters)
Is there a filter to delete all entitys of a certain type from a map? i have Bats causing world corruption and i want to delete them from the map. How can i do that?
In MCedit select the area with the select tool (1) then there is an option to delete entities.
Ok, now i have it like this:
.py file
This crashes mcedit when i use it. If i remove the while loop, it works but then i have to click the 'filter' button several times to get the length i want. The same thing happends with the code you wrote.
Thanks for you're help, dezlad. This is the first time i am coding something, so i might be a little bit noobish
Its the exact same script without the while loop. With this i can't choose the length. My problem is that i can't get the while loop to work, it crashes mcedit with no errors.
Another problem is that it is very slow atm.
Edit: i also tried with you're version, it did not work.
Do not suggest an active water it's make it spread in all directions...
Select area > fill and replace > find air replace with water.
It might not work depending on you're problem(you did not describe it properly!).
This was my first ever attempt at a python script. Thanks to texelelf for the examples I referenced!
Biome tools - http://pastebin.com/aJ1XP7uL - randomized biomes, object outline check
Custom replace - http://pastebin.com/MM94V1X8 - replace with keeping the block data value
Empty chests - http://pastebin.com/UnU6E9Wj - delete chest content
Falling simulation - http://pastebin.com/v3P5buiv - delete air blocks and shifts the upper blocks down
Fix spawners & chests - http://pastebin.com/xu7y4La3 - appends a tileEntity to chest and spawner block if the isn't any
Generate vines - http://pastebin.com/3x3Mt2z3 - create vines on side of specified block type
Inverse replace - http://pastebin.com/bnArtsru - leave selected blocks and fills the others with specified blocks
Hanging blocks - http://pastebin.com/jpNeKccE - can't describe what this does, but awesome
Random replace - http://pastebin.com/0mcLkxN1 - simple block randomizer
I made these filters for my CTM map when I needed, nothing more. I hope you find this post useful.
Sorry for spelling errors, English isn't my native language.
Tried my replace filter? Could work.
It also makes creating complex planes with odd slopes and tapering edges a bit more straightforward.
Details thread from Reddit with link to download:
http://www.reddit.com/r/Minecraft/comments/12zmoc/my_mcedit_filter_to_draw_lines_between_two_points/
Instructional video:
Sample build:
Thanks to Codewarrior for the framework.
http://imgur.com/a/6ZQkn
It generates the rainbow within a selection box aligned to the width (x) axis. The z axis determines how "tunnel-like" it is.
Download the script off the album.
Think Python is good: http://abrightmoore.tumblr.com/post/32585470117/think-python-by-allen-downey-published-by-greentea
Filter download on the Imgur album:
http://imgur.com/a/Wz80o
And solid clouds:
Filter download on the Imgur album:
http://imgur.com/a/UyiXn
In MCedit select the area with the select tool (1) then there is an option to delete entities.
(Bats don't corrupt worlds)