From 1905283683607424836f0e8107e5887fffdb5713 Mon Sep 17 00:00:00 2001 From: quat Date: Mon, 20 Aug 2018 22:55:08 -0400 Subject: [PATCH] better loggg --- src/main/java/quaternary/simpletrophies/SimpleTrophies.java | 4 ++++ .../client/tesr/RenderItemStackSimpleTrophy.java | 2 +- .../simpletrophies/client/tesr/RenderTileSimpleTrophy.java | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/quaternary/simpletrophies/SimpleTrophies.java b/src/main/java/quaternary/simpletrophies/SimpleTrophies.java index c5f8399..01d0434 100644 --- a/src/main/java/quaternary/simpletrophies/SimpleTrophies.java +++ b/src/main/java/quaternary/simpletrophies/SimpleTrophies.java @@ -1,10 +1,14 @@ package quaternary.simpletrophies; import net.minecraftforge.fml.common.Mod; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; @Mod(modid = SimpleTrophies.MODID, name = SimpleTrophies.NAME, version = SimpleTrophies.VERSION) public class SimpleTrophies { public static final String MODID = "simple_trophies"; public static final String NAME = "Simple Trophies"; public static final String VERSION = "GRADLE:VERSION"; + + public static final Logger LOG = LogManager.getLogger(NAME); } diff --git a/src/main/java/quaternary/simpletrophies/client/tesr/RenderItemStackSimpleTrophy.java b/src/main/java/quaternary/simpletrophies/client/tesr/RenderItemStackSimpleTrophy.java index 1115e3a..bf9feb5 100644 --- a/src/main/java/quaternary/simpletrophies/client/tesr/RenderItemStackSimpleTrophy.java +++ b/src/main/java/quaternary/simpletrophies/client/tesr/RenderItemStackSimpleTrophy.java @@ -96,7 +96,7 @@ public void renderByItem(ItemStack stack) { try { Minecraft.getMinecraft().getRenderItem().renderItem(displayedStack, ItemCameraTransforms.TransformType.GROUND); } catch(Exception oof) { - oof.printStackTrace(); + SimpleTrophies.LOG.error("Problem rendering item on a trophy TEISR", oof); } } diff --git a/src/main/java/quaternary/simpletrophies/client/tesr/RenderTileSimpleTrophy.java b/src/main/java/quaternary/simpletrophies/client/tesr/RenderTileSimpleTrophy.java index 46a4f21..76c8c79 100644 --- a/src/main/java/quaternary/simpletrophies/client/tesr/RenderTileSimpleTrophy.java +++ b/src/main/java/quaternary/simpletrophies/client/tesr/RenderTileSimpleTrophy.java @@ -8,6 +8,7 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import org.lwjgl.opengl.GL11; +import quaternary.simpletrophies.SimpleTrophies; import quaternary.simpletrophies.client.ClientGameEvents; import quaternary.simpletrophies.common.tile.TileSimpleTrophy; @@ -34,7 +35,7 @@ public void render(TileSimpleTrophy te, double x, double y, double z, float part try { Minecraft.getMinecraft().getRenderItem().renderItem(displayedStack, ItemCameraTransforms.TransformType.GROUND); } catch(Exception oof) { - oof.printStackTrace(); + SimpleTrophies.LOG.error("Problem rendering item on a trophy TESR", oof); } GlStateManager.enableBlend(); //fix a stateleak in renderitem >.>