Skip to content

Commit

Permalink
Fix miscapitalized ByteBufCodecs in streamcodecs.md (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
noobanidus authored Jan 3, 2025
1 parent 15c29db commit 00bd016
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/networking/streamcodecs.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ Custom registries must be syncable by calling `RegistryBuilder#sync` and setting
```java
// Registry object
public static final StreamCodec<RegistryFriendlyByteBuf, Item> VALUE_STREAM_CODEC =
BytebufCodecs.registry(Registries.ITEM);
ByteBufCodecs.registry(Registries.ITEM);

// Holder of registry object
public static final StreamCodec<RegistryFriendlyByteBuf, Holder<Item>> HOLDER_STREAM_CODEC =
BytebufCodecs.holderRegistry(Registries.ITEM);
ByteBufCodecs.holderRegistry(Registries.ITEM);
```

`holder` returns a holder wrapped registry object. This method sends over an id representing the registry object, or the registry object itself if the provided `Holder` is a direct reference. To do so, `holder` also takes in the stream codec of the registry object.
Expand All @@ -332,7 +332,7 @@ Tags or sets of holder wrapped registry objects can be sent using `holderSet`. T

```java
public static final StreamCodec<RegistryFriendlyByteBuf, HolderSet<Item>> HOLDER_SET_STREAM_CODEC =
BytebufCodecs.holderSet(Registries.ITEM);
ByteBufCodecs.holderSet(Registries.ITEM);
```

### Recursive
Expand Down

0 comments on commit 00bd016

Please sign in to comment.