Fix "Unable to determine descriptor" warnings by setting remap=false at some locations. (#1423)

* set remap=false for "Unable to determine descriptor" warnings

* remove suppressWarning annotation
This commit is contained in:
Crec0 authored and GitHub committed 2022-04-24 12:20:39 +02:00
1 parent c1141ddede
commit 8346199281
6 files changed
+9 -14

No files matched your search

@@ -110,8 +110,7 @@ public abstract class ChunkMap_scarpetChunkCreationMixin implements ThreadedAnvi
// in protoChunkToFullChunk // in protoChunkToFullChunk
// fancier version of the one below, ensuring that the event is triggered when the chunk is actually loaded. // fancier version of the one below, ensuring that the event is triggered when the chunk is actually loaded.
@SuppressWarnings("UnresolvedMixinReference") @Inject(method = "method_20460", at = @At("HEAD"), remap = false)
@Inject(method = "method_20460", at = @At("HEAD"))
private void onChunkGeneratedStart(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir) private void onChunkGeneratedStart(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir)
{ {
if (CHUNK_GENERATED.isNeeded() || CHUNK_LOADED.isNeeded()) if (CHUNK_GENERATED.isNeeded() || CHUNK_LOADED.isNeeded())
@@ -124,8 +123,7 @@ public abstract class ChunkMap_scarpetChunkCreationMixin implements ThreadedAnvi
} }
} }
@SuppressWarnings("UnresolvedMixinReference") @Inject(method = "method_20460", at = @At("RETURN"), remap = false)
@Inject(method = "method_20460", at = @At("RETURN"))
private void onChunkGeneratedEnd(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir) private void onChunkGeneratedEnd(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir)
{ {
Boolean localGenerated= generated.get(); Boolean localGenerated= generated.get();
@@ -43,10 +43,10 @@ public abstract class Commands_customCommandsMixin
CarpetSettings.impendingFillSkipUpdates.set(false); CarpetSettings.impendingFillSkipUpdates.set(false);
} }
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "performCommand", at = @At( @Redirect(method = "performCommand", at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lorg/slf4j/Logger;isDebugEnabled()Z" target = "Lorg/slf4j/Logger;isDebugEnabled()Z",
remap = false
), ),
require = 0 require = 0
) )
@@ -56,4 +56,4 @@ public abstract class Commands_customCommandsMixin
return true; return true;
return logger.isDebugEnabled(); return logger.isDebugEnabled();
} }
} }
@@ -26,7 +26,7 @@ public class Level_updateSuppressionCrashFixMixin {
) )
public void checkUpdateSuppression(BlockPos sourcePos, Block sourceBlock, BlockPos neighborPos, CallbackInfo ci, BlockState state,Throwable throwable){ public void checkUpdateSuppression(BlockPos sourcePos, Block sourceBlock, BlockPos neighborPos, CallbackInfo ci, BlockState state,Throwable throwable){
if(CarpetSettings.updateSuppressionCrashFix && (throwable instanceof ThrowableSuppression || throwable instanceof StackOverflowError)){ if(CarpetSettings.updateSuppressionCrashFix && (throwable instanceof ThrowableSuppression || throwable instanceof StackOverflowError)){
throw new ThrowableSuppression("Update suppression",neighborPos); throw new ThrowableSuppression("Update suppression", neighborPos);
} }
} }
} }
@@ -11,8 +11,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(PerfCommand.class) @Mixin(PerfCommand.class)
public class PerfCommand_permissionMixin public class PerfCommand_permissionMixin
{ {
@SuppressWarnings("UnresolvedMixinReference") @Inject(method = "method_37340", at = @At("HEAD"), cancellable = true, remap = false)
@Inject(method = "method_37340", at = @At("HEAD"), cancellable = true)
private static void canRun(CommandSourceStack source, CallbackInfoReturnable<Boolean> cir) private static void canRun(CommandSourceStack source, CallbackInfoReturnable<Boolean> cir)
{ {
cir.setReturnValue(source.hasPermission(CarpetSettings.perfPermissionLevel)); cir.setReturnValue(source.hasPermission(CarpetSettings.perfPermissionLevel));
@@ -11,11 +11,10 @@ import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplie
@Mixin(PieceGeneratorSupplier.class) @Mixin(PieceGeneratorSupplier.class)
public interface PieceGeneratorSupplier_plopMixin public interface PieceGeneratorSupplier_plopMixin
{ {
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "method_39845", at = @At( @Redirect(method = "method_39845", at = @At(
value = "INVOKE", value = "INVOKE",
target = "java/util/function/Predicate.test(Ljava/lang/Object;)Z" target = "java/util/function/Predicate.test(Ljava/lang/Object;)Z"
)) ), remap = false)
private static boolean checkMate(Predicate<Object> predicate, Object o) private static boolean checkMate(Predicate<Object> predicate, Object o)
{ {
return CarpetSettings.skipGenerationChecks.get() || predicate.test(o); return CarpetSettings.skipGenerationChecks.get() || predicate.test(o);
@@ -13,8 +13,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
public class ReloadCommand_reloadAppsMixin { public class ReloadCommand_reloadAppsMixin {
//method_13530(Lcom/mojang/brigadier/context/CommandContext;)I //method_13530(Lcom/mojang/brigadier/context/CommandContext;)I
// internal of register. // internal of register.
@SuppressWarnings("UnresolvedMixinReference") @Inject(method = "method_13530", at = @At("TAIL"), remap = false)
@Inject(method = "method_13530", at = @At("TAIL"))
private static void onReload(CommandContext<CommandSourceStack> context, CallbackInfoReturnable<Integer> cir) private static void onReload(CommandContext<CommandSourceStack> context, CallbackInfoReturnable<Integer> cir)
{ {
// can't fetch here the reference to the server // can't fetch here the reference to the server