fabric: minor formatting/javadoc fixes
This commit is contained in:
parent
5a15ca2167
commit
488ea8f9d8
5 changed files with 8 additions and 9 deletions
|
|
@ -751,7 +751,7 @@ public class CommandArgument<C, T> implements Comparable<CommandArgument<?, ?>>,
|
||||||
* @param <C> sender type
|
* @param <C> sender type
|
||||||
* @param <T> argument value type
|
* @param <T> argument value type
|
||||||
* @param <B> the subclass 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> {
|
public abstract static class TypedBuilder<C, T, B extends Builder<C, T>> extends Builder<C, T> {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public abstract class ArgumentParseResult<T> {
|
||||||
* @param mapper the transformation
|
* @param mapper the transformation
|
||||||
* @param <U> the result type
|
* @param <U> the result type
|
||||||
* @return a new result if successful, otherwise a failure
|
* @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);
|
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 mapper the transformation
|
||||||
* @param <U> the result type
|
* @param <U> the result type
|
||||||
* @return a new result if successful, otherwise a failure
|
* @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);
|
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
|
* @param mapper the exception transformation
|
||||||
* @return if this is a failure, a transformed result, otherwise this
|
* @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);
|
public abstract @NonNull ArgumentParseResult<T> mapFailure(Function<Throwable, Throwable> mapper);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ public interface ArgumentParser<C, T> {
|
||||||
* @param mapper the mapper to apply
|
* @param mapper the mapper to apply
|
||||||
* @param <O> the result type
|
* @param <O> the result type
|
||||||
* @return a derived parser.
|
* @return a derived parser.
|
||||||
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
default <O> @NonNull ArgumentParser<C, O> map(final BiFunction<CommandContext<C>, T, ArgumentParseResult<O>> mapper) {
|
default <O> @NonNull ArgumentParser<C, O> map(final BiFunction<CommandContext<C>, T, ArgumentParseResult<O>> mapper) {
|
||||||
return new MappedArgumentParser<>(this, requireNonNull(mapper, "mapper"));
|
return new MappedArgumentParser<>(this, requireNonNull(mapper, "mapper"));
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ public final class CloudBrigadierManager<C, S> {
|
||||||
* <p>This is passed to completion requests for mapped argument types.</p>
|
* <p>This is passed to completion requests for mapped argument types.</p>
|
||||||
*
|
*
|
||||||
* @param mapper the reverse brigadier sender mapper
|
* @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) {
|
public void backwardsBrigadierSenderMapper(final @NonNull Function<@NonNull C, @Nullable S> mapper) {
|
||||||
this.backwardsBrigadierCommandSenderMapper = mapper;
|
this.backwardsBrigadierCommandSenderMapper = mapper;
|
||||||
|
|
@ -335,7 +335,7 @@ public final class CloudBrigadierManager<C, S> {
|
||||||
* @param <T> cloud argument value type
|
* @param <T> cloud argument value type
|
||||||
* @param <K> cloud argument type
|
* @param <K> cloud argument type
|
||||||
* @param <O> Brigadier argument type value
|
* @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
|
@Deprecated
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|
@ -359,7 +359,7 @@ public final class CloudBrigadierManager<C, S> {
|
||||||
* @param parserType The cloud argument parser type
|
* @param parserType The cloud argument parser type
|
||||||
* @param configurer a callback that will configure the mapping attributes
|
* @param configurer a callback that will configure the mapping attributes
|
||||||
* @param <K> cloud argument parser type
|
* @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,
|
public <K extends ArgumentParser<C, ?>> void registerMapping(final @NonNull TypeToken<K> parserType,
|
||||||
final Consumer<BrigadierMappingBuilder<K, S>> configurer) {
|
final Consumer<BrigadierMappingBuilder<K, S>> configurer) {
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,6 @@ import java.util.function.BiFunction;
|
||||||
/**
|
/**
|
||||||
* An argument for any {@link net.minecraft.particle.ParticleEffect}
|
* 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
|
* @param <C> the sender type
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue