Move all System.out to Constants.LOG

This commit is contained in:
Tyler Hancock 2021-10-05 21:46:10 -06:00
parent 210dc0f8ba
commit f445322f61
No known key found for this signature in database
GPG Key ID: D10D32949D03E695
4 changed files with 11 additions and 13 deletions

View File

@ -7,8 +7,7 @@ public class CommonClass {
public static void init() {
System.out.println("Hello from Common init!");
System.out.println("Diamond Item >> " + Registry.ITEM.getKey(Items.DIAMOND));
Constants.LOG.info("Hello from Common init!");
Constants.LOG.info("Diamond Item >> {}", Registry.ITEM.getKey(Items.DIAMOND));
}
}
}

View File

@ -9,9 +9,8 @@ public class ExampleMod implements ModInitializer {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
System.out.println("Hello Fabric world!");
Constants.LOG.info("Hello Fabric world!");
CommonClass.init();
}
}

View File

@ -1,5 +1,6 @@
package com.example.examplemod.mixin;
import com.example.examplemod.Constants;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.TitleScreen;
import org.spongepowered.asm.mixin.Mixin;
@ -13,9 +14,8 @@ public class ExampleMixin {
@Inject(at = @At("HEAD"), method = "init()V")
private void init(CallbackInfo info) {
System.out.println("This line is printed by an example mod mixin!");
System.out.println(Minecraft.getInstance().getVersionType());
System.out.println(this.getClass().getClassLoader());
Constants.LOG.info("This line is printed by an example mod mixin from Fabric!");
Constants.LOG.info("MC Version: {}", Minecraft.getInstance().getVersionType());
Constants.LOG.info("Classloader: {}", this.getClass().getClassLoader());
}
}
}

View File

@ -66,4 +66,4 @@ public class ExampleMod {
}
}
}