Update to loom 0.11 to fix all issues with synthetics

This commit is contained in:
altrisi committed 2022-01-26 14:03:34 +01:00
1 parent 1af1b75dba
commit d2c159e59c
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
}
@@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
public class PerfCommand_permissionMixin
{
@SuppressWarnings("UnresolvedMixinReference")
@Inject(method = "lambda$register$0(Lnet/minecraft/commands/CommandSourceStack;)Z", at = @At("HEAD"), cancellable = true)
@Inject(method = "method_37340", at = @At("HEAD"), cancellable = true)
private static void canRun(CommandSourceStack source, CallbackInfoReturnable<Boolean> cir)
{
cir.setReturnValue(source.hasPermission(CarpetSettings.perfPermissionLevel));
@@ -14,7 +14,7 @@ public class ReloadCommand_reloadAppsMixin {
//method_13530(Lcom/mojang/brigadier/context/CommandContext;)I
// internal of register.
@SuppressWarnings("UnresolvedMixinReference")
@Inject(method = "lambda$register$2", at = @At("TAIL"))
@Inject(method = "method_13530", at = @At("TAIL"))
private static void onReload(CommandContext<CommandSourceStack> context, CallbackInfoReturnable<Integer> cir)
{
// can't fetch here the reference to the server
@@ -12,7 +12,7 @@ import net.minecraft.world.level.levelgen.structure.pieces.PieceGeneratorSupplie
public interface StructureGeneratorFactory_plopMixin
{
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "lambda$simple$0(Ljava/util/function/Predicate;Ljava/util/Optional;Lnet/minecraft/world/level/levelgen/structure/pieces/PieceGeneratorSupplier$Context;)Ljava/util/Optional;", at = @At(
@Redirect(method = "method_39845", at = @At(
value = "INVOKE",
target = "java/util/function/Predicate.test(Ljava/lang/Object;)Z"
))
@@ -108,10 +108,10 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
ThreadLocal<Boolean> generated = ThreadLocal.withInitial(() -> null);
// in convertToFullChunk
// in protoChunkToFullChunk
// fancier version of the one below, ensuring that the event is triggered when the chunk is actually loaded.
@SuppressWarnings("UnresolvedMixinReference")
@Inject(method = "lambda$protoChunkToFullChunk$28", at = @At("HEAD"))
@Inject(method = "method_20460", at = @At("HEAD"))
private void onChunkGeneratedStart(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir)
{
if (CHUNK_GENERATED.isNeeded() || CHUNK_LOADED.isNeeded())
@@ -125,7 +125,7 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
}
@SuppressWarnings("UnresolvedMixinReference")
@Inject(method = "lambda$protoChunkToFullChunk$28", at = @At("RETURN"))
@Inject(method = "method_20460", at = @At("RETURN"))
private void onChunkGeneratedEnd(ChunkHolder chunkHolder, Either<ChunkAccess, ChunkLoadingFailure> chunk, CallbackInfoReturnable<CompletableFuture<Either<ChunkAccess, ChunkLoadingFailure>>> cir)
{
Boolean localGenerated= generated.get();