WIP: killall

This commit is contained in:
Mylloon 2022-08-28 19:29:01 +02:00
parent 1012b9d335
commit 6fa459896b
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -22,11 +22,33 @@ public class Mcsm implements ModInitializer {
// However, some things (like resources) may still be uninitialized. // However, some things (like resources) may still be uninitialized.
// Proceed with mild caution. // Proceed with mild caution.
// Glow command
CommandRegistrationCallback.EVENT.register( CommandRegistrationCallback.EVENT.register(
(dispatcher, registryAccess, environnement) -> dispatcher.register(literal("glow").executes(context -> { (dispatcher, registryAccess, environnement) -> dispatcher.register(literal("glow").executes(context -> {
dispatcher.execute("effect give @a minecraft:glowing 10000 1 true", context.getSource()); dispatcher.execute("effect give @a minecraft:glowing 10000 1 true", context.getSource());
return 1; return 1;
}))); })));
// Clean mobs command
// TODO: Ignore named entities
/*
* List<String> saved_entities = List.of("minecraft:player",
* "minecraft:armor_stand", "#minecraft:arrows",
* "minecraft:painting", "minecraft:item_frame", "minecraft:boat",
* "minecraft:chest_boat",
* "minecraft:villager");
* String command = "say kill @e[type=!" + String.join(",type=!",
* saved_entities) + "]";
*
* CommandRegistrationCallback.EVENT.register(
* (dispatcher, registryAccess, environnement) -> dispatcher
* .register(literal("nettoyage").executes(context -> {
* dispatcher.execute(command,
* context.getSource());
*
* return 1;
* })));
*/
} }
} }