In case when I select some block types for script or for Fill/Replace tool, how exactly does it happen? See, when you select several materials, they get arranged in a line, making you think that they all are used, consequently. But there are also this big icon for one of them, that you can choose. Does it mean that actually only 1 material can be selected at a time?
Is writing to console with "print" an enormously costly operation?
In case when I select some block types for script or for Fill/Replace tool, how exactly does it happen? See, when you select several materials, they get arranged in a line, making you think that they all are used, consequently. But there are also this big icon for one of them, that you can choose. Does it mean that actually only 1 material can be selected at a time?
Is writing to console with "print" an enormously costly operation?
No, you can only use one material at a time. The rest of them is the "selection history", if you will. Meaning, the blocks you had selected previously are stored there for future use. Hopefully you get the idea.
Hello, I hope someone of you can help me a litlle out. (but first please don't criticize my English, because it's not my home-language, and I try my best to don't make same mistakes in spelling or grammar)
I try at the Moment to but some Item-frames on a chest and display the first Item in the Chest on the Item-frame. because I don't have much practice yet, I tryed to modify the MapIt filter. so far my code is looking this way:
import os<br>from copy import deepcopy<br>from pymclevel import TAG_List, TAG_Byte, TAG_Int, TAG_Compound, TAG_Short, TAG_Double, TAG_Float, TAG_String<br>from pymclevel import TileEntity<br>import mcplatform<br>import pygame<br>import numpy<br>import math<br><br>displayName = "Item im Rahmen" <br><br>def CreateItemFrame(x, y, z, dir, Item):<br> TileY = y<br> posy = float(y) + 0.5<br> if dir == 1: # Westen<br> direction = dir<br> rotation = 90.0<br> TileX = x + 1<br> TileZ = z<br> posx = float(x) + 0.9375<br> posz = float(z) + 0.5<br> elif dir == 3: # Osten<br> rotation = 270.0<br> direction = 3#dir<br> TileX = x - 1<br> TileZ = z<br> posx = float(x) + 0.0625<br> posz = float(z) + 0.5<br> elif dir == 0: # Norden<br> rotation = 0.0<br> direction = 2<br> TileZ = z + 1<br> TileX = x<br> posz = float(z) + 0.9375<br> posx = float(x) + 0.5<br> elif dir == 2: # Süden<br> rotation = 180.0<br> direction = 0<br> TileZ = z - 1<br> TileX = x<br> posz = float(z) + 0.0625<br> posx = float(x) + 0.5<br> iframe = TAG_Compound()<br> iframe["id"] = TAG_String("ItemFrame")<br> iframe["Pos"] = TAG_List()<br> iframe["Pos"].append(TAG_Double(posx))<br> iframe["Pos"].append(TAG_Double(posy))<br> iframe["Pos"].append(TAG_Double(posz))<br> iframe["Dir"] = TAG_Byte(dir)<br> iframe["Direction"] = TAG_Byte(direction)<br> iframe["Invulnerable"] = TAG_Byte("0")<br> iframe["Motion"] = TAG_List()<br> iframe["Motion"].append(TAG_Double(0.0))<br> iframe["Motion"].append(TAG_Double(0.0))<br> iframe["Motion"].append(TAG_Double(0.0))<br> iframe["TileX"] = TAG_Int(TileX)<br> iframe["TileY"] = TAG_Int(TileY)<br> iframe["TileZ"] = TAG_Int(TileZ)<br> iframe["Rotation"] = TAG_List()<br> iframe["Rotation"].append(TAG_Float(rotation))<br> iframe["Rotation"].append(TAG_Float(0.0))<br> iframe["Item"] = TAG_Compound()<br> iframe["Item"]["id"] = TAG_String(Item)<br> iframe["Item"]["Damage"] = TAG_Short(0)<br> iframe["Item"]["Count"] = TAG_Byte(1)<br> return iframe<br><br>def setBlock(x, y, z, id, r):<br> chunk = gLevel.getChunk((int(x/16)), (int(z/16)))<br> chunk.dirty = True<br> gLevel.setBlockAt(x, y, z, 0)<br> if gLevel.tileEntityAt(x,y,z) is not None:<br> chunk.TileEntities.remove(gLevel.tileEntityAt(x,y,z))<br> gLevel.setBlockAt(x, y, z, id)<br> if r >= 0:<br> gLevel.setBlockDataAt(x, y, z, r)<br> chunk.dirty = True<br><br><br>def setEntity(x, y, z, t1, text):<br> chunk = gLevel.getChunk((int(x/16)), (int(z/16)))<br> chunk.dirty = True<br> t = TileEntity.Create(t1)<br> TileEntity.setpos(t, (x, y, z))<br> if text != "":<br> t["Text" + str(1)] = TAG_String(text)<br> chunk.TileEntities.append(t)<br> chunk.dirty = True<br><br>def perform(level, box, options):<br> global gLevel<br> gLevel = level<br> for (chunk, slices, point) in gLevel.getChunkSlices(box):<br> for t in chunk.TileEntities:<br> x = t["x"].value<br> y = t["y"].value<br> z = t["z"].value<br><br> if x >= box.minx and x < box.maxx and y >= box.miny and y < box.maxy and z >= box.minz and z < box.maxz:<br> if t["id"].value == "Chest" or t["id"].value == "Redstone_Chest":<br> Richtung = gLevel.blockDataAt(x, y, z) # 2 = Norden, 3 = Süden, 4 = Westen, 5 = Osten<br> Item = ""<br><br> for items in t["Items"]:<br> if Item == "":<br> Item = items["id"].value<br><br> if Richtung == 2: # Norden<br> setBlock(x, y + 1, z, 156, 7)<br> setBlock(x, y + 2, z, 155, 0)<br> chunk1 = level.getChunk(x>>4,z>>4)<br> chunk1.Entities.append(CreateItemFrame(x, y + 2, z, 2, Item))<br> chunk1.dirty = True<br> elif Richtung == 3: # Süden<br> setBlock(x, y + 1, z, 156, 6)<br> setBlock(x, y + 2, z, 155, 0)<br> chunk1 = level.getChunk(x>>4,z>>4)<br> chunk1.Entities.append(CreateItemFrame(x, y + 2, z, 0, Item))<br> chunk1.dirty = True<br> elif Richtung == 4: # Osten<br> setBlock(x, y + 1, z, 156, 5)<br> setBlock(x, y + 2, z, 155, 0)<br> chunk1 = level.getChunk(x>>4,z>>4)<br> chunk1.Entities.append(CreateItemFrame(x, y + 2, z, 3, Item))<br> chunk1.dirty = True<br> elif Richtung == 5: # Westen<br> setBlock(x, y + 1, z, 156, 4)<br> setBlock(x, y + 2, z, 155, 0)<br> chunk1 = level.getChunk(x>>4,z>>4)<br> chunk1.Entities.append(CreateItemFrame(x, y + 2, z, 1, Item))<br> chunk1.dirty = True<br> chunk.dirty = True<br>
- my first try was to put the item-frame on the chest, but when I go into minecraft, the Item-frame will brake. I thought, maybe he won't accept a Chest which is not a solid block but a tile entity, so..
- my second try, I put an upside-down stair above the chest and tried to put the Item-frame on it, with the same result. So I thought, ingame the stairs ar not handelt like a solid block but more like a transparent block,...
- like you can see, in my third try, I put the imag-frame on a solid block 2 block above the chest, (with the upside-down stairs between, so I can open the chest at any time), but the result is totaly the same like in the first to trys.
Also like you can see in the screenshot that I put as attachment, before the Item-frames brake, they are bugging in the solid block.
hope someone of you could help me resolve this little problem.
After going through your code a bit, I noticed some flaws.
You never use the setEntity function.
The directions (aka North, South, West & East) are kind of messed up a bit. According to the Chunk Format page, the directions are as following: 0 is south, 1 is west, 2 is north, and 3 is east.
Also, since you are probably using 1.8.x, you should not use neither the Direction nor the Dir tag, but the Facing tag, since the other two are deleted when the tile entity is loaded.
You do not have to use a global variable since you can always pass it via the parameters of each function (this is just my opinion on the matter though)
I do not have the time currently to delve deeper into it and help you out any further, but when I do I will certainly let you know. What I can do, though, is tell you to go read the Chunk Format page. It is essential if you want to develop MCEdit filters, as it provides information on what each tag does and what its type is.
Can you maybe make a MCEdit filter that is one command combiner for 1.8/1.9 that makes commands really compact (not like CrushedPixels :P, and MrGarretto's combiner doesn't put commands in right order).
P.S. pretty much like CrushedPixel's but only 2 things:
1. it makes command more compact
2. fixes sign bug (signs aren't in middle of the wall)
I did this with a friend (not a filter, but a standalone python script).
I am currently working on a map and have run into a bit of an issue, I need to fill under all the overhangs using the block at the bottom of the overhang. is this possible?
I am currently working on a map and have run into a bit of an issue, I need to fill under all the overhangs using the block at the bottom of the overhang. is this possible?
Cheers,
Emizaquel
Maybe add a picture to be more clear as to what you are are referring to? Or be a little bit more explanatory? I didn't quite get what you want
Hi, I've attached a screenshot of one of the problem areas. I'm creating a rather hilly terrain for a very large-scale map but then I was doing it I accidentally created a few areas where there are massive overhangs. I would like a script that essentially fills in all the air blocks directly below a solid block with the same block.
I hope this cleared up a few issues, I'm also working on a few solutions myself but they may simply take too long.
Hi, I've attached a screenshot of one of the problem areas. I'm creating a rather hilly terrain for a very large-scale map but then I was doing it I accidentally created a few areas where there are massive overhangs. I would like a script that essentially fills in all the air blocks directly below a solid block with the same block.
I hope this cleared up a few issues, I'm also working on a few solutions myself but they may simply take too long.
Cheers!
If that's the case, why dont you use the built-in brush tool to create a smaller ellipse-sphere shape and place it under the so called overhangs? Or maybe, do you want it steep?
If that's the case, why dont you use the built-in brush tool to create a smaller ellipse-sphere shape and place it under the so called overhangs? Or maybe, do you want it steep?
Because the map is around 4000x4000 chunks.
I've kinda figured out something that works, in that I've upped the block memory space to 4GB and then cloned absolutely massive areas down one block under a 50x repeat, but it takes about 12 or so hours to complete a single session... and about 15-20 mins to allow me to initialise the clone tool alone.
I'm hoping that a filter would be more efficient and at least let me do the whole map at once to I can let it run in the background.
I've kinda figured out something that works, in that I've upped the block memory space to 4GB and then cloned absolutely massive areas down one block under a 50x repeat, but it takes about 12 or so hours to complete a single session... and about 15-20 mins to allow me to initialise the clone tool alone.
I'm hoping that a filter would be more efficient and at least let me do the whole map at once to I can let it run in the background.
Well, I might be able to create a filter for you, but the overhangs will be steep (I don't have the time to make something that will make them smooth due to finals). Is this what you're looking for?
Well, I might be able to create a filter for you, but the overhangs will be steep (I don't have the time to make something that will make them smooth due to finals). Is this what you're looking for?
# You can modify, reuse or distribute this filter.
# If you do so, make sure to give credit to Lazini
# http://youtube.com/user/lazini
displayName = "Overhang filler"
inputs = (
("Fills the empty blocks under an overhang with the bottom block ID and Type", "label"),
)
def perform(level, box, options):
for i in xrange(box.miny, box.maxy):
for y in xrange(box.miny, box.maxy):
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
if (level.blockAt(x,y,z) == 0) and (level.blockAt(x,y+1,z) != 0):
level.setBlockAt(x,y,z, level.blockAt(x,y+1,z))
level.setBlockDataAt(x,y,z, level.blockDataAt(x,y+1,z))
print "Repeated times: ", i
# You can modify, reuse or distribute this filter.
# If you do so, make sure to give credit to Lazini
# http://youtube.com/user/lazini
displayName = "Overhang filler"
inputs = (
("Fills the empty blocks under an overhang with the bottom block ID and Type", "label"),
)
def perform(level, box, options):
for i in xrange(box.miny, box.maxy):
for y in xrange(box.miny, box.maxy):
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
if (level.blockAt(x,y,z) == 0) and (level.blockAt(x,y+1,z) != 0):
level.setBlockAt(x,y,z, level.blockAt(x,y+1,z))
level.setBlockDataAt(x,y,z, level.blockDataAt(x,y+1,z))
print "Repeated times: ", i
Thanks!
I'll make sure to let you know once the map is done. I was kinda inspired by Vetchs' SHO so expect a completely massive scale.
# You can modify, reuse or distribute this filter.
# If you do so, make sure to give credit to Lazini
# http://youtube.com/user/lazini
displayName = "Overhang filler"
inputs = (
("Fills the empty blocks under an overhang with the bottom block ID and Type", "label"),
)
def perform(level, box, options):
for i in xrange(box.miny, box.maxy):
for y in xrange(box.miny, box.maxy):
for x in xrange(box.minx, box.maxx):
for z in xrange(box.minz, box.maxz):
if (level.blockAt(x,y,z) == 0) and (level.blockAt(x,y+1,z) != 0):
level.setBlockAt(x,y,z, level.blockAt(x,y+1,z))
level.setBlockDataAt(x,y,z, level.blockDataAt(x,y+1,z))
print "Repeated times: ", i
I tried posting about this previously, so if you got that ignore this post.
Ran into an issue, the filter does not work. When I try to run it it freezes my mac and nothing happens for upwards of an hour. I did this on a relatively small area of roughly 1000x1000x256.
I'm running 0.1.7.1 on a mac. Could you tell me how to fix it?
I tried posting about this previously, so if you got that ignore this post.
Ran into an issue, the filter does not work. When I try to run it it freezes my mac and nothing happens for upwards of an hour. I did this on a relatively small area of roughly 1000x1000x256.
I'm running 0.1.7.1 on a mac. Could you tell me how to fix it?
Cheers,
Emizaquel
There is nothing to fix. If you know even the littlest thing about coding, check my code. You'll see that the bigger the Y-axis selection you have, the more cycles there are to run in the for loop. Meaning, try having a smaller Y selection, or even better, try using the filter only where it is needed, since it's a really resource intensive one.
There is nothing to fix. If you know even the littlest thing about coding, check my code. You'll see that the bigger the Y-axis selection you have, the more cycles there are to run in the for loop. Meaning, try having a smaller Y selection, or even better, try using the filter only where it is needed, since it's a really resource intensive one.
I did not even see a progress bar come up, is this normal?
In case when I select some block types for script or for Fill/Replace tool, how exactly does it happen? See, when you select several materials, they get arranged in a line, making you think that they all are used, consequently. But there are also this big icon for one of them, that you can choose. Does it mean that actually only 1 material can be selected at a time?
Is writing to console with "print" an enormously costly operation?
No, you can only use one material at a time. The rest of them is the "selection history", if you will. Meaning, the blocks you had selected previously are stored there for future use. Hopefully you get the idea.
MCEdit: Minecraft World Editor
After going through your code a bit, I noticed some flaws.
I do not have the time currently to delve deeper into it and help you out any further, but when I do I will certainly let you know. What I can do, though, is tell you to go read the Chunk Format page. It is essential if you want to develop MCEdit filters, as it provides information on what each tag does and what its type is.
MCEdit: Minecraft World Editor
I did this with a friend (not a filter, but a standalone python script).
https://github.com/destruc7i0n/OneCommand
What If You Were Going To Download A Filter And It Was A Dropbox How Could You Turn That Into A .py
Just open a txt file and copy paste, then rename to *.py
Here you go. You're welcome
MCEdit: Minecraft World Editor
Can someone make a filter that removes all non-pe compatible blocks from a world?
I am currently working on a map and have run into a bit of an issue, I need to fill under all the overhangs using the block at the bottom of the overhang. is this possible?
Cheers,
Emizaquel
Maybe add a picture to be more clear as to what you are are referring to? Or be a little bit more explanatory? I didn't quite get what you want
MCEdit: Minecraft World Editor
Hi, I've attached a screenshot of one of the problem areas. I'm creating a rather hilly terrain for a very large-scale map but then I was doing it I accidentally created a few areas where there are massive overhangs. I would like a script that essentially fills in all the air blocks directly below a solid block with the same block.
I hope this cleared up a few issues, I'm also working on a few solutions myself but they may simply take too long.
Cheers!
If that's the case, why dont you use the built-in brush tool to create a smaller ellipse-sphere shape and place it under the so called overhangs? Or maybe, do you want it steep?
MCEdit: Minecraft World Editor
Because the map is around 4000x4000 chunks.
I've kinda figured out something that works, in that I've upped the block memory space to 4GB and then cloned absolutely massive areas down one block under a 50x repeat, but it takes about 12 or so hours to complete a single session... and about 15-20 mins to allow me to initialise the clone tool alone.
I'm hoping that a filter would be more efficient and at least let me do the whole map at once to I can let it run in the background.
Well, I might be able to create a filter for you, but the overhangs will be steep (I don't have the time to make something that will make them smooth due to finals). Is this what you're looking for?
MCEdit: Minecraft World Editor
yeah that would be nice.
And done!! Here's the link to it.
MCEdit: Minecraft World Editor
Thanks!
I'll make sure to let you know once the map is done. I was kinda inspired by Vetchs' SHO so expect a completely massive scale.
I tried posting about this previously, so if you got that ignore this post.
Ran into an issue, the filter does not work. When I try to run it it freezes my mac and nothing happens for upwards of an hour. I did this on a relatively small area of roughly 1000x1000x256.
I'm running 0.1.7.1 on a mac. Could you tell me how to fix it?
Cheers,
Emizaquel
There is nothing to fix. If you know even the littlest thing about coding, check my code. You'll see that the bigger the Y-axis selection you have, the more cycles there are to run in the for loop. Meaning, try having a smaller Y selection, or even better, try using the filter only where it is needed, since it's a really resource intensive one.
MCEdit: Minecraft World Editor
I did not even see a progress bar come up, is this normal?