ldtteam / Structurize

Minecraft Structures
GNU General Public License v3.0
45 stars 45 forks source link

Bug in PlacementHandlers #595

Closed deVDem closed 1 year ago

deVDem commented 1 year ago

Is there an existing issue for this?

Are you using the latest Structurize Version?

Did you check on the Wiki? or ask on Discord?

Minecraft Version

1.20

Structurize Version

1.20-1.0.590-BETA

MineColonies Version (if related bug)

1.20.1-1.1.28-RELEASE

Related Mods and their Versions

  1. Forge: 47.1.3
  2. BlockUI: 1.20-0.0.84-ALPHA
  3. Donum: 1.20-1.0.110-RELEASE-universal=

Current Behavior

When improving the building, as far as I understand, the required blocks are being received, with a check for a block in Worldgen in the file PlacementHandlers.java on line 229. In theory, he should get a block that is under the structure, but it does not work.

Expected Behavior

In my case, the height between the structure and the lower block is more than 10 blocks, which makes possibleSupport (248 line) null. This is solved, I think, by increasing the iterations of the for loop or changing the algorithm or exception handling.

Reproduction Steps

Just check a screenshoot. I tried upgrade my warehouse (yes, in the air xD) image

Logs

https://pastebin.com/4sftSZmU

Anything else?

No response

Footer


Viewers

Raycoms commented 1 year ago

Builders dont build support structures for building you have placed unless they are specifically in the schematics (which there isnt in this one here. The check you are talking about is for falling blocks like gravel etc. We place support under gravel. Either a worldgen block, or if we cant find a suitable one, then dirt. Its the players job to make sure the buildings are built on suitable ground.

deVDem commented 1 year ago

Okay, I understand what this function is for. The problem is that if the block is not found, then an exception is thrown, which causes the server to crash. This is what I wanted to fix :)

deVDem commented 1 year ago

Oh, and I also sent the wrong logs. I'll send a little later.

Raycoms commented 1 year ago

Ah, please send the logs then so that I can fix it.

deVDem commented 1 year ago

Required log: https://pastebin.com/UGmCAGpC

I had to delete a couple of duplicate lines, due to the limitations of Pastebin, the essence has not changed.

deVDem commented 1 year ago

I compiled jar-file with your fix, it works great, I can continue playing on my server! Waiting for the release. Thank you! :)