fabric: minor formatting/javadoc fixes

This commit is contained in:
jmp 2021-03-12 01:13:40 -08:00 committed by Jason
parent 5a15ca2167
commit 488ea8f9d8
5 changed files with 8 additions and 9 deletions

View file

@ -751,7 +751,7 @@ public class CommandArgument<C, T> implements Comparable<CommandArgument<?, ?>>,
* @param <C> sender type
* @param <T> argument value type
* @param <B> the subclass type
* @since 1.4.0
* @since 1.5.0
*/
public abstract static class TypedBuilder<C, T, B extends Builder<C, T>> extends Builder<C, T> {

View file

@ -73,7 +73,7 @@ public abstract class ArgumentParseResult<T> {
* @param mapper the transformation
* @param <U> the result type
* @return a new result if successful, otherwise a failure
* @since 1.4.0
* @since 1.5.0
*/
public abstract <U> @NonNull ArgumentParseResult<U> mapParsedValue(Function<T, U> mapper);
@ -83,7 +83,7 @@ public abstract class ArgumentParseResult<T> {
* @param mapper the transformation
* @param <U> the result type
* @return a new result if successful, otherwise a failure
* @since 1.4.0
* @since 1.5.0
*/
public abstract <U> @NonNull ArgumentParseResult<U> flatMapParsedValue(Function<T, ArgumentParseResult<U>> mapper);
@ -99,7 +99,7 @@ public abstract class ArgumentParseResult<T> {
*
* @param mapper the exception transformation
* @return if this is a failure, a transformed result, otherwise this
* @since 1.4.0
* @since 1.5.0
*/
public abstract @NonNull ArgumentParseResult<T> mapFailure(Function<Throwable, Throwable> mapper);

View file

@ -98,6 +98,7 @@ public interface ArgumentParser<C, T> {
* @param mapper the mapper to apply
* @param <O> the result type
* @return a derived parser.
* @since 1.5.0
*/
default <O> @NonNull ArgumentParser<C, O> map(final BiFunction<CommandContext<C>, T, ArgumentParseResult<O>> mapper) {
return new MappedArgumentParser<>(this, requireNonNull(mapper, "mapper"));

View file

@ -252,7 +252,7 @@ public final class CloudBrigadierManager<C, S> {
* <p>This is passed to completion requests for mapped argument types.</p>
*
* @param mapper the reverse brigadier sender mapper
* @since 1.4.0
* @since 1.5.0
*/
public void backwardsBrigadierSenderMapper(final @NonNull Function<@NonNull C, @Nullable S> mapper) {
this.backwardsBrigadierCommandSenderMapper = mapper;
@ -335,7 +335,7 @@ public final class CloudBrigadierManager<C, S> {
* @param <T> cloud argument value type
* @param <K> cloud argument type
* @param <O> Brigadier argument type value
* @deprecated for removal since 1.4.0, use {@link #registerMapping(TypeToken, Consumer)} instead.
* @deprecated for removal since 1.5.0, use {@link #registerMapping(TypeToken, Consumer)} instead.
*/
@Deprecated
@SuppressWarnings("unchecked")
@ -359,7 +359,7 @@ public final class CloudBrigadierManager<C, S> {
* @param parserType The cloud argument parser type
* @param configurer a callback that will configure the mapping attributes
* @param <K> cloud argument parser type
* @since 1.4.0
* @since 1.5.0
*/
public <K extends ArgumentParser<C, ?>> void registerMapping(final @NonNull TypeToken<K> parserType,
final Consumer<BrigadierMappingBuilder<K, S>> configurer) {

View file

@ -38,8 +38,6 @@ import java.util.function.BiFunction;
/**
* An argument for any {@link net.minecraft.particle.ParticleEffect}
*
* <p>These operations can be used to compare scores on a {@link net.minecraft.scoreboard.Scoreboard}.</p>
*
* @param <C> the sender type
* @since 1.5.0
*/