cleanLogs rule
This commit is contained in:
1 parent
e759a368b9
commit
046d931770
5 files changed
+56
-3
No files matched your search
@@ -0,0 +1,20 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(targets="net.minecraft.client.sound.SoundEngine$SourceSetImpl")
|
||||
public class SoundEngineInt_cleanLogsMixin
|
||||
{
|
||||
@Redirect(method = "createSource", at = @At(
|
||||
value="INVOKE",
|
||||
target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V"
|
||||
))
|
||||
private void doWarnOrNotWarn(Logger logger, String message, Object p0)
|
||||
{
|
||||
if (!CarpetSettings.cleanLogs) logger.warn(message, p0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user