Update to 1.19

This commit is contained in:
MonkeySaint
2022-06-10 15:37:58 -04:00
committed by Cloudburst
parent f0b189634f
commit f8dd3787d1
35 changed files with 170 additions and 164 deletions

View File

@@ -13,11 +13,11 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import java.lang.reflect.InvocationTargetException;
import net.minecraft.command.CommandSource;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
public class EnumArgumentType<T extends Enum<?>> implements ArgumentType<T> {
private static final DynamicCommandExceptionType NO_SUCH_TYPE = new DynamicCommandExceptionType(o ->
new LiteralText(o + " is not a valid argument."));
Text.literal(o + " is not a valid argument."));
private T[] values;

View File

@@ -12,13 +12,13 @@ import com.mojang.brigadier.suggestion.Suggestions;
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
import net.minecraft.command.CommandSource;
import net.minecraft.text.LiteralText;
import net.minecraft.text.Text;
public class EnumStringArgumentType implements ArgumentType<String> {
private Collection<String> EXAMPLES;
private static final DynamicCommandExceptionType INVALID_OPTION = new DynamicCommandExceptionType(name ->
new LiteralText(name+" is not a valid option."));
Text.literal(name + " is not a valid option."));
public EnumStringArgumentType(Collection<String> examples) {
this.EXAMPLES = examples;
}