mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Clean up Logging (#3953)
# Conflicts: # patches/minecraft/net/minecraft/client/renderer/texture/Stitcher.java.patch # patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch # patches/minecraft/net/minecraft/entity/EntityList.java.patch # patches/minecraft/net/minecraft/tileentity/TileEntity.java.patch # src/main/java/net/minecraftforge/oredict/OreDictionary.java
This commit is contained in:
1 parent
68c6e7862e
commit
0e9820c51c
145 files changed
+806
-785
No files matched your search
@@ -36,11 +36,11 @@ public class ConfigTest
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
logger.debug("Old: " + CONFIG_TYPES.bool);
|
||||
logger.debug("Old: {}", CONFIG_TYPES.bool);
|
||||
CONFIG_TYPES.bool = !CONFIG_TYPES.bool;
|
||||
logger.debug("New: " + CONFIG_TYPES.bool);
|
||||
logger.debug("New: {}", CONFIG_TYPES.bool);
|
||||
ConfigManager.sync(MODID, Type.INSTANCE);
|
||||
logger.debug("After sync: " + CONFIG_TYPES.bool);
|
||||
logger.debug("After sync: {}", CONFIG_TYPES.bool);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -27,6 +27,6 @@ public class DifficultyChangeEventTest
|
||||
@SubscribeEvent
|
||||
public void onDifficultyChange(DifficultyChangeEvent event)
|
||||
{
|
||||
logger.info("Difficulty changed from " + event.getOldDifficulty() + " to " + event.getDifficulty());
|
||||
logger.info("Difficulty changed from {} to {}", event.getOldDifficulty(), event.getDifficulty());
|
||||
}
|
||||
}
|
||||
@@ -208,17 +208,17 @@ public class DynBucketTest
|
||||
|
||||
for (int i = 0; i < handler.getSlots(); i++)
|
||||
{
|
||||
logger.info("Expected 1: " + handler.getStackInSlot(i));
|
||||
logger.info("Expected 1: {}", handler.getStackInSlot(i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < handler2.getSlots(); i++)
|
||||
{
|
||||
logger.info("Expected 2: " + handler2.getStackInSlot(i));
|
||||
logger.info("Expected 2: {}", handler2.getStackInSlot(i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < joined.getSlots(); i++)
|
||||
{
|
||||
logger.info("Joined: " + joined.getStackInSlot(i));
|
||||
logger.info("Joined: {}", joined.getStackInSlot(i));
|
||||
}
|
||||
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStackIn);
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EnchantmentLevelSetTest
|
||||
public static void onEnchantmentLevelSet(EnchantmentLevelSetEvent event)
|
||||
{
|
||||
// invert enchantment level, just for fun
|
||||
logger.info("Enchantment row: " + event.getEnchantRow() + ", level: " + event.getLevel());
|
||||
logger.info("Enchantment row: {}, level: {}", event.getEnchantRow(), event.getLevel());
|
||||
event.setLevel(30 - event.getLevel());
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class EntityTravelToDimensionEventTest
|
||||
{
|
||||
if (ENABLE)
|
||||
{
|
||||
logger.info("Travelling to Dimension " + event.getDimension() + " Entity: " + event.getEntity());
|
||||
logger.info("Travelling to Dimension {} Entity: {}", event.getDimension(), event.getEntity());
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,7 @@ public class EquipmentChangeTest
|
||||
public void onEquipmentChange(LivingEquipmentChangeEvent event)
|
||||
{
|
||||
//a debug console print
|
||||
logger.info("[Equipment-Change] " + event.getEntity() + " changed his Equipment in "
|
||||
+ event.getSlot() + " from " + event.getFrom() + " to " + event.getTo());
|
||||
logger.info("[Equipment-Change] {} changed their Equipment in {} from {} to {}", event.getEntity(), event.getSlot(), event.getFrom(), event.getTo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class FluidHandlerTest
|
||||
{
|
||||
FluidStack drain = fluidHandler.drain(Integer.MAX_VALUE, true);
|
||||
ItemStack drainedStack = fluidHandler.getContainer();
|
||||
logger.info("Draining " + stackString(stack) + " gives " + fluidString(drain) + " and " + stackString(drainedStack));
|
||||
logger.info("Draining {} gives {} and {}", stackString(stack), fluidString(drain), stackString(drainedStack));
|
||||
|
||||
if (drain == null && !ItemStack.areItemStacksEqual(originalStack, preDrainStack))
|
||||
{
|
||||
@@ -76,7 +76,7 @@ public class FluidHandlerTest
|
||||
|
||||
if (filled > 0)
|
||||
{
|
||||
logger.info("Filling " + stackString(stack) + " with " + fluidString(new FluidStack(fluid, filled)) + " gives " + stackString(filledStack));
|
||||
logger.info("Filling {} with {} gives {}", stackString(stack), fluidString(new FluidStack(fluid, filled)), stackString(filledStack));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ItemFishedTest
|
||||
EntityFishHook hook = event.getHookEntity();
|
||||
BlockPos bobberPos = hook.getPosition();
|
||||
Biome biomeFishedAt = hook.getEntityWorld().getBiome(bobberPos);
|
||||
logger.info("Item fished in Biome " + biomeFishedAt.getBiomeName());
|
||||
logger.info("Item fished in Biome {}", biomeFishedAt.getBiomeName());
|
||||
if (biomeFishedAt.equals(Biomes.OCEAN))
|
||||
{
|
||||
logger.info("Canceling the event because biome is ocean");
|
||||
|
||||
@@ -306,7 +306,7 @@ public class ModelAnimationDebug
|
||||
{
|
||||
for (Event event : pastEvents)
|
||||
{
|
||||
logger.info("Event: " + event.event() + " " + event.offset() + " " + getPos() + " " + time);
|
||||
logger.info("Event: {} {} {} {}", event.event(), event.offset(), getPos(), time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ public class ModelLoaderRegistryDebug
|
||||
{
|
||||
if (world.isRemote)
|
||||
{
|
||||
logger.info("click " + counter);
|
||||
logger.info("click {}", counter);
|
||||
if (player.isSneaking())
|
||||
{
|
||||
counter--;
|
||||
@@ -574,7 +574,7 @@ public class ModelLoaderRegistryDebug
|
||||
{
|
||||
if (this.world.isRemote)
|
||||
{
|
||||
logger.info("%b", shouldIncrement);
|
||||
logger.info(shouldIncrement);
|
||||
/*
|
||||
IBakedModel bakedModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelFromBlockState(this.world.getBlockState(this.pos), this.world, this.pos);
|
||||
if (bakedModel != null && bakedModel instanceof OBJBakedModel)
|
||||
|
||||
@@ -28,7 +28,7 @@ public class NeighborNotifyEventTest
|
||||
@SubscribeEvent
|
||||
public void onNeighborNotify(NeighborNotifyEvent event)
|
||||
{
|
||||
logger.info(event.getPos().toString() + " with face information: " + event.getNotifiedSides());
|
||||
logger.info("{} with face information: {}", event.getPos().toString(), event.getNotifiedSides());
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class PlayerSetSpawnTest
|
||||
@SubscribeEvent
|
||||
public void onPlayerSetSpawn(PlayerSetSpawnEvent event)
|
||||
{
|
||||
logger.info(event.isForced() + " " + event.getNewSpawn().toString());
|
||||
logger.info("{} {}", event.isForced(), event.getNewSpawn().toString());
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class TestCapabilityMod
|
||||
{
|
||||
event.setCanceled(true);
|
||||
IExampleCapability inv = te.getCapability(TEST_CAP, event.getFace());
|
||||
logger.info("Hi I'm a " + inv.getOwnerType());
|
||||
logger.info("Hi I'm a {}", inv.getOwnerType());
|
||||
}
|
||||
if (event.getWorld().getBlockState(event.getPos()).getBlock() == Blocks.DIRT && event.getItemStack().hasCapability(TEST_CAP, null))
|
||||
{
|
||||
@@ -92,7 +92,7 @@ public class TestCapabilityMod
|
||||
{
|
||||
IExampleCapability cap = event.getItemStack().getCapability(TEST_CAP, null);
|
||||
cap.toggleVal();
|
||||
logger.info("Test value is now: " + (cap.getVal() ? "TRUE" : "FALSE"));
|
||||
logger.info("Test value is now: {}", cap.getVal() ? "TRUE" : "FALSE");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class TextureDump
|
||||
try
|
||||
{
|
||||
ImageIO.write(bufferedimage, "png", output);
|
||||
logger.info("Exported png to: %s", output.getAbsolutePath());
|
||||
logger.info("Exported png to: {}", output.getAbsolutePath());
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TileEntityLoadingTest
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
logger.info("World: " + world + ", Pos: " + pos + ", State: " + world.getBlockState(pos));
|
||||
logger.info("World: {}, Pos: {}, State: {}", world, pos, world.getBlockState(pos));
|
||||
if (DEBUG)
|
||||
{
|
||||
logger.trace("Stack trace:", new Exception());
|
||||
|
||||
Reference in new issue
Block a user