Skip to content

Commit

Permalink
use a string argument for entity type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Bavay committed Nov 17, 2022
1 parent fdde143 commit 6e07adb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/mobcount/MobCount.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import com.mojang.brigadier.CommandDispatcher;
import com.mojang.brigadier.arguments.DoubleArgumentType;
import com.mojang.brigadier.arguments.StringArgumentType;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.context.ParsedCommandNode;
import com.mojang.brigadier.context.StringRange;
Expand Down Expand Up @@ -63,7 +64,7 @@ public static void register(CommandDispatcher<FabricClientCommandSource> dispatc
.then(ClientCommandManager.argument("pos1x",DoubleArgumentType.doubleArg()).then(ClientCommandManager.argument("pos1z",DoubleArgumentType.doubleArg()).then(ClientCommandManager.argument("pos1y",DoubleArgumentType.doubleArg())

.then(ClientCommandManager.argument("pos2x",DoubleArgumentType.doubleArg()).then(ClientCommandManager.argument("pos2z",DoubleArgumentType.doubleArg()).then(ClientCommandManager.argument("pos2y",DoubleArgumentType.doubleArg())
.then(ClientCommandManager.argument("mobToCount", EntityArgumentType.entities())
.then(ClientCommandManager.argument("mobToCount", StringArgumentType.word())
.executes(
ctx -> mobCount(
ctx.getSource(),
Expand Down

0 comments on commit 6e07adb

Please sign in to comment.