baseline of 26.1.2

WARNING: no patch merged, we will start merge later

there are to many update between 1.21.11 and 26.1.2, so we need more time to build a base version which can stable to use
This commit is contained in:
Helvetica Volubi
2026-05-02 00:46:03 +08:00
parent e0d42cb1d3
commit 9761fde77d
400 changed files with 76 additions and 186 deletions
@@ -1,42 +0,0 @@
package fun.bm.lophine.carpet;
import java.util.function.Supplier;
public final class InteractionUpdateCompatHelper {
private static final ThreadLocal<Integer> SUPPRESSED_DEPTH = ThreadLocal.withInitial(() -> 0);
public static boolean shouldSkipUpdates() {
return SUPPRESSED_DEPTH.get() > 0;
}
public static void runWithSuppressedUpdates(Runnable action) {
push();
try {
action.run();
} finally {
pop();
}
}
public static <T> T supplyWithSuppressedUpdates(Supplier<T> action) {
push();
try {
return action.get();
} finally {
pop();
}
}
private static void push() {
SUPPRESSED_DEPTH.set(SUPPRESSED_DEPTH.get() + 1);
}
private static void pop() {
int depth = SUPPRESSED_DEPTH.get();
if (depth <= 1) {
SUPPRESSED_DEPTH.remove();
} else {
SUPPRESSED_DEPTH.set(depth - 1);
}
}
}