top.hendrixshen.magiclib.mixin.dev.auth.AccountProfileKeyPairManagerMixin Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of magiclib-better-dev-1.20.6-fabric Show documentation
Show all versions of magiclib-better-dev-1.20.6-fabric Show documentation
Development Environment runtime QOL.
The newest version!
/*
* Copyright (c) 2022 magistermaks
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* and a copy of GNU General Public License along with this program. If not, see
*
*/
package top.hendrixshen.magiclib.mixin.dev.auth;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.class_7427;
import net.minecraft.class_7434;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import top.hendrixshen.magiclib.api.dependency.DependencyType;
import top.hendrixshen.magiclib.api.dependency.annotation.Dependencies;
import top.hendrixshen.magiclib.api.dependency.annotation.Dependency;
import top.hendrixshen.magiclib.impl.dev.MixinPredicates;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
/**
* Reference to mod-fungible
*/
@Dependencies(require = @Dependency(dependencyType = DependencyType.PREDICATE, predicate = MixinPredicates.AuthEmptyKeyPredicate.class))
@Environment(EnvType.CLIENT)
@Mixin(class_7434.class)
public class AccountProfileKeyPairManagerMixin {
@Inject(
method = "prepareKeyPair",
at = @At(
value = "HEAD"
),
cancellable = true
)
private void onPrepareKeyPair(@NotNull CallbackInfoReturnable>> cir) {
cir.setReturnValue(CompletableFuture.completedFuture(Optional.empty()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy