Package net.minecraft

Class CrashReportCategory

java.lang.Object
net.minecraft.CrashReportCategory

public class CrashReportCategory extends Object
  • Field Details

  • Constructor Details

    • CrashReportCategory

      public CrashReportCategory(String title)
  • Method Details

    • formatLocation

      public static String formatLocation(LevelHeightAccessor levelHeightAccess, double x, double y, double z)
    • formatLocation

      public static String formatLocation(LevelHeightAccessor levelHeightAccess, BlockPos pos)
    • formatLocation

      public static String formatLocation(LevelHeightAccessor levelHeightAccess, int x, int y, int z)
    • setDetail

      public CrashReportCategory setDetail(String name, CrashReportDetail<String> detail)
      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

      public CrashReportCategory setDetail(String sectionName, Object value)
      Adds a Crashreport section with the given name with the given value (converted .toString())
    • setDetailError

      public void setDetailError(String sectionName, Throwable throwable)
      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

      public boolean validateStackTrace(StackTraceElement s1, StackTraceElement s2)
      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

      public void getDetails(StringBuilder builder)
    • getStacktrace

      public StackTraceElement[] getStacktrace()
    • applyStackTrace

      @Deprecated(forRemoval=true, since="1.21.1") public void applyStackTrace(Throwable t)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setStackTrace

      public void setStackTrace(StackTraceElement[] stackTrace)
    • populateBlockDetails

      public static void populateBlockDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, @Nullable BlockState state)