Package net.minecraft
Class CrashReportCategory
java.lang.Object
net.minecraft.CrashReportCategory
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<CrashReportCategory.Entry> private StackTraceElement[]
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated, for removal: This API element is subject to removal in a future version.int
fillInStackTrace
(int size) Resets our stack trace according to the current trace, pruning the deepest 3 entries.static String
formatLocation
(LevelHeightAccessor levelHeightAccess, double x, double y, double z) static String
formatLocation
(LevelHeightAccessor levelHeightAccess, int x, int y, int z) static String
formatLocation
(LevelHeightAccessor levelHeightAccess, BlockPos pos) void
getDetails
(StringBuilder builder) static void
populateBlockDetails
(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, BlockState state) Adds a Crashreport section with the given name with the given value (converted.toString()
)setDetail
(String name, CrashReportDetail<String> detail) Adds a section to this crash report category, resolved by calling the given callable.void
setDetailError
(String sectionName, Throwable throwable) Adds a Crashreport section with the given name with the given Throwablevoid
setStackTrace
(StackTraceElement[] stackTrace) void
trimStacktrace
(int amount) Removes the given number entries from the bottom of the stack trace.boolean
Do the deepest two elements of our saved stack trace match the given elements, in order from the deepest?
-
Field Details
-
title
-
entries
-
stackTrace
-
-
Constructor Details
-
CrashReportCategory
-
-
Method Details
-
formatLocation
public static String formatLocation(LevelHeightAccessor levelHeightAccess, double x, double y, double z) -
formatLocation
-
formatLocation
-
setDetail
Adds a section to this crash report category, resolved by calling the given callable. If the given callable throws an exception, a detail containing that exception will be created instead. -
setDetail
Adds a Crashreport section with the given name with the given value (converted.toString()
) -
setDetailError
Adds a Crashreport section with the given name with the given Throwable -
fillInStackTrace
public int fillInStackTrace(int size) Resets our stack trace according to the current trace, pruning the deepest 3 entries. The parameter indicates how many additional deepest entries to prune. Returns the number of entries in the resulting pruned stack trace. -
validateStackTrace
Do the deepest two elements of our saved stack trace match the given elements, in order from the deepest? -
trimStacktrace
public void trimStacktrace(int amount) Removes the given number entries from the bottom of the stack trace. -
getDetails
-
getStacktrace
-
applyStackTrace
Deprecated, for removal: This API element is subject to removal in a future version.Neo: UsesetStackTrace(StackTraceElement[])
instead. -
setStackTrace
-
populateBlockDetails
public static void populateBlockDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, @Nullable BlockState state)
-
setStackTrace(StackTraceElement[])
instead.