refactoring: renamed mixin methods
This commit is contained in:
parent
da06973b36
commit
d70cd09b42
4 changed files with 13 additions and 13 deletions
|
@ -53,7 +53,7 @@ public abstract class MixinEnchantmentEntry
|
||||||
at = @At("RETURN"),
|
at = @At("RETURN"),
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private void initCallback(Enchantment enchantment, int level, CallbackInfo ci) {
|
private void init$return(Enchantment enchantment, int level, CallbackInfo ci) {
|
||||||
if (Configuration.FORTUNE_ENABLED.get()) {
|
if (Configuration.FORTUNE_ENABLED.get()) {
|
||||||
ResourceLocation registryName = this.enchantment.getRegistryName();
|
ResourceLocation registryName = this.enchantment.getRegistryName();
|
||||||
if (registryName != null && registryName.toString().equals("minecraft:fortune")) {
|
if (registryName != null && registryName.toString().equals("minecraft:fortune")) {
|
||||||
|
@ -73,7 +73,7 @@ public abstract class MixinEnchantmentEntry
|
||||||
cancellable = true,
|
cancellable = true,
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private void isValidCallback(CallbackInfoReturnable<Boolean> ci) {
|
private void isValid$return(CallbackInfoReturnable<Boolean> ci) {
|
||||||
if (Configuration.FORTUNE_ENABLED.get()) {
|
if (Configuration.FORTUNE_ENABLED.get()) {
|
||||||
ResourceLocation registryName = this.enchantment.getRegistryName();
|
ResourceLocation registryName = this.enchantment.getRegistryName();
|
||||||
if (registryName != null && registryName.toString().equals("minecraft:fortune")
|
if (registryName != null && registryName.toString().equals("minecraft:fortune")
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class MixinPlayerResearchesData {
|
||||||
cancellable = true,
|
cancellable = true,
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private void getResearchesCallback(UUID uuid, CallbackInfoReturnable<ResearchTree> ci) {
|
private void getResearches$return(UUID uuid, CallbackInfoReturnable<ResearchTree> ci) {
|
||||||
if (Configuration.FAKE_PLAYER_FIX.get() && uuid.equals(ae2Uuid) && !this.ae2ResearchInjected) {
|
if (Configuration.FAKE_PLAYER_FIX.get() && uuid.equals(ae2Uuid) && !this.ae2ResearchInjected) {
|
||||||
VaultModTweaks.LOGGER.info(I18n.get("the_vault_tweaks.log.inject.ae2research"));
|
VaultModTweaks.LOGGER.info(I18n.get("the_vault_tweaks.log.inject.ae2research"));
|
||||||
this.playerMap.remove(ae2Uuid);
|
this.playerMap.remove(ae2Uuid);
|
||||||
|
|
|
@ -53,8 +53,8 @@ public abstract class MixinStageManager {
|
||||||
),
|
),
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private static ResearchTree overrideOnItemCrafted(Player player) {
|
private static ResearchTree onItemCrafted$getResearchTree(Player player) {
|
||||||
return getResearchTreeOverride(player);
|
return getResearchTree$redirect(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(
|
@Redirect(
|
||||||
|
@ -66,8 +66,8 @@ public abstract class MixinStageManager {
|
||||||
),
|
),
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private static ResearchTree overrideOnBlockInteraction(Player player) {
|
private static ResearchTree onBlockInteraction$getResearchTree(Player player) {
|
||||||
return getResearchTreeOverride(player);
|
return getResearchTree$redirect(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(
|
@Redirect(
|
||||||
|
@ -79,8 +79,8 @@ public abstract class MixinStageManager {
|
||||||
),
|
),
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private static ResearchTree overrideOnItemUse(Player player) {
|
private static ResearchTree onItemUse$getResearchTree(Player player) {
|
||||||
return getResearchTreeOverride(player);
|
return getResearchTree$redirect(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(
|
@Redirect(
|
||||||
|
@ -92,8 +92,8 @@ public abstract class MixinStageManager {
|
||||||
),
|
),
|
||||||
remap = false
|
remap = false
|
||||||
)
|
)
|
||||||
private static ResearchTree overrideOnEntityInteraction(Player player) {
|
private static ResearchTree onEntityInteraction$getResearchTree(Player player) {
|
||||||
return getResearchTreeOverride(player);
|
return getResearchTree$redirect(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -102,7 +102,7 @@ public abstract class MixinStageManager {
|
||||||
* @param player
|
* @param player
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static ResearchTree getResearchTreeOverride(Player player) {
|
private static ResearchTree getResearchTree$redirect(Player player) {
|
||||||
ResearchTree tree = ResearchTree.empty();
|
ResearchTree tree = ResearchTree.empty();
|
||||||
if (player instanceof FakePlayer) {
|
if (player instanceof FakePlayer) {
|
||||||
if (Configuration.FAKE_PLAYER_FIX.get()) {
|
if (Configuration.FAKE_PLAYER_FIX.get()) {
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class MixinVaultAltarBlock {
|
||||||
),
|
),
|
||||||
cancellable = true
|
cancellable = true
|
||||||
)
|
)
|
||||||
private void onUse(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit, CallbackInfoReturnable<InteractionResult> ci) {
|
private void use$return(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit, CallbackInfoReturnable<InteractionResult> ci) {
|
||||||
if (Configuration.ROUTER_VAULTAR_FIX.get() && !world.isClientSide && hand == InteractionHand.MAIN_HAND && player instanceof ServerPlayer) {
|
if (Configuration.ROUTER_VAULTAR_FIX.get() && !world.isClientSide && hand == InteractionHand.MAIN_HAND && player instanceof ServerPlayer) {
|
||||||
ServerPlayer serverPlayer = (ServerPlayer)player;
|
ServerPlayer serverPlayer = (ServerPlayer)player;
|
||||||
ItemStack heldItem = player.getMainHandItem();
|
ItemStack heldItem = player.getMainHandItem();
|
||||||
|
|
Loading…
Reference in a new issue