From 22abf2fab672a22c275c6ec6a04101c88ba7c081 Mon Sep 17 00:00:00 2001
From: gnembon
Date: Fri, 21 May 2021 04:40:32 -0300
Subject: [PATCH] minor docs
---
.../java/carpet/script/annotation/AnnotationParser.java | 2 +-
src/main/java/carpet/script/annotation/Param.java | 6 ++----
src/main/java/carpet/script/annotation/ScarpetFunction.java | 2 +-
.../java/carpet/script/annotation/SimpleTypeConverter.java | 4 ++--
4 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/main/java/carpet/script/annotation/AnnotationParser.java b/src/main/java/carpet/script/annotation/AnnotationParser.java
index aa605526..987ecb0c 100644
--- a/src/main/java/carpet/script/annotation/AnnotationParser.java
+++ b/src/main/java/carpet/script/annotation/AnnotationParser.java
@@ -67,7 +67,7 @@ import it.unimi.dsi.fastutil.objects.ObjectArrayList;
* @see OutputConverter#registerToValue(Class, java.util.function.Function)
* @see OutputConverter#register(Class, java.util.function.Function)
* @see ValueCaster#register(Class, String)
- * @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function)
+ * @see SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String)
* @see Param.Params#registerStrictConverter(Class, boolean, ValueConverter)
* @see Param.Params#registerCustomConverterFactory(java.util.function.BiFunction)
*/
diff --git a/src/main/java/carpet/script/annotation/Param.java b/src/main/java/carpet/script/annotation/Param.java
index 4718dbc8..9d28ea1f 100644
--- a/src/main/java/carpet/script/annotation/Param.java
+++ b/src/main/java/carpet/script/annotation/Param.java
@@ -170,8 +170,7 @@ public interface Param
};*/
/**
- * A {@link ValueConverter} that outputs the {@link Context} in which the function has been called when running
- * {@link #checkAndConvert(Iterator, Context, Context.Type)}, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
+ *
A {@link ValueConverter} that outputs the {@link Context} in which the function has been called, and throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* directly.
*/
static final ValueConverter CONTEXT_PROVIDER = new ValueConverter()
@@ -198,8 +197,7 @@ public interface Param
};
/**
- * A {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called when running
- * {@link #checkAndConvert(Iterator, Context, Context.Type)}, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
+ *
A {@link ValueConverter} that outputs the {@link Context.Type} which the function has been called, or throws {@link UnsupportedOperationException} when trying to convert a {@link Value}
* directly.
*/
static final ValueConverter CONTEXT_TYPE_PROVIDER = new ValueConverter()
diff --git a/src/main/java/carpet/script/annotation/ScarpetFunction.java b/src/main/java/carpet/script/annotation/ScarpetFunction.java
index 4083ada7..80aa94de 100644
--- a/src/main/java/carpet/script/annotation/ScarpetFunction.java
+++ b/src/main/java/carpet/script/annotation/ScarpetFunction.java
@@ -21,7 +21,7 @@ import carpet.script.value.Value;
* of provided arguments is either too large or too small.
*
* Types to be used in those functions must be already registered in their respective {@link ValueConverter} implementations.
- * In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function)},
+ * In order to register a new type to convert to, you can do so in {@link SimpleTypeConverter#registerType(Class, Class, java.util.function.Function, String)},
* and in order to register a new variant of {@link Value}, use {@link ValueCaster#register(Class, String)}.
* In order to convert the output of your method to a {@link LazyValue} you will also need to register its conversion in {@link OutputConverter}
*
diff --git a/src/main/java/carpet/script/annotation/SimpleTypeConverter.java b/src/main/java/carpet/script/annotation/SimpleTypeConverter.java
index db307ef5..b0711a2e 100644
--- a/src/main/java/carpet/script/annotation/SimpleTypeConverter.java
+++ b/src/main/java/carpet/script/annotation/SimpleTypeConverter.java
@@ -22,7 +22,7 @@ import net.minecraft.world.World;
*
* {@link SimpleTypeConverter}s are reused whenever asked for one, since they don't have any complexity.
*
- * @see #registerType(Class, Class, Function)
+ * @see #registerType(Class, Class, Function, String)
*
* @param The type of the required input {@link Value}
* @param The type that this converter converts to
@@ -53,7 +53,7 @@ public final class SimpleTypeConverter implements ValueConve
* The default constructor for {@link SimpleTypeConverter}.
*
* This is public in order to provide an implementation to use when registering {@link ValueConverter}s for the {@link Param.Strict} annotation
- * registry, and it's not intended way to register new {@link SimpleTypeConverter}
Use {@link #registerType(Class, Class, Function)} for
+ * registry, and it's not intended way to register new {@link SimpleTypeConverter}
Use {@link #registerType(Class, Class, Function, String)} for
* that.
*
* @param inputType The required type for the input {@link Value}