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(double x, double y, double z)
    • formatLocation

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

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

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

      public CrashReportCategory setDetail(String key, CrashReportDetail<String> callback)
      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 key, Object value)
      Adds a Crashreport section with the given name with the given value (converted .toString())
    • setDetailError

      public void setDetailError(String key, Throwable t)
      Adds a Crashreport section with the given name with the given Throwable
    • fillInStackTrace

      public int fillInStackTrace(int nestedOffset)
      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 source, StackTraceElement next)
      Do the deepest two elements of our saved stack trace match the given elements, in order from the deepest?
    • trimStacktrace

      public void trimStacktrace(int length)
      Removes the given number entries from the bottom of the stack trace.
    • getDetails

      public void getDetails(StringBuilder builder)
    • getStacktrace

      public StackTraceElement[] getStacktrace()
    • setStackTrace

      public void setStackTrace(StackTraceElement[] stackTrace)
    • populateBlockDetails

      public static void populateBlockDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos, BlockState state)
    • populateBlockLocationDetails

      public static CrashReportCategory populateBlockLocationDetails(CrashReportCategory category, LevelHeightAccessor levelHeightAccessor, BlockPos pos)