mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +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
@@ -512,7 +512,7 @@ public class ForgeHooksClient
|
||||
glEnableVertexAttribArray(attr.getIndex());
|
||||
glVertexAttribPointer(attr.getIndex(), count, constant, false, stride, buffer);
|
||||
default:
|
||||
FMLLog.severe("Unimplemented vanilla attribute upload: %s", attrType.getDisplayName());
|
||||
FMLLog.log.fatal("Unimplemented vanilla attribute upload: {}", attrType.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -542,7 +542,7 @@ public class ForgeHooksClient
|
||||
case GENERIC:
|
||||
glDisableVertexAttribArray(attr.getIndex());
|
||||
default:
|
||||
FMLLog.severe("Unimplemented vanilla attribute upload: %s", attrType.getDisplayName());
|
||||
FMLLog.log.fatal("Unimplemented vanilla attribute upload: {}", attrType.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -188,9 +188,9 @@ public class ForgeBlockStateV1 extends Marker
|
||||
String value = v.textures.get(tex.getValue().substring(1));
|
||||
if (value == null)
|
||||
{
|
||||
FMLLog.severe("Could not resolve texture name \"" + tex.getValue() + "\" for permutation \"" + e.getKey() + "\"");
|
||||
FMLLog.log.fatal("Could not resolve texture name \"{}\" for permutation \"{}\"", tex.getValue(), e.getKey());
|
||||
for (Entry<String, String> t: v.textures.entrySet())
|
||||
FMLLog.severe(t.getKey() + "=" + t.getValue());
|
||||
FMLLog.log.fatal("{}={}", t.getKey(), t.getValue());
|
||||
throw new JsonParseException("Could not resolve texture name \"" + tex.getValue() + "\" for permutation \"" + e.getKey() + "\"");
|
||||
}
|
||||
v.textures.put(tex.getKey(), value);
|
||||
|
||||
@@ -433,7 +433,7 @@ public final class ModelFluid implements IModelCustomData
|
||||
String fluid = e.getAsString();
|
||||
if(!FluidRegistry.isFluidRegistered(fluid))
|
||||
{
|
||||
FMLLog.severe("fluid '%s' not found", fluid);
|
||||
FMLLog.log.fatal("fluid '{}' not found", fluid);
|
||||
return WATER;
|
||||
}
|
||||
return new ModelFluid(FluidRegistry.getFluid(fluid));
|
||||
|
||||
@@ -329,7 +329,7 @@ public final class ModelLoader extends ModelBakery
|
||||
catch(Exception normalException)
|
||||
{
|
||||
// try blockstate json if the item model is missing
|
||||
FMLLog.fine("Item json isn't found for '" + memory + "', trying to load the variant from the blockstate json");
|
||||
FMLLog.log.debug("Item json isn't found for '{}', trying to load the variant from the blockstate json", memory);
|
||||
try
|
||||
{
|
||||
model = ModelLoaderRegistry.getModel(memory);
|
||||
@@ -362,7 +362,7 @@ public final class ModelLoader extends ModelBakery
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
FMLLog.getLogger().error("Could not load the forge bucket model from the blockstate", exception);
|
||||
FMLLog.log.error("Could not load the forge bucket model from the blockstate", exception);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1081,17 +1081,17 @@ public final class ModelLoader extends ModelBakery
|
||||
if(entry.getValue() instanceof ItemLoadingException)
|
||||
{
|
||||
ItemLoadingException ex = (ItemLoadingException)entry.getValue();
|
||||
FMLLog.getLogger().error(errorMsg + ", normal location exception: ", ex.normalException);
|
||||
FMLLog.getLogger().error(errorMsg + ", blockstate location exception: ", ex.blockstateException);
|
||||
FMLLog.log.error("{}, normal location exception: ", errorMsg, ex.normalException);
|
||||
FMLLog.log.error("{}, blockstate location exception: ", errorMsg, ex.blockstateException);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.getLogger().error(errorMsg, entry.getValue());
|
||||
FMLLog.log.error(errorMsg, entry.getValue());
|
||||
}
|
||||
ResourceLocation blockstateLocation = new ResourceLocation(location.getResourceDomain(), location.getResourcePath());
|
||||
if(loadingExceptions.containsKey(blockstateLocation) && !printedBlockStateErrors.contains(blockstateLocation))
|
||||
{
|
||||
FMLLog.getLogger().error("Exception loading blockstate for the variant " + location + ": ", loadingExceptions.get(blockstateLocation));
|
||||
FMLLog.log.error("Exception loading blockstate for the variant {}: ", location, loadingExceptions.get(blockstateLocation));
|
||||
printedBlockStateErrors.add(blockstateLocation);
|
||||
}
|
||||
}
|
||||
@@ -1114,7 +1114,7 @@ public final class ModelLoader extends ModelBakery
|
||||
errorCount++;
|
||||
if(errorCount < verboseMissingInfoCount)
|
||||
{
|
||||
FMLLog.severe("Model definition for location %s not found", missing);
|
||||
FMLLog.log.fatal("Model definition for location {} not found", missing);
|
||||
}
|
||||
modelErrors.put(domain, errorCount);
|
||||
}
|
||||
@@ -1127,7 +1127,7 @@ public final class ModelLoader extends ModelBakery
|
||||
{
|
||||
if(e.getValue() >= verboseMissingInfoCount)
|
||||
{
|
||||
FMLLog.severe("Suppressed additional %s model loading errors for domain %s", e.getValue() - verboseMissingInfoCount, e.getKey());
|
||||
FMLLog.log.fatal("Suppressed additional {} model loading errors for domain {}", e.getValue() - verboseMissingInfoCount, e.getKey());
|
||||
}
|
||||
}
|
||||
isLoading = false;
|
||||
|
||||
@@ -204,7 +204,7 @@ public class ModelLoaderRegistry
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
FMLLog.getLogger().error(error, e);
|
||||
FMLLog.log.error(error, e);
|
||||
return getMissingModel(location, e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public final class MultiLayerModel implements IModelCustomData
|
||||
{
|
||||
return new ModelResourceLocation(e.getAsString());
|
||||
}
|
||||
FMLLog.severe("Expect ModelResourceLocation, got: ", json);
|
||||
FMLLog.log.fatal("Expect ModelResourceLocation, got: {}", json);
|
||||
return new ModelResourceLocation("builtin/missing", "missing");
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ public final class MultiModel implements IModel
|
||||
|
||||
if(bakedBase == null && parts.isEmpty())
|
||||
{
|
||||
FMLLog.log(Level.ERROR, "MultiModel %s is empty (no base model or parts were provided/resolved)", location);
|
||||
FMLLog.log.error("MultiModel {} is empty (no base model or parts were provided/resolved)", location);
|
||||
IModel missing = ModelLoaderRegistry.getMissingModel();
|
||||
return missing.bake(missing.getDefaultState(), format, bakedTextureGetter);
|
||||
}
|
||||
|
||||
@@ -577,12 +577,12 @@ public class ModelBlockAnimation
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
FMLLog.log(Level.ERROR, e, "Exception loading vanilla model animation %s, skipping", armatureLocation);
|
||||
FMLLog.log.error("Exception loading vanilla model animation {}, skipping", armatureLocation, e);
|
||||
return defaultModelBlockAnimation;
|
||||
}
|
||||
catch(JsonParseException e)
|
||||
{
|
||||
FMLLog.log(Level.ERROR, e, "Exception loading vanilla model animation %s, skipping", armatureLocation);
|
||||
FMLLog.log.error("Exception loading vanilla model animation {}, skipping", armatureLocation, e);
|
||||
return defaultModelBlockAnimation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ public enum B3DLoader implements ICustomModelLoader
|
||||
{
|
||||
if(e.getValue().getResourcePath().startsWith("#"))
|
||||
{
|
||||
FMLLog.severe("unresolved texture '%s' for b3d model '%s'", e.getValue().getResourcePath(), modelLocation);
|
||||
FMLLog.log.fatal("unresolved texture '{}' for b3d model '{}'", e.getValue().getResourcePath(), modelLocation);
|
||||
builder.put(e.getKey(), missing);
|
||||
}
|
||||
else
|
||||
@@ -563,7 +563,7 @@ public enum B3DLoader implements ICustomModelLoader
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.severe("unknown mesh definition '%s' in array for b3d model '%s'", s.toString(), modelLocation);
|
||||
FMLLog.log.fatal("unknown mesh definition '{}' in array for b3d model '{}'", s.toString(), modelLocation);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -571,7 +571,7 @@ public enum B3DLoader implements ICustomModelLoader
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.severe("unknown mesh definition '%s' for b3d model '%s'", e.toString(), modelLocation);
|
||||
FMLLog.log.fatal("unknown mesh definition '{}' for b3d model '{}'", e.toString(), modelLocation);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -584,7 +584,7 @@ public enum B3DLoader implements ICustomModelLoader
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.severe("unknown keyframe definition '%s' for b3d model '%s'", e.toString(), modelLocation);
|
||||
FMLLog.log.fatal("unknown keyframe definition '{}' for b3d model '{}'", e.toString(), modelLocation);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class B3DModel
|
||||
{
|
||||
if(texture > textures.size())
|
||||
{
|
||||
logger.error(String.format("texture %s is out of range", texture));
|
||||
logger.error("texture {} is out of range", texture);
|
||||
return null;
|
||||
}
|
||||
else if(texture == -1) return Texture.White;
|
||||
@@ -152,7 +152,7 @@ public class B3DModel
|
||||
{
|
||||
if(brush > brushes.size())
|
||||
{
|
||||
logger.error(String.format("brush %s is out of range", brush));
|
||||
logger.error("brush {} is out of range", brush);
|
||||
return null;
|
||||
}
|
||||
else if(brush == -1) return null;
|
||||
@@ -165,7 +165,7 @@ public class B3DModel
|
||||
{
|
||||
if(vertex > vertices.size())
|
||||
{
|
||||
logger.error(String.format("vertex %s is out of range", vertex));
|
||||
logger.error("vertex {} is out of range", vertex);
|
||||
return null;
|
||||
}
|
||||
return vertices.get(vertex);
|
||||
@@ -408,17 +408,17 @@ public class B3DModel
|
||||
{
|
||||
if(pos != null)
|
||||
{
|
||||
if(oldKey.getPos() != null) logger.error("Duplicate keys: %s and %s (ignored)", oldKey, key);
|
||||
if(oldKey.getPos() != null) logger.error("Duplicate keys: {} and {} (ignored)", oldKey, key);
|
||||
else key = new Key(oldKey.getPos(), key.getScale(), key.getRot());
|
||||
}
|
||||
if(scale != null)
|
||||
{
|
||||
if(oldKey.getScale() != null) logger.error("Duplicate keys: %s and %s (ignored)", oldKey, key);
|
||||
if(oldKey.getScale() != null) logger.error("Duplicate keys: {} and {} (ignored)", oldKey, key);
|
||||
else key = new Key(key.getPos(), oldKey.getScale(), key.getRot());
|
||||
}
|
||||
if(rot != null)
|
||||
{
|
||||
if(oldKey.getRot() != null) logger.error("Duplicate keys: %s and %s (ignored)", oldKey, key);
|
||||
if(oldKey.getRot() != null) logger.error("Duplicate keys: {} and {} (ignored)", oldKey, key);
|
||||
else key = new Key(key.getPos(), key.getScale(), oldKey.getRot());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public enum OBJLoader implements ICustomModelLoader {
|
||||
public void addDomain(String domain)
|
||||
{
|
||||
enabledDomains.add(domain.toLowerCase());
|
||||
FMLLog.log(Level.INFO, "OBJLoader: Domain %s has been added.", domain.toLowerCase());
|
||||
FMLLog.log.info("OBJLoader: Domain {} has been added.", domain.toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -128,7 +128,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
{
|
||||
if (e.getValue().getTexture().getTextureLocation().getResourcePath().startsWith("#"))
|
||||
{
|
||||
FMLLog.severe("OBJLoader: Unresolved texture '%s' for obj model '%s'", e.getValue().getTexture().getTextureLocation().getResourcePath(), modelLocation);
|
||||
FMLLog.log.fatal("OBJLoader: Unresolved texture '{}' for obj model '{}'", e.getValue().getTexture().getTextureLocation().getResourcePath(), modelLocation);
|
||||
builder.put(e.getKey(), missing);
|
||||
}
|
||||
else
|
||||
@@ -285,7 +285,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
else if (key.equalsIgnoreCase("f")) // Face Elements: f v1[/vt1][/vn1] ...
|
||||
{
|
||||
if (splitData.length > 4)
|
||||
FMLLog.warning("OBJModel.Parser: found a face ('f') with more than 4 vertices, only the first 4 of these vertices will be rendered!");
|
||||
FMLLog.log.warn("OBJModel.Parser: found a face ('f') with more than 4 vertices, only the first 4 of these vertices will be rendered!");
|
||||
|
||||
List<Vertex> v = Lists.newArrayListWithCapacity(splitData.length);
|
||||
|
||||
@@ -368,7 +368,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
if (!unknownObjectCommands.contains(key))
|
||||
{
|
||||
unknownObjectCommands.add(key);
|
||||
FMLLog.info("OBJLoader.Parser: command '%s' (model: '%s') is not currently supported, skipping. Line: %d '%s'", key, objFrom, lineNum, currentLine);
|
||||
FMLLog.log.info("OBJLoader.Parser: command '{}' (model: '{}') is not currently supported, skipping. Line: {} '{}'", key, objFrom, lineNum, currentLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -545,7 +545,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.info("OBJModel: A color has already been defined for material '%s' in '%s'. The color defined by key '%s' will not be applied!", material.getName(), new ResourceLocation(domain, path).toString(), key);
|
||||
FMLLog.log.info("OBJModel: A color has already been defined for material '{}' in '{}'. The color defined by key '{}' will not be applied!", material.getName(), new ResourceLocation(domain, path).toString(), key);
|
||||
}
|
||||
}
|
||||
else if (key.equalsIgnoreCase("map_Ka") || key.equalsIgnoreCase("map_Kd") || key.equalsIgnoreCase("map_Ks"))
|
||||
@@ -569,7 +569,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.info("OBJModel: A texture has already been defined for material '%s' in '%s'. The texture defined by key '%s' will not be applied!", material.getName(), new ResourceLocation(domain, path).toString(), key);
|
||||
FMLLog.log.info("OBJModel: A texture has already been defined for material '{}' in '{}'. The texture defined by key '{}' will not be applied!", material.getName(), new ResourceLocation(domain, path).toString(), key);
|
||||
}
|
||||
}
|
||||
else if (key.equalsIgnoreCase("d") || key.equalsIgnoreCase("Tr"))
|
||||
@@ -585,7 +585,7 @@ public class OBJModel implements IRetexturableModel, IModelCustomData
|
||||
if (!unknownMaterialCommands.contains(key))
|
||||
{
|
||||
unknownMaterialCommands.add(key);
|
||||
FMLLog.info("OBJLoader.MaterialLibrary: key '%s' (model: '%s') is not currently supported, skipping", key, new ResourceLocation(domain, path));
|
||||
FMLLog.log.info("OBJLoader.MaterialLibrary: key '{}' (model: '{}') is not currently supported, skipping", key, new ResourceLocation(domain, path));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user