chingo247 / SettlerCraft

1 stars 0 forks source link

This is insanely cool! #1

Open ryantheleach opened 9 years ago

ryantheleach commented 9 years ago

Love what you are doing, and what success you are getting out of worldedit.

I just had an unrelated question, and you seemed pretty cool at extending worldedit.

How are you dealing with air blocks? does SettlerCraft have any concept of a wildcard block that will not replace a block, as opposed to worldedit which just pastes air everywhere?

chingo247 commented 9 years ago

Hi there!

Thank you for your interest in SettlerCraft! ^^

If by pasting air you mean replacing blocks that are already there (like air). I don't filter them anymore since that has been implemented in AsyncWorldEdit 2.0.

Here's comparison of the of the implementation of SettlerCraft + WorldEdit + AsynwWorldEdit 1.3 vs WorldEdit + AWE 1.3: https://www.youtube.com/watch?v=ivxi608cQz0#t=11

Note that the video was taken 6 months ago and does not include AsyncWorldEdit's filter. The structure in the video consists of 440k blocks or about 9 million if you include the air.

AsyncWorldEdit 2.0 reduced the time to 1:18 and this week I improved the algorithm and now it takes about 50 seconds to finish that same structure.

ryantheleach commented 9 years ago

Yeah I was looking at stuff on a smaller scale.

By filtering air, I was meaning when you paste a schematic, if it intersects with the natural terrain, some air replaces the natural terrain, while other air lets the natural terrain stay.

Introducing a null or wildcard block as it were.

If clipboards had bitmasks that persisted in schematic files it might work instead, then you would just create the bitmask by checking a schematic against a certain blocktype.

chingo247 commented 9 years ago

I'm not entirely sure what you are getting at, but then again I don't really know the concept of bitmasks either :$

ryantheleach commented 9 years ago

Basically I want to be able to paste schematics so I can achieve this effect:

http://puu.sh/dsCuR/9abc101505.jpg

Where the sponge is representing a null block, that won't replace anything.

Instead of using a null block, it would be possible to achieve the same effect with a bitmask, represented by the bedrock http://puu.sh/dsCBC/ff1a7ae199.jpg

Only the area that has been masked by the bedrock would get inserted into the world.

chingo247 commented 9 years ago

In the first picture you want to apply the Mask to the clipboard just like: 2014-12-13_10 00 11

I've applied a (WorldEdit) Mask against the clipboard that ignores a certain material, wool. This way the dirt wall I build in the left corner didn't get replaced.

I could also apply a mask to clipboard that replaces a specific Material or any material with something else: 2014-12-13_11 56 24 Lets say in the picture above I replaced the red wool with sponge (in the schematic itself). Faction plugins for example could indicate that the sponge material should be replaced by wool that has the same color as their faction without having to declare a schematic for each faction.

In the second picture you want to apply the Mask against the world. So only a certain material will get replaced by the schematic? Isnt this already done by applying the Mask to the editsession?

ryantheleach commented 9 years ago

Oh right, I didn't realize that you could apply masks to both worlds and clipboards. thanks for the help :)

chingo247 commented 9 years ago

you can't apply them to clipboards normally, but only to the editsession. I kinda use my own type of clipboard which does the trick and use masks in a similar way as is done in editsessions