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() {
|
public static void init() {
|
||||||
|
|
||||||
System.out.println("Hello from Common init!");
|
Constants.LOG.info("Hello from Common init!");
|
||||||
System.out.println("Diamond Item >> " + Registry.ITEM.getKey(Items.DIAMOND));
|
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.
|
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
||||||
// However, some things (like resources) may still be uninitialized.
|
// However, some things (like resources) may still be uninitialized.
|
||||||
// Proceed with mild caution.
|
// Proceed with mild caution.
|
||||||
|
|
||||||
System.out.println("Hello Fabric world!");
|
Constants.LOG.info("Hello Fabric world!");
|
||||||
CommonClass.init();
|
CommonClass.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.example.examplemod.mixin;
|
package com.example.examplemod.mixin;
|
||||||
|
|
||||||
|
import com.example.examplemod.Constants;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.screens.TitleScreen;
|
import net.minecraft.client.gui.screens.TitleScreen;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
@ -13,9 +14,8 @@ public class ExampleMixin {
|
||||||
@Inject(at = @At("HEAD"), method = "init()V")
|
@Inject(at = @At("HEAD"), method = "init()V")
|
||||||
private void init(CallbackInfo info) {
|
private void init(CallbackInfo info) {
|
||||||
|
|
||||||
System.out.println("This line is printed by an example mod mixin!");
|
Constants.LOG.info("This line is printed by an example mod mixin from Fabric!");
|
||||||
System.out.println(Minecraft.getInstance().getVersionType());
|
Constants.LOG.info("MC Version: {}", Minecraft.getInstance().getVersionType());
|
||||||
System.out.println(this.getClass().getClassLoader());
|
Constants.LOG.info("Classloader: {}", this.getClass().getClassLoader());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
@ -66,4 +66,4 @@ public class ExampleMod {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user