Package api.client.debug
Class DebugRegistryUtils
java.lang.Object
api.client.debug.DebugRegistryUtils
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DebugInfoSectiongetSectionWithID(ResourceLocation identifier) Helper method to get a debug section from its ID.static List<DebugInfoSection>static DebugSpecialElementgetSpecialElementByID(ResourceLocation identifier) Helper method to get a special debug element from its ID.static List<DebugSpecialElement>static voidorderSection(ResourceLocation sectionIDToMove, ResourceLocation afterSectionID) Example:orderSection(C, B)-> "section C should be after section B"static voidorderSection(ResourceLocation sectionIDToMove, ResourceLocation afterSectionID, int priority) Example:orderSection(C, B, n)-> "section C should be after section B with a priority 'n' "static DebugInfoSectionregisterSection(ResourceLocation identifier, DebugRegistryUtils.Side side) Register an empty debug section ready to accept newOptional<String>entries.static DebugSpecialElementregisterSpecialElement(ResourceLocation identifier) Register a new special debug element ready to accept any entry.static voidremoveSection(ResourceLocation identifier) Remove a section from the debug screen.static voidremoveSpecialElement(ResourceLocation identifier) Remove a special debug element from the debug screen.
-
Constructor Details
-
DebugRegistryUtils
public DebugRegistryUtils()
-
-
Method Details
-
registerSection
public static DebugInfoSection registerSection(ResourceLocation identifier, DebugRegistryUtils.Side side) Register an empty debug section ready to accept newOptional<String>entries.- Parameters:
identifier- The ID of the section, in the form of aResourceLocation, example: 'btw:debugMinecraft'.side- The side of the debug screen where the section should be drawn.
-
removeSection
Remove a section from the debug screen.- Parameters:
identifier- The ID of the section, in the form of aResourceLocation, example: 'btw:debugMinecraft'.
-
getSectionWithID
Helper method to get a debug section from its ID.
Example:
This get the debug section with the IDDebugInfoSection section = DebugRegistryUtils.getSectionByID(new ResourceLocation("btw:debugMinecraft"));btw:debugMinecraftand save it tosection.- Parameters:
identifier- The ID of the section wanted, in the form of aResourceLocation, example: 'btw:debugMinecraft'.- See Also:
-
getSortedSections
- Parameters:
side- The side of the debug screen that need to be sorted.- Returns:
- a list of debug sections after being placed in determined order.
- See Also:
-
orderSection
Example:orderSection(C, B)-> "section C should be after section B"By default, this order have a priority of '0', higher priority sections orders will be placed before.
If multiple section have the same priority, the section registered first will be placed first. -
orderSection
public static void orderSection(ResourceLocation sectionIDToMove, ResourceLocation afterSectionID, int priority) Example:orderSection(C, B, n)-> "section C should be after section B with a priority 'n' "The highest priority section will be placed first.
If multiple sections have the same priority, the section registered first will be placed first. -
registerSpecialElement
Register a new special debug element ready to accept any entry.- Parameters:
identifier- The ID of the special debug element in the form of aResourceLocation, example: 'btw:graphs'.
-
removeSpecialElement
Remove a special debug element from the debug screen.- Parameters:
identifier- The ID of the special debug element in the form of aResourceLocation, example: 'btw:graphs'.
-
getSpecialElementByID
Helper method to get a special debug element from its ID.
Example:
This get the special debug element with the IDDebugSpecialElement element = DebugRegistryUtils.getSpecialElementByID(new ResourceLocation("btw:debugGraphs"));btw:debugGraphsand save it toelement.- Parameters:
identifier- The ID of the special debug element in the form of aResourceLocation, example: 'btw:graphs'.- See Also:
-
getSpecialElements
- Returns:
- a list of every special debug elements that need to be drawn.
-