Push forward
This commit is contained in:
+9
-9
@@ -13,7 +13,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
@Deprecated
|
||||
public static void ensureTickThread(final String reason) {
|
||||
- if (!isTickThread()) {
|
||||
+ if (!isTickThread() && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThread() && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
LOGGER.error("Thread failed main thread check: " + reason + ", context=" + getThreadContext(), new Throwable());
|
||||
throw new IllegalStateException(reason);
|
||||
}
|
||||
@@ -21,7 +21,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final BlockPos pos, final String reason) {
|
||||
- if (!isTickThreadFor(world, pos)) {
|
||||
+ if (!isTickThreadFor(world, pos) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, pos) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos;
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -30,7 +30,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final BlockPos pos, final int blockRadius, final String reason) {
|
||||
- if (!isTickThreadFor(world, pos, blockRadius)) {
|
||||
+ if (!isTickThreadFor(world, pos, blockRadius) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, pos, blockRadius) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + pos + ", block_radius=" + blockRadius;
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -39,7 +39,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final ChunkPos pos, final String reason) {
|
||||
- if (!isTickThreadFor(world, pos)) {
|
||||
+ if (!isTickThreadFor(world, pos) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, pos) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + pos;
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -48,7 +48,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final int chunkX, final int chunkZ, final String reason) {
|
||||
- if (!isTickThreadFor(world, chunkX, chunkZ)) {
|
||||
+ if (!isTickThreadFor(world, chunkX, chunkZ) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, chunkX, chunkZ) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", chunk_pos=" + new ChunkPos(chunkX, chunkZ);
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -57,7 +57,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Entity entity, final String reason) {
|
||||
- if (!isTickThreadFor(entity)) {
|
||||
+ if (!isTickThreadFor(entity) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(entity) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", entity=" + EntityUtil.dumpEntity(entity);
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -66,7 +66,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final AABB aabb, final String reason) {
|
||||
- if (!isTickThreadFor(world, aabb)) {
|
||||
+ if (!isTickThreadFor(world, aabb) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, aabb) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", aabb=" + aabb;
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -75,7 +75,7 @@ index 6c74787321748702022787b65ff5465f8bcec4ad..5d7a4f42ed274d78e79f0d4e5dd974ff
|
||||
|
||||
public static void ensureTickThread(final Level world, final double blockX, final double blockZ, final String reason) {
|
||||
- if (!isTickThreadFor(world, blockX, blockZ)) {
|
||||
+ if (!isTickThreadFor(world, blockX, blockZ) && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
+ if (!isTickThreadFor(world, blockX, blockZ) && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Shiroha - Add config to disable async catchers
|
||||
final String ex = "Thread failed main thread check: " +
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + new Vec3(blockX, 0.0, blockZ);
|
||||
LOGGER.error(ex, new Throwable());
|
||||
@@ -88,7 +88,7 @@ index 7e7a0ed944961af5ab7a49bc659da2862d2e2c82..1dc664a97442744d0a9364805cc6d6c5
|
||||
|
||||
public static void catchOp(String reason) {
|
||||
- if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() && !moe.monnairealms.camellia.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Paper - chunk system // Shiroha - Add config to disable async catchers
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread() && !io.nanachiyo0721.shiroha.config.modules.experiment.DisableAsyncCatcherConfig.enabled) { // Paper - chunk system // Shiroha - Add config to disable async catchers
|
||||
MinecraftServer.LOGGER.error("Thread {} failed main thread check: {}", Thread.currentThread().getName(), reason, new Throwable()); // Paper
|
||||
throw new IllegalStateException("Asynchronous " + reason + "!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user