Update logging

This commit is contained in:
Mrbysco 2024-10-18 22:25:12 +02:00
parent bae1ef5e91
commit 9abb4868d6
8 changed files with 9 additions and 9 deletions

View file

@ -86,7 +86,7 @@ public class RenderBatteryBox implements BlockEntityRenderer<TileEntityBatteryBo
try { try {
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer); AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
} catch (Exception e) { } catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a battery box! The item is " + BuiltInRegistries.ITEM.getKey(stack.getItem()) + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a battery box! The item is {}!", BuiltInRegistries.ITEM.getKey(stack.getItem()), e);
} }
matrices.popPose(); matrices.popPose();

View file

@ -50,7 +50,7 @@ public class RenderDisplayStand implements BlockEntityRenderer<TileEntityDisplay
try { try {
AssetUtil.renderItemInWorld(stack, combinedLightIn, combinedOverlayIn, matrices, buffer); AssetUtil.renderItemInWorld(stack, combinedLightIn, combinedOverlayIn, matrices, buffer);
} catch (Exception e) { } catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is " + BuiltInRegistries.ITEM.getKey(stack.getItem()) + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in a display stand! The item is {}!", BuiltInRegistries.ITEM.getKey(stack.getItem()), e);
} }
matrices.popPose(); matrices.popPose();

View file

@ -52,7 +52,7 @@ public class RenderEmpowerer implements BlockEntityRenderer<TileEntityEmpowerer>
try { try {
AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer); AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer);
} catch (Exception e) { } catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + BuiltInRegistries.ITEM.getKey(stack.getItem()) + "!", e); ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is {}!", BuiltInRegistries.ITEM.getKey(stack.getItem()), e);
} }
matrices.popPose(); matrices.popPose();

View file

@ -77,7 +77,7 @@ public class RecipeKeepDataShaped extends ShapedRecipe {
RecipeSerializer.SHAPED_RECIPE.streamCodec().encode(buffer, recipe); RecipeSerializer.SHAPED_RECIPE.streamCodec().encode(buffer, recipe);
} }
catch (Exception exception) { catch (Exception exception) {
ActuallyAdditions.LOGGER.info("Error writing "+ NAME +" Recipe to packet: ", exception); ActuallyAdditions.LOGGER.info("Error writing {} Recipe to packet: ", NAME, exception);
throw exception; throw exception;
} }
} }

View file

@ -97,7 +97,7 @@ public class RecipeKeepDataShapeless extends ShapelessRecipe {
RecipeSerializer.SHAPELESS_RECIPE.streamCodec().encode(pBuffer, pRecipe); RecipeSerializer.SHAPELESS_RECIPE.streamCodec().encode(pBuffer, pRecipe);
} }
catch (Exception e) { catch (Exception e) {
ActuallyAdditions.LOGGER.info("Failed to serialize " + NAME + " Recipe to packet: " + e.getMessage()); ActuallyAdditions.LOGGER.info("Failed to serialize {} Recipe to packet: {}", NAME, e.getMessage());
throw e; throw e;
} }
} }

View file

@ -142,10 +142,10 @@ public final class PacketHandler {
WorldData.get(level).setDirty(); WorldData.get(level).setDirty();
if (compound.getBoolean("Log")) { if (compound.getBoolean("Log")) {
ActuallyAdditions.LOGGER.info("Receiving changed Player Data for player " + player.getName() + "."); ActuallyAdditions.LOGGER.info("Receiving changed Player Data for player {}.", player.getName());
} }
} else { } else {
ActuallyAdditions.LOGGER.error("Tried to receive Player Data for UUID " + compound.getUUID("UUID") + ", but he doesn't seem to be present!"); ActuallyAdditions.LOGGER.error("Tried to receive Player Data for UUID {}, but he doesn't seem to be present!", compound.getUUID("UUID"));
} }
} }
}; };

View file

@ -68,7 +68,7 @@ public final class PacketHelperClient {
PlayerData.getDataFromPlayer(player).readFromNBT(dataTag, false); PlayerData.getDataFromPlayer(player).readFromNBT(dataTag, false);
if (compound.getBoolean("Log")) { if (compound.getBoolean("Log")) {
ActuallyAdditions.LOGGER.info("Receiving (new or changed) Player Data for player " + player.getName() + "."); ActuallyAdditions.LOGGER.info("Receiving (new or changed) Player Data for player {}.", player.getName());
} }
} else { } else {
ActuallyAdditions.LOGGER.error("Tried to receive Player Data for the current player, but he doesn't seem to be present!"); ActuallyAdditions.LOGGER.error("Tried to receive Player Data for the current player, but he doesn't seem to be present!");

View file

@ -199,7 +199,7 @@ public final class WorldUtil {
//setHandItemWithoutAnnoyingSound(fake, Hand.MAIN_HAND, heldBefore); //setHandItemWithoutAnnoyingSound(fake, Hand.MAIN_HAND, heldBefore);
return result; return result;
} catch (Exception e) { } catch (Exception e) {
ActuallyAdditions.LOGGER.error("Something that places Blocks at " + offsetPos.getX() + ", " + offsetPos.getY() + ", " + offsetPos.getZ() + " in World " + level.dimension() + " threw an Exception! Don't let that happen again!", e); ActuallyAdditions.LOGGER.error("Something that places Blocks at {}, {}, {} in World {} threw an Exception! Don't let that happen again!", offsetPos.getX(), offsetPos.getY(), offsetPos.getZ(), level.dimension(), e);
} }
} }
return stack; return stack;