Skip to content

Commit

Permalink
Creative tab loop fix
Browse files Browse the repository at this point in the history
Add stopping condition
  • Loading branch information
BrokenK3yboard committed Nov 13, 2024
1 parent ea87e70 commit c19bb2d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public static void buildContents(BuildCreativeModeTabContentsEvent event) {
final int logThreshold = maxFails - 10;
int failedAttempts = 0;

while (failedAttempts < 100) {
while ((!front.isEmpty() && !behind.isEmpty()) || failedAttempts < 100) {
if (!front.isEmpty()) {
failedAttempts = addItems(event, front, false, failedAttempts > logThreshold) ? failedAttempts : failedAttempts + 1;
}
Expand Down

0 comments on commit c19bb2d

Please sign in to comment.