BrassAmber BattleTowers

BrassAmber BattleTowers

3M Downloads

Battle towers unprecise spawn check

Krampus69 opened this issue Β· 11 comments

commented

Hi πŸ‘‹
First of all : Thank you so much for this mod !
It is really amazing, thank you thank you ><

All right, there is a problem with spawn check sometimes :
2022-01-02_01 23 04

Sometimes the tower will spawn badly, it's actually not that hard to avoid this problem (you can check the ground under the tower + improve the base of the tower with a round ground or "island looking" base for example)

Keep up the great work anyway πŸ‘

commented

Holy cow! That’s actually really cool!! Haha πŸ˜‚ I wonder what the chances of this even happening are lol.

commented

HI! πŸ‘‹
Thanks for the issue on here and the wonderful picture! :D
Glad you are enjoying the mod! πŸ˜„

TLDR: Known Issue, Intended to be fixed in 1.18 demo or first 1.18 update, more pictures of failed tower gen = good.

This is a known issue, the code for where a tower spawns is still from the second time I gave it a go.
It currently checks whether 4 block positions are at the same level as the center of the chunk (14 blocks from the center in each direction). This was meant to avoid hills without having to check a large number of blocks (and subsequently slow down world creation) except sometimes the locations it checks are all the same height, even though there is a steep hill there.

I plan on re-doing the tower generation code for the 1.18 demo release (or at least the first update to it), and more pictures of the generation failing always help! So if you find other unique/wacky spawns of a tower feel free to add a picture of them here.
The other one it is supposed to avoid is water underneath where it spawns.

commented

2022-01-03_10 50 48
2022-01-03_11 01 44
I got some more pictures if you need πŸ‘ Most of the time the spawn is okay but when you couple it with modded biomes with tricky landscape they can become messy
Also, you're talking about the 1.18 version but will the 1.16.5 still be updated when this is fixed ?

commented

This is awesome! Thanks man!

Is the land tower spawning in modded biomes? I haven't checked since last changing the biome stuff for the land tower.

Hmm, it may be, depends on how much of the code I end up changing to fix this.

commented

Yes the towers mostly spawn in modded biomes (here it's ByG)
Also, I've seen some towers spawning inside other structures, which is actually pretty cool but I think the NBT has no structure_void block so it cuts right through the structures instead of blending in
image
image

See there the tower has spawned in a Dungeon Arise structure and it creates a big chunk, would be nice to add structure void outside of the tower (I personnally use structure gel to make it easier maybe you got something else but just in case...)

commented

Glad their spawning in modded biomes :D

Yeah, the bottom 2 floors have structure voids around but any floors above that do not. Definitely, something that will be in 1.18 and potentially backported to 1.16.5.
I use worldEdit myself but structure gel looks very enticing, ill have to try it out and see if I like it better that what I am doing with worldedit currently.

commented

I also had plans to make them not spawn in any other structures by default, with a config option to turn that off and have them spawn anywhere regardless of whether there already is a structure there or not.

commented

2022-02-13_02 41 58

Didn't want to open an issue just for this, because this one right here already exists. And because you said more pictures of failed structure spawning are welcome; there you go!
This one straight up spawned inside one of the Vanilla Mansions.

commented

Hi!
I know is an old issue but running in a 1.18.1 server (with some friends) i notice a weird generation, nothing in comparison to precedent cases.

2022-04-21_01 57 53

As you can see beetween mesa and desert biome the land under the structure is dirt! Is this intended or not?

commented

Ah yes, it both is and isn't.

TLDR: Grass blocks around tower were intended, spawning in Mesa/desert was an accidental addition.

For the 1.18.1 build we were originally going to add the desert variant as well, but it got moved to 1.18.2 instead.
I had still made the biome spawning changes though so towers could spawn in deserts xD. (So not intended)

However the actual grass blocks directly around the bottom floor are part of the bottom jigsaw piece of the structure. My attempt to have it merge with the ground more favorably.
(So also kinda intended)

1.18.2 we removed that extra grass base and are adding a stone brick base that will extend downwards underneath the tower whenever there is extra space.

commented

2022-05-01_03 46 13

The first step toward fixing this :)
Eventually, I hope to use noise generation to automatically build/fill in a hill around it when needed.

For now, though this^ is the fix.