-
-
Notifications
You must be signed in to change notification settings - Fork 48
Avoid infinite loops in falling block placement handler #741
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
Conversation
src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java
Show resolved
Hide resolved
|
Shouldn't this be fixed if we align the checks? Doesn't our solid check also look for falling block?
…-------- Original Message --------
On 5/2/25 02:51, TommyC81 wrote:
@TommyC81 commented on this pull request.
---------------------------------------------------------------
In [src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java](#741 (comment)):
> @@ -249,13 +252,23 @@ public List<ItemStack> getRequiredItems(
posBelow = posBelow.below();
final boolean isFirstTest = i == 0;
final BlockState possibleSupport = BlockUtils.getWorldgenBlock(world, posBelow, bp -> isFirstTest ? blockState : null);
- if (possibleSupport != null && BlockUtils.canBlockFloatInAir(possibleSupport) && !canHandle(world, posBelow, possibleSupport))
+ if (possibleSupport != null && BlockUtils.isAnySolid(possibleSupport) && BlockUtils.canBlockFloatInAir(possibleSupport) && !canHandle(world,
+ posBelow,
+ possibleSupport))
{
supportBlockState = possibleSupport;
I posted the original bug report, is there anything I can test or do to assist with finding a possible cause or contributing mod? I'm using a quite extensive modpack and so far all works well apart from this item. If it is useful or make any difference; the error occurs when opening the 'Build Options' menu, sometimes the menu opens but freezes shortly after, sometimes it doesn't open at all - maybe coincidental?
—
Reply to this email directly, [view it on GitHub](#741 (comment)), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/ABRD3S3BGTWT2HJCFMKU5TT24JNKRAVCNFSM6AAAAAB4GBOUASVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQMJQGMZTMNZQGQ).
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
|
Align which checks? I added the solid check as requirement for the supporting block |
Add fallback to cobble
|
Note that in case of terrafirmacraft, cobblestone is also a falling block. So that might not work as fallback |
Maybe we go with classic stone then ? |
|
That should work better |
|
Has this been implemented in the 1. 21.1 version? |
|
Thank you all, can confirm that I no longer get error, and things appear to work correctly. |
Closes #740
Changes proposed in this pull request
Testing
Review please