Repair decompiled control flow
Some checks failed
Build / build (push) Failing after 5m44s

This commit is contained in:
MrSphay
2026-05-04 12:24:39 +02:00
parent 345d8a8310
commit 75323fdb8c
2 changed files with 21 additions and 24 deletions

View File

@@ -6,7 +6,6 @@ package com.vinlanx.explosionoverhaul;
import com.vinlanx.explosionoverhaul.Config; import com.vinlanx.explosionoverhaul.Config;
import com.vinlanx.explosionoverhaul.CraterDeformer; import com.vinlanx.explosionoverhaul.CraterDeformer;
import com.vinlanx.explosionoverhaul.ExplosionOverhaul; import com.vinlanx.explosionoverhaul.ExplosionOverhaul;
import java.lang.invoke.LambdaMetafactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;
@@ -21,7 +20,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
import net.minecraft.core.Position; import net.minecraft.core.Position;
import net.minecraft.core.SectionPos; import net.minecraft.core.SectionPos;
@@ -317,15 +315,17 @@ public class AsyncCraterManager {
} }
break block39; break block39;
} }
if (c.core) ** GOTO lbl-1000 boolean shouldDestroy = c.core;
v0 = rayId = Math.max(0, c.rayId); if (!c.core) {
this.rayEnergy[v0] = this.rayEnergy[v0] - (resistance + 0.3f); v0 = rayId = Math.max(0, c.rayId);
if (this.rayEnergy[rayId] <= 0.0f) { this.rayEnergy[v0] = this.rayEnergy[v0] - (resistance + 0.3f);
this.rayDepleted[rayId] = true; if (this.rayEnergy[rayId] <= 0.0f) {
} else lbl-1000: this.rayDepleted[rayId] = true;
// 2 sources } else {
shouldDestroy = true;
{ }
}
if (shouldDestroy) {
v1 = allowFalling = this.power <= 20.0f && (Boolean)Config.COMMON.enableFallingBlocks.get() != false && spawnedFalling < maxFallingPerTick; v1 = allowFalling = this.power <= 20.0f && (Boolean)Config.COMMON.enableFallingBlocks.get() != false && spawnedFalling < maxFallingPerTick;
if (allowFalling) { if (allowFalling) {
inner = c.core != false || c.stepIndex <= 5; inner = c.core != false || c.stepIndex <= 5;
@@ -358,13 +358,13 @@ public class AsyncCraterManager {
continue; continue;
} }
chunk = this.levelRef.m_46745_(pos); chunk = this.levelRef.m_46745_(pos);
byChunk.computeIfAbsent(chunk, (Function<LevelChunk, List>)LambdaMetafactory.metafactory(null, null, null, (Ljava/lang/Object;)Ljava/lang/Object;, lambda$applyBatch$1(net.minecraft.world.level.chunk.LevelChunk ), (Lnet/minecraft/world/level/chunk/LevelChunk;)Ljava/util/List;)()).add(c); byChunk.computeIfAbsent(chunk, Job::lambda$applyBatch$1).add(c);
++i; ++i;
} }
for (Map.Entry<K, V> e : byChunk.entrySet()) { for (Map.Entry<LevelChunk, List> e : byChunk.entrySet()) {
chunk = (LevelChunk)e.getKey(); chunk = (LevelChunk)e.getKey();
list = (List)e.getValue(); list = (List)e.getValue();
list.sort((Comparator)LambdaMetafactory.metafactory(null, null, null, (Ljava/lang/Object;Ljava/lang/Object;)I, lambda$applyBatch$2(com.vinlanx.explosionoverhaul.AsyncCraterManager$Job$Candidate com.vinlanx.explosionoverhaul.AsyncCraterManager$Job$Candidate ), (Lcom/vinlanx/explosionoverhaul/AsyncCraterManager$Job$Candidate;Lcom/vinlanx/explosionoverhaul/AsyncCraterManager$Job$Candidate;)I)()); list.sort((Comparator<Candidate>)Job::lambda$applyBatch$2);
modifiedSections = new HashSet<SectionPos>(); modifiedSections = new HashSet<SectionPos>();
toRelight = new ArrayList<BlockPos>(); toRelight = new ArrayList<BlockPos>();
relightBudget = Math.min(256, list.size()); relightBudget = Math.min(256, list.size());

View File

@@ -24,7 +24,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.io.Reader; import java.io.Reader;
import java.lang.invoke.LambdaMetafactory;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.LinkOption; import java.nio.file.LinkOption;
@@ -491,12 +490,13 @@ public class BlockIndexManager {
BlockIndexManager.sendProgressUpdate(); BlockIndexManager.sendProgressUpdate();
try { try {
currentServer = ServerLifecycleHooks.getCurrentServer(); currentServer = ServerLifecycleHooks.getCurrentServer();
if (currentServer == null) ** GOTO lbl24 if (currentServer != null) {
for (ServerPlayer serverPlayer : currentServer.m_6846_().m_11314_()) { for (ServerPlayer serverPlayer : currentServer.m_6846_().m_11314_()) {
if (!BlockIndexManager.isPlayerAuthorized(serverPlayer)) continue; if (!BlockIndexManager.isPlayerAuthorized(serverPlayer)) continue;
packet = new ScanLoadPromptPacket(false); packet = new ScanLoadPromptPacket(false);
PacketHandler.INSTANCE.send(PacketDistributor.PLAYER.with((Supplier<ServerPlayer>)LambdaMetafactory.metafactory(null, null, null, ()Ljava/lang/Object;, lambda$loadExistingData$11(net.minecraft.server.level.ServerPlayer ), ()Lnet/minecraft/server/level/ServerPlayer;)((ServerPlayer)serverPlayer)), (Object)packet); PacketHandler.INSTANCE.send(PacketDistributor.PLAYER.with(() -> serverPlayer), (Object)packet);
ExplosionOverhaul.LOGGER.debug("Hidden load prompt for authorized player: {}", (Object)serverPlayer.m_7755_().getString()); ExplosionOverhaul.LOGGER.debug("Hidden load prompt for authorized player: {}", (Object)serverPlayer.m_7755_().getString());
}
} }
} }
catch (Exception e) { catch (Exception e) {
@@ -506,9 +506,6 @@ public class BlockIndexManager {
ExplosionOverhaul.LOGGER.warn("BlockIndexManager: Failed to load existing data, falling back to new scan"); ExplosionOverhaul.LOGGER.warn("BlockIndexManager: Failed to load existing data, falling back to new scan");
BlockIndexManager.startNewScan(); BlockIndexManager.startNewScan();
} }
lbl24:
// 4 sources
BlockIndexManager.pendingScanLevel = null; BlockIndexManager.pendingScanLevel = null;
} }
} }