2020-04-15 14:22:03 +02:00
|
|
|
package com.minelittlepony.unicopia.command;
|
|
|
|
|
2022-06-25 00:19:55 +02:00
|
|
|
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
2022-08-27 15:07:29 +02:00
|
|
|
|
|
|
|
import com.minelittlepony.unicopia.Unicopia;
|
2023-07-29 20:54:49 +02:00
|
|
|
import com.minelittlepony.unicopia.ability.magic.spell.trait.Trait;
|
|
|
|
import com.minelittlepony.unicopia.client.render.PlayerPoser.Animation;
|
|
|
|
import com.minelittlepony.unicopia.command.ManaCommand.ManaType;
|
2022-06-25 00:19:55 +02:00
|
|
|
import net.fabricmc.fabric.api.command.v2.ArgumentTypeRegistry;
|
2023-04-30 21:26:31 +02:00
|
|
|
import net.minecraft.command.argument.serialize.ConstantArgumentSerializer;
|
2020-04-15 14:22:03 +02:00
|
|
|
|
|
|
|
public class Commands {
|
|
|
|
public static void bootstrap() {
|
2023-07-29 20:54:49 +02:00
|
|
|
ArgumentTypeRegistry.registerArgumentType(Unicopia.id("animation"), Animation.ArgumentType.class, ConstantArgumentSerializer.of(Animation::argument));
|
2023-08-05 16:45:36 +02:00
|
|
|
ArgumentTypeRegistry.registerArgumentType(Unicopia.id("animation_recipient"), Animation.Recipient.ArgumentType.class, ConstantArgumentSerializer.of(Animation.Recipient::argument));
|
2023-07-29 20:54:49 +02:00
|
|
|
ArgumentTypeRegistry.registerArgumentType(Unicopia.id("mana_type"), ManaType.ArgumentType.class, ConstantArgumentSerializer.of(ManaType::argument));
|
|
|
|
ArgumentTypeRegistry.registerArgumentType(Unicopia.id("trait_type"), Trait.ArgumentType.class, ConstantArgumentSerializer.of(Trait::argument));
|
|
|
|
ArgumentTypeRegistry.registerArgumentType(Unicopia.id("spell_traits"), TraitsArgumentType.class, ConstantArgumentSerializer.of(TraitsArgumentType::traits));
|
2023-04-30 21:26:31 +02:00
|
|
|
|
2023-09-05 00:40:41 +02:00
|
|
|
CommandRegistrationCallback.EVENT.register((dispatcher, registries, environment) -> {
|
|
|
|
dispatcher.register(EmoteCommand.create());
|
|
|
|
dispatcher.register(SpeciesCommand.create(environment));
|
|
|
|
dispatcher.register(UnicopiaCommand.create(registries, environment));
|
2023-09-03 17:41:27 +02:00
|
|
|
});
|
2020-04-15 14:22:03 +02:00
|
|
|
}
|
|
|
|
}
|