Skip to content

Common API

Crystal Spider edited this page Jun 2, 2024 · 12 revisions

Unified Configuration System

WIP

Tool tiers

WIP

In-game ID retrival

For both blocks and items, Cobweb provides a shorthand to retrieve their in-game IDs (e.g. Blocks.DIRT -> minecraft:dirt).

Blocks:

  • BlockUtils#getKey(Block) Returns the in-game ID of the given block as a ResourceLocation.
  • BlockUtils#getStringKey(Block) Returns the in-game ID of the given block as a string.

Items:

  • ItemUtils#getKey(Item) Returns the in-game ID of the given item as a ResourceLocation.
  • ItemUtils#getStringKey(Item) Returns the in-game ID of the given item as a string.

Platform model

To prevent code duplication across various projects, Cobweb also provides enums for the Environment and the Platform.