Skip to content

Commit

Permalink
- Use expression lambdas.
Browse files Browse the repository at this point in the history
  • Loading branch information
forgetmenot13579 authored Sep 21, 2024
1 parent 098b953 commit 29082e3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ public static <A> AttachmentType<A> create(Identifier id) {
* @return the registered {@link AttachmentType} instance
*/
public static <A> AttachmentType<A> createDefaulted(Identifier id, Supplier<A> initializer) {
return create(id, builder -> {
builder.initializer(initializer);
});
return create(id, builder -> builder.initializer(initializer));
}

/**
Expand All @@ -95,9 +93,7 @@ public static <A> AttachmentType<A> createDefaulted(Identifier id, Supplier<A> i
* @return the registered {@link AttachmentType} instance
*/
public static <A> AttachmentType<A> createPersistent(Identifier id, Codec<A> codec) {
return create(id, builder -> {
builder.persistent(codec);
});
return create(id, builder -> builder.persistent(codec));
}

/**
Expand Down

0 comments on commit 29082e3

Please sign in to comment.