Skip to content

Commit

Permalink
Fix speed argument type in SpeedCommand
Browse files Browse the repository at this point in the history
Change speed argument type from double to int for consistent handling. This ensures the speed value is correctly divided and applied to entities.
  • Loading branch information
NonSwag committed Oct 4, 2024
1 parent a3fb6a1 commit 80ffff1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private int reset(CommandContext<CommandSourceStack> context, SpeedType type, Li

private int speed(CommandContext<CommandSourceStack> context, SpeedType type, List<Entity> entities) {
var sender = context.getSource().getSender();
var speed = context.getArgument("speed", double.class) / 10d;
var speed = context.getArgument("speed", int.class) / 10d;

entities.removeIf(entity -> !(entity instanceof Attributable));
entities.forEach(entity -> {
Expand Down

0 comments on commit 80ffff1

Please sign in to comment.