-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #561 from WaitingIdly/potion-spam
Downgrade Potion Recipes Log Level
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...g/universaltweaks/mods/extrautilities/potionlogging/mixin/UTBrewingEnergyRecipeMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package mod.acgaming.universaltweaks.mods.extrautilities.potionlogging.mixin; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import com.rwtema.extrautils2.utils.LogHelper; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
import mod.acgaming.universaltweaks.config.UTConfigMods; | ||
|
||
// Courtesy of WaitingIdly | ||
@Mixin(targets = "com.rwtema.extrautils2.machine.BrewingEnergyRecipe", remap = false) | ||
public abstract class UTBrewingEnergyRecipeMixin | ||
{ | ||
@WrapOperation(method = "checkTypes", at = @At(value = "INVOKE", target = "Lcom/rwtema/extrautils2/utils/LogHelper;info(Ljava/lang/Object;[Ljava/lang/Object;)V")) | ||
private static void utDowngradePotionLogging(Object info, Object[] info2, Operation<Void> original) | ||
{ | ||
if (!UTConfigMods.EXTRA_UTILITIES.utDowngradePotionLogging) original.call(info, info2); | ||
else LogHelper.fine(info, info2); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/mixins.mods.extrautilities.potionlogging.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"package": "mod.acgaming.universaltweaks.mods.extrautilities.potionlogging.mixin", | ||
"refmap": "universaltweaks.refmap.json", | ||
"minVersion": "0.8", | ||
"compatibilityLevel": "JAVA_8", | ||
"mixins": ["UTBrewingEnergyRecipeMixin"] | ||
} |