Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
zlataovce authored Feb 3, 2025
1 parent 8e923c9 commit 896aa09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/paper/dev/api/data-component-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A data component represents a piece of data associated with an item. Vanilla ite

### Structure
![Component Structure](assets/data-component-api-tree.png)
For implementation details, [click here](#example-cool-sword)
For implementation details, [click here](#example-cool-sword).

#### The prototype (default values)
Items come with an initial set of components that we call the prototype.
Expand Down Expand Up @@ -106,7 +106,7 @@ boolean hasCustomName = stack.hasData(DataComponentTypes.CUSTOM_NAME);
logger.info("Has custom name? " + hasCustomName);
```

### reading a valued data component
### Reading a valued data component

```java
// The damage of an item can be null, so we require a null check
Expand Down Expand Up @@ -216,7 +216,7 @@ itemStack.setData(DataComponentTypes.ENCHANTMENT_GLINT_OVERRIDE, true); // Make

## Matching items without certain data components

When comparing items, you sometimes want to ignore certain values. For this we can use the
When comparing items, you sometimes want to ignore certain values. For this, we can use the
<Javadoc name="org.bukkit.inventory.ItemStack#matchesWithoutData(org.bukkit.inventory.ItemStack,java.util.Set)">`ItemStack#matchesWithoutData`</Javadoc>
method.

Expand Down

0 comments on commit 896aa09

Please sign in to comment.