Package forestry.api.core
Interface IErrorManager
public interface IErrorManager
Keeps track of error information used by Forestry.
Register errors using
IForestryPlugin.registerErrors(forestry.api.plugin.IErrorRegistration).-
Method Summary
Modifier and TypeMethodDescriptiongetError(short id) Retrieves an error by its numeric ID.getError(net.minecraft.resources.ResourceLocation errorId) Retrieves an error by its unique ID.shortgetNumericId(IError error) Retrieves the numeric ID of this error.
-
Method Details
-
getError
Retrieves an error by its numeric ID.- Parameters:
id- The numeric ID of the error.- Returns:
- The error with the given ID, or
nullif no error is registered with that ID.
-
getError
Retrieves an error by its unique ID. Safe for NBT serialization.- Parameters:
errorId- The ID of the error.- Returns:
- The error with the ID.
-
getErrors
- Returns:
- A set of all registered errors.
-
createErrorLogic
IErrorLogic createErrorLogic()- Returns:
- A new instance of an IErrorLogic.
-
getNumericId
Retrieves the numeric ID of this error. Only use for network synchronization.- Parameters:
error- The error.- Returns:
- The numeric ID of the error.
-