Skip to content

Commit 8bece3d

Browse files
committed
chore: revert throwable throw
1 parent 540e753 commit 8bece3d

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

worldedit-bukkit/adapters/adapter-1_21_9/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_9/PaperweightGetBlocks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ protected <T extends Future<T>> T internalCall(
337337
int copyKey,
338338
LevelChunk nmsChunk,
339339
ServerLevel nmsWorld
340-
) throws Throwable {
340+
) throws Exception {
341341
PaperweightGetBlocks_Copy copy = createCopy ? new PaperweightGetBlocks_Copy(nmsChunk) : null;
342342
if (createCopy) {
343343
if (copies.containsKey(copyKey)) {

worldedit-bukkit/adapters/adapter-1_21_9/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/fawe/v1_21_9/PaperweightPlatformAdapter.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public static void setBiomesToChunkSection(LevelChunkSection section, PalettedCo
526526
public static PalettedContainer<Holder<Biome>> getBiomePalettedContainer(
527527
BiomeType[] biomes,
528528
IdMap<Holder<Biome>> biomeRegistry
529-
) throws Throwable {
529+
) {
530530
if (biomes == null) {
531531
return null;
532532
}
@@ -564,9 +564,13 @@ public static PalettedContainer<Holder<Biome>> getBiomePalettedContainer(
564564
null
565565
);
566566
} else {
567-
//noinspection unchecked
568-
result = (DataResult<PalettedContainer<Holder<Biome>>>)
569-
palettedContainerUnpackSpigot.invokeExact(strategy, packedData);
567+
try {
568+
//noinspection unchecked
569+
result = (DataResult<PalettedContainer<Holder<Biome>>>)
570+
palettedContainerUnpackSpigot.invokeExact(strategy, packedData);
571+
} catch (Throwable e) {
572+
throw new RuntimeException("Failed to create biome palette for Spigot", e);
573+
}
570574
}
571575
var biomePalettedContainer = result.getOrThrow();
572576

worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/AbstractBukkitGetBlocks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected abstract <T extends Future<T>> T internalCall(
6262
int copyKey,
6363
LevelChunk nmsChunk,
6464
ServerLevel nmsWorld
65-
) throws Throwable;
65+
) throws Exception;
6666

6767
@Override
6868
@SuppressWarnings({"rawtypes", "unchecked"})

0 commit comments

Comments
 (0)