Skip to content

Commit

Permalink
minor fixes from self-review
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Apr 24, 2024
1 parent bf2c77b commit bd255cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/**
* A registry for conversions between different data component value holder classes.
*
* <p>Conversions are discovered by {@link ServiceLoader} lookup of implementations of the {@link Provider} interface (using the loading thread's context classloader).</p>
* <p>Conversions are discovered by {@link ServiceLoader} lookup of implementations of the {@link Provider} interface (on the classloader which loaded Adventure).</p>
*
* @since 4.17.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public final class HoverEvent<V> implements Examinable, HoverEventSource<V>, Sty
* @return a hover event
* @since 4.17.0
*/
public static @NotNull HoverEvent<ShowItem> showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map<Key, DataComponentValue> dataComponents) {
public static @NotNull HoverEvent<ShowItem> showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map<Key, ? extends DataComponentValue> dataComponents) {
return showItem(ShowItem.showItem(item, count, dataComponents));
}

Expand Down Expand Up @@ -491,11 +491,11 @@ public static final class ShowItem implements Examinable {
* @since 4.17.0
* @sinceMinecraft 1.20.5
*/
public static @NotNull ShowItem showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map<Key, DataComponentValue> dataComponents) {
public static @NotNull ShowItem showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map<Key, ? extends DataComponentValue> dataComponents) {
return new ShowItem(requireNonNull(item, "item").key(), count, null, dataComponents);
}

private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @Nullable BinaryTagHolder nbt, final @NotNull Map<Key, DataComponentValue> dataComponents) {
private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @Nullable BinaryTagHolder nbt, final @NotNull Map<Key, ? extends DataComponentValue> dataComponents) {
this.item = item;
this.count = count;
this.nbt = nbt;
Expand Down Expand Up @@ -592,7 +592,7 @@ private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MA
/**
* Set the data components used on this item.
*
* <p>This will clear any legacy nbt-format data on the item.</p>
* <p>This will clear any legacy NBT-format data on the item.</p>
*
* @param holder the new data components to set
* @return a show item data object that has the provided components
Expand Down

0 comments on commit bd255cc

Please sign in to comment.