Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placement option configuring with an Or Option instead of only And #141

Open
Guinaro opened this issue Jan 13, 2016 · 5 comments
Open

Placement option configuring with an Or Option instead of only And #141

Guinaro opened this issue Jan 13, 2016 · 5 comments

Comments

@Guinaro
Copy link

Guinaro commented Jan 13, 2016

I'm currently configuring my personal ModPack and COG takes a while to perfect directly in XML.
Currently I ran into the issue of clay generation! I would like to generate clay blocks touching water or other clay blocks. I can use a PlacesBelow or a Placesbeside. But only seperately.
I want to be able to place my blocks under water or under clay or beside water or beside clay.
Currently combining the PlacesBelow and Placesbesides means I cannot create layers of clay!
I can only create single layers of clay.
Could this be implemented or would this slow down the custom ore generation to much?

Another option could be to implement a six axis touch version. So if in any of the surfaces of the block to place touches a certain type of block the condition is fullfilled.
e.g. If it touches water or clay the block can be replaced.

Guinaro

@lawremi
Copy link
Owner

lawremi commented Jan 14, 2016

The <Places*> elements all act like <Replaces>, so it's an OR within a type of placement and AND between them. So it's easy to construct the equivalent of (Below:water OR Below:clay) AND (Beside:water OR Beside:clay) by using multiple elements of each type). Probably also want to allow below dirt and grass. Does that make sense?

@Guinaro
Copy link
Author

Guinaro commented Jan 14, 2016

Yes it does make sense. However I my instance I want the following: Below:water OR Below:clay OR Beside:water OR Beside:clay. Which unfortunately is currently not possible.
I would only start generating clay when next or under water. The beside or under clay, would allow me to get further away from the water, to the side or more layers of clay.
I will replace grass, dirt, sand and gravel. But I won't require a placesbelow dirt or grass. It needs to touch water or clay, that is all.

@lawremi
Copy link
Owner

lawremi commented Jan 14, 2016

Ok, I get it now. You will need to choose between vertical and horizontal propagation, i.e., the distribution would only specify a <PlacesBelow> or a <PlacesBeside>. You could have one of each type of distribution that might mimic what you want.

We could add a setting that combines the adjacency restrictions with OR.

But there is another problem: the distributions place blocks in increasing X, Y, Z. This will lead to strange asymmetry in X/Z and makes placing multiple layers underneath something impossible. We could address the Y restriction by an option that inverts the iteration. For X/Z symmetry, we would need to iterate outward/inward from/to the center (depending on a setting).

This will be a lot of work and complexity to support this one use case.

@MattJohns
Copy link
Contributor

I'd also like to see finer control over the placement options although I understand it could grow complicated. If it was just possible to control north, south, east and west separately in PlacesBeside then you can achieve good smoothing of caves and things like that. For example when an air block is touching stone on 2 sides rather than just 1 side, you might want to fill it in with more stone.

I don't mind making a java patch if you're interested. I looked at the code in BlockArrangement.matchesAt() and I assume it would be a fairly easy change around there and maybe some related places to allow per-direction matching.

@lawremi
Copy link
Owner

lawremi commented May 30, 2017

In general, I'm open to making this more powerful. Go ahead and submit something and we can discuss the specifics then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants