Move all System.out to Constants.LOG
This commit is contained in:
parent
210dc0f8ba
commit
f445322f61
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -66,4 +66,4 @@ public class ExampleMod {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user